Code Monkey home page Code Monkey logo

Comments (14)

natea avatar natea commented on August 16, 2024

@regisb it's happening when running this in the CMS container as well:

openedx@b73f1151ab60:/openedx/edx-platform$ paver update_assets cms --settings=development
---> pavelib.assets.update_assets
---> pavelib.prereqs.install_node_prereqs
test `npm config get registry` = "https://registry.npmjs.org/" || (echo setting registry; npm config set registry https://registry.npmjs.org/)
npm install
loadDep:webpack-bundle-tr / |######################----------------------------------------------------------------------------------|
npm WARN deprecated [email protected]: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)
npm ERR! Linux 4.9.87-linuxkit-aufs
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! node v4.2.6
npm ERR! npm  v3.5.2
npm ERR! path /root/.npm/raw-loader/0.5.1/package
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall mkdir

npm ERR! Error: EACCES: permission denied, mkdir '/root/.npm/raw-loader/0.5.1/package'
npm ERR!     at Error (native)
npm ERR!  { [Error: EACCES: permission denied, mkdir '/root/.npm/raw-loader/0.5.1/package']
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'mkdir',
npm ERR!   path: '/root/.npm/raw-loader/0.5.1/package',
npm ERR!   parent: 'edx' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.

npm ERR! Please include the following file with any support request:
npm ERR!     /openedx/edx-platform/npm-debug.log


Captured Task Output:
---------------------

---> pavelib.assets.update_assets
---> pavelib.prereqs.install_node_prereqs
test `npm config get registry` = "https://registry.npmjs.org/" || (echo setting registry; npm config set registry https://registry.npmjs.org/)
npm install

Build failed running pavelib.assets.update_assets: Subprocess return code: 243

from tutor.

regisb avatar regisb commented on August 16, 2024

@natea I can't seem to reproduce this issue. Have you rebuilt the image (with make build) after pulling the most recent changes? You shouldn't have that bash: /root/.bashrc: Permission denied error (nor the other errors) after a rebuild.

from tutor.

natea avatar natea commented on August 16, 2024

I did rebuild it and everything seemed to work fine with the rebuild:

$ make build
docker-compose build
memcached uses an image, skipping
mongodb uses an image, skipping
mysql uses an image, skipping
Building nginx
Step 1/5 : FROM nginx:1.13
 ---> 7f70b30f2cc6
Step 2/5 : VOLUME /openedx/data/lms
 ---> Using cache
 ---> 097be587e269
Step 3/5 : VOLUME /openedx/data/cms
 ---> Using cache
 ---> 830975bd25e9
Step 4/5 : COPY ./config/lms.conf /etc/nginx/conf.d/lms.conf
 ---> Using cache
 ---> 10b7541fce97
Step 5/5 : COPY ./config/cms.conf /etc/nginx/conf.d/cms.conf
 ---> Using cache
 ---> 8513b6cfb152
Successfully built 8513b6cfb152
Successfully tagged openedx-docker_nginx:latest
rabbitmq uses an image, skipping
smtp uses an image, skipping
Building lms
Step 1/32 : FROM ubuntu:16.04
 ---> f975c5035748
Step 2/32 : RUN apt update &&   apt upgrade -y &&   apt install -y language-pack-en git python-virtualenv build-essential software-properties-common curl git-core libxml2-dev libxslt1-dev python-pip libmysqlclient-dev python-apt python-dev libxmlsec1-dev libfreetype6-dev swig gcc g++ &&   apt install -y gettext gfortran graphviz graphviz-dev libffi-dev libfreetype6-dev libgeos-dev libjpeg8-dev liblapack-dev libpng12-dev libxml2-dev libxmlsec1-dev libxslt1-dev nodejs npm ntp pkg-config &&   apt install -y mysql-client
 ---> Using cache
 ---> cad0850b98d7
Step 3/32 : RUN apt install -y nodejs-legacy
 ---> Using cache
 ---> 93dedb157780
Step 4/32 : RUN mkdir /openedx /openedx/data /openedx/edx-platform
 ---> Using cache
 ---> df8038ca12c9
Step 5/32 : WORKDIR /openedx/edx-platform
 ---> Using cache
 ---> 8b3c97061319
Step 6/32 : ARG EDX_PLATFORM_REPOSITORY=https://github.com/edx/edx-platform.git
 ---> Using cache
 ---> ec29d0eb4ed5
Step 7/32 : ARG EDX_PLATFORM_VERSION=open-release/ginkgo.master
 ---> Using cache
 ---> 99b78f51e408
Step 8/32 : RUN git clone $EDX_PLATFORM_REPOSITORY --branch $EDX_PLATFORM_VERSION --depth 1 .
 ---> Using cache
 ---> ee4f2be587fe
Step 9/32 : RUN pip install --src ../venv/src -r requirements/edx/pre.txt
 ---> Using cache
 ---> 18f224dc1fb7
Step 10/32 : RUN pip install --src ../venv/src -r requirements/edx/github.txt
 ---> Using cache
 ---> dfed17c1c568
Step 11/32 : RUN pip install --src ../venv/src -r requirements/edx/local.txt
 ---> Using cache
 ---> 11c7ec9d41af
Step 12/32 : RUN pip install --src ../venv/src -r requirements/edx/base.txt
 ---> Using cache
 ---> 66464b81ea86
Step 13/32 : RUN pip install --src ../venv/src -r requirements/edx/post.txt
 ---> Using cache
 ---> ff300ea21096
Step 14/32 : RUN pip install --src ../venv/src -r requirements/edx/paver.txt
 ---> Using cache
 ---> ea9f84cb3bf0
Step 15/32 : RUN npm install
 ---> Using cache
 ---> aa444ecb2794
Step 16/32 : COPY ./config/production_lms.py /openedx/edx-platform/lms/envs/production.py
 ---> Using cache
 ---> 593f59c37ee5
Step 17/32 : COPY ./config/production_cms.py /openedx/edx-platform/cms/envs/production.py
 ---> Using cache
 ---> bb8817a4a233
Step 18/32 : COPY ./config/production_common.py /openedx/edx-platform/lms/envs/production_common.py
 ---> Using cache
 ---> 64982e65769b
Step 19/32 : COPY ./config/production_common.py /openedx/edx-platform/cms/envs/production_common.py
 ---> Using cache
 ---> df813f12c2cf
Step 20/32 : COPY ./config/lms.env.json /openedx/
 ---> Using cache
 ---> 044edb10da9b
Step 21/32 : COPY ./config/cms.env.json /openedx/
 ---> Using cache
 ---> 43ddf528a5db
Step 22/32 : COPY ./config/lms.auth.json /openedx/
 ---> Using cache
 ---> 2c066fef21ff
Step 23/32 : COPY ./config/cms.auth.json /openedx/
 ---> Using cache
 ---> 11fceb6701f7
Step 24/32 : COPY ./wait-for-greenlight.sh /usr/local/bin/
 ---> Using cache
 ---> 21c87fe64860
Step 25/32 : COPY ./docker-entrypoint.sh /usr/local/bin/
 ---> 8806db11aab1
Step 26/32 : VOLUME /openedx/data
 ---> Running in 616eef63f942
Removing intermediate container 616eef63f942
 ---> cab2a918a915
Step 27/32 : VOLUME /openedx/edx-platform
 ---> Running in 80b184fab032
Removing intermediate container 80b184fab032
 ---> 6f71fcbb12f9
Step 28/32 : ENV SERVICE_VARIANT lms
 ---> Running in a6b7d30b4b17
Removing intermediate container a6b7d30b4b17
 ---> 7693df2f61f2
Step 29/32 : ENV SETTINGS production
 ---> Running in ee5c4c37c158
Removing intermediate container ee5c4c37c158
 ---> 6faced7ebbc5
Step 30/32 : ENTRYPOINT ["docker-entrypoint.sh"]
 ---> Running in e55b4585d04c
Removing intermediate container e55b4585d04c
 ---> a03d7ac0aefc
Step 31/32 : EXPOSE 8000
 ---> Running in ab0dd8651aac
Removing intermediate container ab0dd8651aac
 ---> 84a3fe062237
Step 32/32 : CMD gunicorn --name ${SERVICE_VARIANT} --bind=0.0.0.0:8000 --max-requests=1000 ${SERVICE_VARIANT}.wsgi:application
 ---> Running in 92f36f6afaa6
Removing intermediate container 92f36f6afaa6
 ---> c589149d7b79
Successfully built c589149d7b79
Successfully tagged openedx-docker_lms:latest
Building cms
Step 1/32 : FROM ubuntu:16.04
 ---> f975c5035748
Step 2/32 : RUN apt update &&   apt upgrade -y &&   apt install -y language-pack-en git python-virtualenv build-essential software-properties-common curl git-core libxml2-dev libxslt1-dev python-pip libmysqlclient-dev python-apt python-dev libxmlsec1-dev libfreetype6-dev swig gcc g++ &&   apt install -y gettext gfortran graphviz graphviz-dev libffi-dev libfreetype6-dev libgeos-dev libjpeg8-dev liblapack-dev libpng12-dev libxml2-dev libxmlsec1-dev libxslt1-dev nodejs npm ntp pkg-config &&   apt install -y mysql-client
 ---> Using cache
 ---> cad0850b98d7
Step 3/32 : RUN apt install -y nodejs-legacy
 ---> Using cache
 ---> 93dedb157780
Step 4/32 : RUN mkdir /openedx /openedx/data /openedx/edx-platform
 ---> Using cache
 ---> df8038ca12c9
Step 5/32 : WORKDIR /openedx/edx-platform
 ---> Using cache
 ---> 8b3c97061319
Step 6/32 : ARG EDX_PLATFORM_REPOSITORY=https://github.com/edx/edx-platform.git
 ---> Using cache
 ---> ec29d0eb4ed5
Step 7/32 : ARG EDX_PLATFORM_VERSION=open-release/ginkgo.master
 ---> Using cache
 ---> 99b78f51e408
Step 8/32 : RUN git clone $EDX_PLATFORM_REPOSITORY --branch $EDX_PLATFORM_VERSION --depth 1 .
 ---> Using cache
 ---> ee4f2be587fe
Step 9/32 : RUN pip install --src ../venv/src -r requirements/edx/pre.txt
 ---> Using cache
 ---> 18f224dc1fb7
Step 10/32 : RUN pip install --src ../venv/src -r requirements/edx/github.txt
 ---> Using cache
 ---> dfed17c1c568
Step 11/32 : RUN pip install --src ../venv/src -r requirements/edx/local.txt
 ---> Using cache
 ---> 11c7ec9d41af
Step 12/32 : RUN pip install --src ../venv/src -r requirements/edx/base.txt
 ---> Using cache
 ---> 66464b81ea86
Step 13/32 : RUN pip install --src ../venv/src -r requirements/edx/post.txt
 ---> Using cache
 ---> ff300ea21096
Step 14/32 : RUN pip install --src ../venv/src -r requirements/edx/paver.txt
 ---> Using cache
 ---> ea9f84cb3bf0
Step 15/32 : RUN npm install
 ---> Using cache
 ---> aa444ecb2794
Step 16/32 : COPY ./config/production_lms.py /openedx/edx-platform/lms/envs/production.py
 ---> Using cache
 ---> 593f59c37ee5
Step 17/32 : COPY ./config/production_cms.py /openedx/edx-platform/cms/envs/production.py
 ---> Using cache
 ---> bb8817a4a233
Step 18/32 : COPY ./config/production_common.py /openedx/edx-platform/lms/envs/production_common.py
 ---> Using cache
 ---> 64982e65769b
Step 19/32 : COPY ./config/production_common.py /openedx/edx-platform/cms/envs/production_common.py
 ---> Using cache
 ---> df813f12c2cf
Step 20/32 : COPY ./config/lms.env.json /openedx/
 ---> Using cache
 ---> 044edb10da9b
Step 21/32 : COPY ./config/cms.env.json /openedx/
 ---> Using cache
 ---> 43ddf528a5db
Step 22/32 : COPY ./config/lms.auth.json /openedx/
 ---> Using cache
 ---> 2c066fef21ff
Step 23/32 : COPY ./config/cms.auth.json /openedx/
 ---> Using cache
 ---> 11fceb6701f7
Step 24/32 : COPY ./wait-for-greenlight.sh /usr/local/bin/
 ---> Using cache
 ---> 21c87fe64860
Step 25/32 : COPY ./docker-entrypoint.sh /usr/local/bin/
 ---> Using cache
 ---> 8806db11aab1
Step 26/32 : VOLUME /openedx/data
 ---> Using cache
 ---> cab2a918a915
Step 27/32 : VOLUME /openedx/edx-platform
 ---> Using cache
 ---> 6f71fcbb12f9
Step 28/32 : ENV SERVICE_VARIANT lms
 ---> Using cache
 ---> 7693df2f61f2
Step 29/32 : ENV SETTINGS production
 ---> Using cache
 ---> 6faced7ebbc5
Step 30/32 : ENTRYPOINT ["docker-entrypoint.sh"]
 ---> Using cache
 ---> a03d7ac0aefc
Step 31/32 : EXPOSE 8000
 ---> Using cache
 ---> 84a3fe062237
Step 32/32 : CMD gunicorn --name ${SERVICE_VARIANT} --bind=0.0.0.0:8000 --max-requests=1000 ${SERVICE_VARIANT}.wsgi:application
 ---> Using cache
 ---> c589149d7b79
Successfully built c589149d7b79
Successfully tagged openedx-docker_cms:latest
Building lms_worker
Step 1/32 : FROM ubuntu:16.04
 ---> f975c5035748
Step 2/32 : RUN apt update &&   apt upgrade -y &&   apt install -y language-pack-en git python-virtualenv build-essential software-properties-common curl git-core libxml2-dev libxslt1-dev python-pip libmysqlclient-dev python-apt python-dev libxmlsec1-dev libfreetype6-dev swig gcc g++ &&   apt install -y gettext gfortran graphviz graphviz-dev libffi-dev libfreetype6-dev libgeos-dev libjpeg8-dev liblapack-dev libpng12-dev libxml2-dev libxmlsec1-dev libxslt1-dev nodejs npm ntp pkg-config &&   apt install -y mysql-client
 ---> Using cache
 ---> cad0850b98d7
Step 3/32 : RUN apt install -y nodejs-legacy
 ---> Using cache
 ---> 93dedb157780
Step 4/32 : RUN mkdir /openedx /openedx/data /openedx/edx-platform
 ---> Using cache
 ---> df8038ca12c9
Step 5/32 : WORKDIR /openedx/edx-platform
 ---> Using cache
 ---> 8b3c97061319
Step 6/32 : ARG EDX_PLATFORM_REPOSITORY=https://github.com/edx/edx-platform.git
 ---> Using cache
 ---> ec29d0eb4ed5
Step 7/32 : ARG EDX_PLATFORM_VERSION=open-release/ginkgo.master
 ---> Using cache
 ---> 99b78f51e408
Step 8/32 : RUN git clone $EDX_PLATFORM_REPOSITORY --branch $EDX_PLATFORM_VERSION --depth 1 .
 ---> Using cache
 ---> ee4f2be587fe
Step 9/32 : RUN pip install --src ../venv/src -r requirements/edx/pre.txt
 ---> Using cache
 ---> 18f224dc1fb7
Step 10/32 : RUN pip install --src ../venv/src -r requirements/edx/github.txt
 ---> Using cache
 ---> dfed17c1c568
Step 11/32 : RUN pip install --src ../venv/src -r requirements/edx/local.txt
 ---> Using cache
 ---> 11c7ec9d41af
Step 12/32 : RUN pip install --src ../venv/src -r requirements/edx/base.txt
 ---> Using cache
 ---> 66464b81ea86
Step 13/32 : RUN pip install --src ../venv/src -r requirements/edx/post.txt
 ---> Using cache
 ---> ff300ea21096
Step 14/32 : RUN pip install --src ../venv/src -r requirements/edx/paver.txt
 ---> Using cache
 ---> ea9f84cb3bf0
Step 15/32 : RUN npm install
 ---> Using cache
 ---> aa444ecb2794
Step 16/32 : COPY ./config/production_lms.py /openedx/edx-platform/lms/envs/production.py
 ---> Using cache
 ---> 593f59c37ee5
Step 17/32 : COPY ./config/production_cms.py /openedx/edx-platform/cms/envs/production.py
 ---> Using cache
 ---> bb8817a4a233
Step 18/32 : COPY ./config/production_common.py /openedx/edx-platform/lms/envs/production_common.py
 ---> Using cache
 ---> 64982e65769b
Step 19/32 : COPY ./config/production_common.py /openedx/edx-platform/cms/envs/production_common.py
 ---> Using cache
 ---> df813f12c2cf
Step 20/32 : COPY ./config/lms.env.json /openedx/
 ---> Using cache
 ---> 044edb10da9b
Step 21/32 : COPY ./config/cms.env.json /openedx/
 ---> Using cache
 ---> 43ddf528a5db
Step 22/32 : COPY ./config/lms.auth.json /openedx/
 ---> Using cache
 ---> 2c066fef21ff
Step 23/32 : COPY ./config/cms.auth.json /openedx/
 ---> Using cache
 ---> 11fceb6701f7
Step 24/32 : COPY ./wait-for-greenlight.sh /usr/local/bin/
 ---> Using cache
 ---> 21c87fe64860
Step 25/32 : COPY ./docker-entrypoint.sh /usr/local/bin/
 ---> Using cache
 ---> 8806db11aab1
Step 26/32 : VOLUME /openedx/data
 ---> Using cache
 ---> cab2a918a915
Step 27/32 : VOLUME /openedx/edx-platform
 ---> Using cache
 ---> 6f71fcbb12f9
Step 28/32 : ENV SERVICE_VARIANT lms
 ---> Using cache
 ---> 7693df2f61f2
Step 29/32 : ENV SETTINGS production
 ---> Using cache
 ---> 6faced7ebbc5
Step 30/32 : ENTRYPOINT ["docker-entrypoint.sh"]
 ---> Using cache
 ---> a03d7ac0aefc
Step 31/32 : EXPOSE 8000
 ---> Using cache
 ---> 84a3fe062237
Step 32/32 : CMD gunicorn --name ${SERVICE_VARIANT} --bind=0.0.0.0:8000 --max-requests=1000 ${SERVICE_VARIANT}.wsgi:application
 ---> Using cache
 ---> c589149d7b79
Successfully built c589149d7b79
Successfully tagged openedx-docker_lms_worker:latest
Building cms_worker
Step 1/32 : FROM ubuntu:16.04
 ---> f975c5035748
Step 2/32 : RUN apt update &&   apt upgrade -y &&   apt install -y language-pack-en git python-virtualenv build-essential software-properties-common curl git-core libxml2-dev libxslt1-dev python-pip libmysqlclient-dev python-apt python-dev libxmlsec1-dev libfreetype6-dev swig gcc g++ &&   apt install -y gettext gfortran graphviz graphviz-dev libffi-dev libfreetype6-dev libgeos-dev libjpeg8-dev liblapack-dev libpng12-dev libxml2-dev libxmlsec1-dev libxslt1-dev nodejs npm ntp pkg-config &&   apt install -y mysql-client
 ---> Using cache
 ---> cad0850b98d7
Step 3/32 : RUN apt install -y nodejs-legacy
 ---> Using cache
 ---> 93dedb157780
Step 4/32 : RUN mkdir /openedx /openedx/data /openedx/edx-platform
 ---> Using cache
 ---> df8038ca12c9
Step 5/32 : WORKDIR /openedx/edx-platform
 ---> Using cache
 ---> 8b3c97061319
Step 6/32 : ARG EDX_PLATFORM_REPOSITORY=https://github.com/edx/edx-platform.git
 ---> Using cache
 ---> ec29d0eb4ed5
Step 7/32 : ARG EDX_PLATFORM_VERSION=open-release/ginkgo.master
 ---> Using cache
 ---> 99b78f51e408
Step 8/32 : RUN git clone $EDX_PLATFORM_REPOSITORY --branch $EDX_PLATFORM_VERSION --depth 1 .
 ---> Using cache
 ---> ee4f2be587fe
Step 9/32 : RUN pip install --src ../venv/src -r requirements/edx/pre.txt
 ---> Using cache
 ---> 18f224dc1fb7
Step 10/32 : RUN pip install --src ../venv/src -r requirements/edx/github.txt
 ---> Using cache
 ---> dfed17c1c568
Step 11/32 : RUN pip install --src ../venv/src -r requirements/edx/local.txt
 ---> Using cache
 ---> 11c7ec9d41af
Step 12/32 : RUN pip install --src ../venv/src -r requirements/edx/base.txt
 ---> Using cache
 ---> 66464b81ea86
Step 13/32 : RUN pip install --src ../venv/src -r requirements/edx/post.txt
 ---> Using cache
 ---> ff300ea21096
Step 14/32 : RUN pip install --src ../venv/src -r requirements/edx/paver.txt
 ---> Using cache
 ---> ea9f84cb3bf0
Step 15/32 : RUN npm install
 ---> Using cache
 ---> aa444ecb2794
Step 16/32 : COPY ./config/production_lms.py /openedx/edx-platform/lms/envs/production.py
 ---> Using cache
 ---> 593f59c37ee5
Step 17/32 : COPY ./config/production_cms.py /openedx/edx-platform/cms/envs/production.py
 ---> Using cache
 ---> bb8817a4a233
Step 18/32 : COPY ./config/production_common.py /openedx/edx-platform/lms/envs/production_common.py
 ---> Using cache
 ---> 64982e65769b
Step 19/32 : COPY ./config/production_common.py /openedx/edx-platform/cms/envs/production_common.py
 ---> Using cache
 ---> df813f12c2cf
Step 20/32 : COPY ./config/lms.env.json /openedx/
 ---> Using cache
 ---> 044edb10da9b
Step 21/32 : COPY ./config/cms.env.json /openedx/
 ---> Using cache
 ---> 43ddf528a5db
Step 22/32 : COPY ./config/lms.auth.json /openedx/
 ---> Using cache
 ---> 2c066fef21ff
Step 23/32 : COPY ./config/cms.auth.json /openedx/
 ---> Using cache
 ---> 11fceb6701f7
Step 24/32 : COPY ./wait-for-greenlight.sh /usr/local/bin/
 ---> Using cache
 ---> 21c87fe64860
Step 25/32 : COPY ./docker-entrypoint.sh /usr/local/bin/
 ---> Using cache
 ---> 8806db11aab1
Step 26/32 : VOLUME /openedx/data
 ---> Using cache
 ---> cab2a918a915
Step 27/32 : VOLUME /openedx/edx-platform
 ---> Using cache
 ---> 6f71fcbb12f9
Step 28/32 : ENV SERVICE_VARIANT lms
 ---> Using cache
 ---> 7693df2f61f2
Step 29/32 : ENV SETTINGS production
 ---> Using cache
 ---> 6faced7ebbc5
Step 30/32 : ENTRYPOINT ["docker-entrypoint.sh"]
 ---> Using cache
 ---> a03d7ac0aefc
Step 31/32 : EXPOSE 8000
 ---> Using cache
 ---> 84a3fe062237
Step 32/32 : CMD gunicorn --name ${SERVICE_VARIANT} --bind=0.0.0.0:8000 --max-requests=1000 ${SERVICE_VARIANT}.wsgi:application
 ---> Using cache
 ---> c589149d7b79
Successfully built c589149d7b79
Successfully tagged openedx-docker_cms_worker:latest

But then when I tried run make lms and make cms, I got the errors:

$ make lms
docker-compose run --rm -e USERID=$(id -u) -e SETTINGS=development --volume="/Users/nateaune/Dropbox/code/natea-edx-platform-ginkgo:/openedx/edx-platform" -p 8000:8000 lms bash
Starting openedx-docker_mysql_1 ... done
Starting openedx-docker_memcached_1 ... done
Starting openedx-docker_rabbitmq_1  ... done
Starting openedx-docker_smtp_1      ... done
Starting openedx-docker_mongodb_1   ... done
creating new user 'openedx' with UID 501
chown: changing ownership of '/openedx/edx-platform/common/static/edx-pattern-library/fonts': No such file or directory
chown: changing ownership of '/openedx/edx-platform/common/static/edx-pattern-library/js': No such file or directory
chown: changing ownership of '/openedx/edx-platform/common/static/edx-ui-toolkit/js': No such file or directory
make: *** [lms] Error 1

And running the CMS:

$ make cms
docker-compose run --rm -e USERID=$(id -u) -e SETTINGS=development --volume="/Users/nateaune/Dropbox/code/natea-edx-platform-ginkgo:/openedx/edx-platform" -p 8001:8001 cms bash
Starting openedx-docker_memcached_1 ... done
Starting openedx-docker_rabbitmq_1  ... done
Starting openedx-docker_mysql_1     ... done
Starting openedx-docker_mongodb_1   ... done
Starting openedx-docker_smtp_1      ... done
creating new user 'openedx' with UID 501
chown: changing ownership of '/openedx/edx-platform/common/static/edx-pattern-library/fonts': No such file or directory
chown: changing ownership of '/openedx/edx-platform/common/static/edx-pattern-library/js': No such file or directory
chown: changing ownership of '/openedx/edx-platform/common/static/edx-ui-toolkit/js': No such file or directory
make: *** [cms] Error 1

from tutor.

regisb avatar regisb commented on August 16, 2024

That error is making me scratch my head. We are not supposed to see a "No such file or directory" in the most recent version of the code. Let's try something different:

  1. Run git pull
  2. What is the output of git log -1? (just to check you have the latest version)
  3. Build again from scratch: docker-compose build --no-cache lms (this is going to take long)
  4. Try to start lms without permission changes: USERID=1000 make lms
  5. Try to start lms with permission changes: make lms

from tutor.

natea avatar natea commented on August 16, 2024
$ git log -1
commit 5d2dc88b9c979033b4387761e5a2156dd7b83796 (HEAD -> master)
Merge: 2ee2ab2151 7189ea90bf
Author: Nate Aune <[email protected]>
Date:   Mon Apr 30 08:26:13 2018 -0700

    Merge branch 'master' of https://github.com/regisb/openedx-docker

I'm pulling from your repo:

$ git remote -v
origin	https://github.com/regisb/openedx-docker (fetch)
origin	https://github.com/regisb/openedx-docker (push)

Here are the last few lines of the docker-compose build --no-cache lms command:

Removing intermediate container 9cef716844d6
 ---> c94a4fce7b53
Step 16/26 : RUN mkdir /openedx/config
 ---> Running in cd2de4ce1093
Removing intermediate container cd2de4ce1093
 ---> 2e1588cf1254
Step 17/26 : COPY ./config/* /openedx/config/
 ---> b3ce39c7b1eb
Step 18/26 : RUN ln -s /openedx/config/production_lms.py /openedx/edx-platform/lms/envs/production.py   && ln -s /openedx/config/production_cms.py /openedx/edx-platform/cms/envs/production.py   && ln -s /openedx/config/production_common.py /openedx/edx-platform/lms/envs/production_common.py   && ln -s /openedx/config/production_common.py /openedx/edx-platform/cms/envs/production_common.py
 ---> Running in c011cb782491
Removing intermediate container c011cb782491
 ---> 0ae3e5230d65
Step 19/26 : RUN ln -s /openedx/config/lms.env.json /openedx/   && ln -s /openedx/config/cms.env.json /openedx/   && ln -s /openedx/config/lms.auth.json /openedx/   && ln -s /openedx/config/cms.auth.json /openedx/
 ---> Running in fe36b59d85a1
Removing intermediate container fe36b59d85a1
 ---> ec311ef4fd5c
Step 20/26 : COPY ./wait-for-greenlight.sh /usr/local/bin/
 ---> df12c8718c33
Step 21/26 : COPY ./docker-entrypoint.sh /usr/local/bin/
 ---> 78c113aa8713
Step 22/26 : ENV SERVICE_VARIANT lms
 ---> Running in d5467a805dc9
Removing intermediate container d5467a805dc9
 ---> 4c549db76096
Step 23/26 : ENV SETTINGS production
 ---> Running in 02381048774b
Removing intermediate container 02381048774b
 ---> d0316b766a14
Step 24/26 : ENTRYPOINT ["docker-entrypoint.sh"]
 ---> Running in 3c6b11e90b1e
Removing intermediate container 3c6b11e90b1e
 ---> 6b52b52de2e9
Step 25/26 : EXPOSE 8000
 ---> Running in 8d4c3d6761d7
Removing intermediate container 8d4c3d6761d7
 ---> 10c2ef08ed11
Step 26/26 : CMD gunicorn --name ${SERVICE_VARIANT} --bind=0.0.0.0:8000 --max-requests=1000 ${SERVICE_VARIANT}.wsgi:application
 ---> Running in de03e53fa882
Removing intermediate container de03e53fa882
 ---> 20653ab9413f
Successfully built 20653ab9413f
Successfully tagged openedx-docker_lms:latest

And running with USERID=1000:

$ USERID=1000 make lms
docker-compose run --rm -e USERID=1000 -e SETTINGS=development --volume="/Users/nateaune/Dropbox/code/natea-edx-platform-ginkgo:/openedx/edx-platform" -p 8000:8000 lms bash
Starting openedx-docker_memcached_1 ... done
Starting openedx-docker_smtp_1      ... done
Starting openedx-docker_mongodb_1   ... done
Starting openedx-docker_rabbitmq_1  ... done
Starting openedx-docker_mysql_1     ... done

from tutor.

regisb avatar regisb commented on August 16, 2024

Ok so the destack should work fine without permission changes. What about make lms, is it working?

from tutor.

natea avatar natea commented on August 16, 2024

I realized that before I ran the build command, I forgot to set the environment variables to use my forked repo and the development settings:

export EDX_PLATFORM_PATH=/Users/nateaune/Dropbox/code/natea-edx-platform-ginkgo
export EDX_PLATFORM_VERSION=natea/testing
export EDX_PLATFORM_SETTINGS=development

So now I'm re-running the build to see if that solves the problem.

Do I need to make sure these env variables are set every time I run make lms and make cms or are they only necessary during the build step?

from tutor.

natea avatar natea commented on August 16, 2024

@regisb the build didn't give any errors, but when I try to run the make lms command now, I get the error again:

$ make lms
docker-compose run --rm -e USERID=$(id -u) -e SETTINGS=development --volume="/Users/nateaune/Dropbox/code/natea-edx-platform-ginkgo:/openedx/edx-platform" -p 8000:8000 lms bash
Starting openedx-docker_mongodb_1   ... done
Starting openedx-docker_smtp_1      ... done
Starting openedx-docker_memcached_1 ... done
Starting openedx-docker_rabbitmq_1  ... done
Starting openedx-docker_mysql_1     ... done
creating new user 'openedx' with UID 501
chown: changing ownership of '/openedx/edx-platform/common/static/edx-pattern-library/fonts': No such file or directory
chown: changing ownership of '/openedx/edx-platform/common/static/edx-pattern-library/js': No such file or directory
chown: changing ownership of '/openedx/edx-platform/common/static/edx-ui-toolkit/js': No such file or directory
make: *** [lms] Error 1

strangely when I run USERID=1000 make lms then I don't get the error.

$ USERID=1000 make lms
docker-compose run --rm -e USERID=1000 -e SETTINGS=development --volume="/Users/nateaune/Dropbox/code/natea-edx-platform-ginkgo:/openedx/edx-platform" -p 8000:8000 lms bash
Starting openedx-docker_memcached_1 ... done
Starting openedx-docker_rabbitmq_1  ... done
Starting openedx-docker_mongodb_1   ... done
Starting openedx-docker_smtp_1      ... done
Starting openedx-docker_mysql_1     ... done
root@e555b29a2e26:/openedx/edx-platform# 

from tutor.

regisb avatar regisb commented on August 16, 2024

Do I need to make sure these env variables are set every time I run make lms and make cms or are they only necessary during the build step?

These variables are not used during build, only at runtime. You can see them in effect in the docker-compose run command. For example, you can see that the edx-platform on your host is mounted as a volume when you define the EDX_PLATFORM_PATH environment variable.

When mounting edx-platform from the host, you (the developer) want to log in the container with a user that shares the same user ID as your user on the host. In your case the user ID is 501. The reason for this is that during development you will generate many files inside edx-platform and if the container user is not modified, these generated files will belong to root, which is inconvenient. So there is a script in the container which creates a user and makes sure the edx-platform and data folders have the right owners. This user creation is disabled when USERID=1000, because then your host and container users already share the same user ID (supposedly). All this happens at runtime, not during build.

But why do you get "No such file or directory" errors? These errors occur because (when USERID is not equal to 1000) we are trying to chown symbolic links that point to files that do not exist. At least, this is what I observed on my machine. The files that cause errors are symbolic links that point inside the edx-platform/node_modules folder and this folder does not exist if you have not installed npm dependencies. However, these errors are not supposed to occur because I added the --no-dereference option to the chown command, so chown is not supposed to try to follow symlinks.

The only candidate explanation I can see is that the error could be caused by an edx-platform folder located inside a Dropbox folder. Maybe Dropbox uses a special filesystem that causes chown to fail despite the --no-dereference option.

  1. To better diagnose the problem, can you give me the output of the mount command on your host?
  2. You can try to fix the issue by installing npm dependencies from the host: just run npm install from inside /Users/nateaune/Dropbox/code/natea-edx-platform-ginkgo.
  3. While we are investigating this issue, you can use your devstack normally by adding a USERID=1000 prefix to all your commands from the host. For example: USERID=1000 make lms, USERID make cms, etc.

from tutor.

natea avatar natea commented on August 16, 2024

@regisb here is the result of running the mount command on my Macbook:

$ mount
/dev/disk1 on / (hfs, NFS exported, local, journaled)
devfs on /dev (devfs, local, nobrowse)
map -hosts on /net (autofs, nosuid, automounted, nobrowse)
map auto_home on /home (autofs, automounted, nobrowse)
localhost:/9wh5ustC4CCpj-5Lwpb42X on /Volumes/MobileBackups (mtmfs, nosuid, read-only, nobrowse)
keybase-redirector on /keybase (kbfuse, read-only, synchronous, nobrowse)
/Applications/PCClient.app on /private/var/folders/b6/xq5h_sm935v4fgp8c0qs9dp00000gn/T/AppTranslocation/D8C88A85-A026-4E9A-A6DF-A10AB7F4776D (nullfs, local, nodev, nosuid, read-only, nobrowse, mounted by nateaune)
drivefs on /Volumes/GoogleDrive (dfsfuse_DFS, local, nodev, nosuid, synchronous, mounted by nateaune)
kbfs@kbfuse1 on /Volumes/Keybase (nateaune) (kbfuse, nodev, nosuid, synchronous, mounted by nateaune)

from tutor.

regisb avatar regisb commented on August 16, 2024

I'll leave this open and try to figure out a solution. Unless you already fixed the issue?

from tutor.

natea avatar natea commented on August 16, 2024

from tutor.

regisb avatar regisb commented on August 16, 2024

@natea can you please try to copy your edx-platform repository outside of your Dropbox, and then point EDX_PLATFORM_PATH to this new path? I would like to know if the error still occurs when you run make lms.

from tutor.

regisb avatar regisb commented on August 16, 2024

@natea did you try to move edx-platform to a folder outside of Dropbox?

from tutor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.