Problems during installing of Edx with Vagrant

669 views
Skip to first unread message

openg...@gmail.com

unread,
Sep 10, 2014, 1:37:48 PM9/10/14
to opene...@googlegroups.com
I  try install Edx with Vagrant and have serious problem with running Edx platform. When i start command
paver devstack lms i see this output from system:
vagrant@precise64:~$ sudo su edxapp
edxapp@precise64
:~/edx-platform$ paver devstack lms
---> pavelib.servers.devstack
---> pavelib.prereqs.install_prereqs
---> pavelib.prereqs.install_ruby_prereqs
bundle install
--quiet
---> pavelib.prereqs.install_node_prereqs
test
`npm config get registry` = "http://registry.npmjs.org/" || (echo setting registry; npm config set registry http://registry.npmjs.org/)
setting registry
npm ERR
! Error: EPERM, chown '/edx/app/edxapp/.npmrc'
npm ERR
!  { [Error: EPERM, chown '/edx/app/edxapp/.npmrc'] errno: 50, code: 'EPERM', path: '/edx/app/edxapp/.npmrc' }
npm ERR
!
npm ERR
! Please try running this command again as root/Administrator.

npm ERR
! System Linux 3.2.0-23-generic
npm ERR
! command "/usr/bin/node" "/usr/bin/npm" "config" "set" "registry" "http://registry.npmjs.org/"
npm ERR
! cwd /edx/app/edxapp/edx-platform
npm ERR
! node -v v0.10.31
npm ERR
! npm -v 1.4.23
npm ERR
! path /edx/app/edxapp/.npmrc
npm ERR
! code EPERM
npm ERR
! errno 50
npm ERR
! stack Error: EPERM, chown '/edx/app/edxapp/.npmrc'
npm ERR
!
npm ERR
! Additional logging details can be found in:
npm ERR
!     /edx/app/edxapp/edx-platform/npm-debug.log
npm ERR
! not ok code 0


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

---> pavelib.servers.devstack
---> pavelib.prereqs.install_prereqs
---> pavelib.prereqs.install_ruby_prereqs
bundle install
--quiet
---> pavelib.prereqs.install_node_prereqs
test
`npm config get registry` = "http://registry.npmjs.org/" || (echo setting registry; npm config set registry http://registry.npmjs.org/)

Build failed running pavelib.servers.devstack: Subprocess return code: 50



Edx utils haven't root rights,but chown operation require root rhights for paver as i think
My host is Debian Wheezy 32 bit. Vagrant version:1.6.5
Virtualization: Virtual Box OSE 4.1.18
I use instruction from: https://github.com/edx/configuration/wiki/edX-Developer-Stack

Han Su Kim

unread,
Sep 11, 2014, 3:05:23 PM9/11/14
to opene...@googlegroups.com
I've seen that because npm doesn't gracefully support shared file systems well.

We've updated the configuration repo release branch to try to take care of these errors.  Can you do a sudo /edx/bin/update configuration release and then try to update your edx-platform to the branch you'd like to use?

openg...@gmail.com

unread,
Sep 14, 2014, 1:31:28 PM9/14/14
to opene...@googlegroups.com
I use image from torrent(20140826-kifli-devstack.box) and catch new problem: script for installation Edx can't install matplotlib. Log of this error is:
  ==> default: TASK: [edxapp | code sandbox | Install base sandbox requirements and create sandbox virtualenv] ***
==> default: failed: [localhost] => {"cmd": "/edx/app/edxapp/venvs/edxapp-sandbox/bin/pip install -i https://pypi.python.org/simple --exists-action w --use-mirrors -r /edx/app/edxapp/edx-platform/requirements/edx-sandbox/base.txt", "failed": true, "item": ""}
==> default: msg: stdout: --use-mirrors has been deprecated and will be removed in the future. Explicit uses of --index-url and/or --extra-index-url is suggested.
==> default: Requirement already satisfied (use --upgrade to upgrade): numpy==1.6.2 in /edx/app/edxapp/venvs/edxapp-sandbox/lib/python2.7/site-packages (from -r /edx/app/edxapp/edx-platform/requirements/edx-sandbox/base.txt (line 7))
==> default: Requirement already satisfied (use --upgrade to upgrade): networkx==1.7 in /edx/app/edxapp/venvs/edxapp-sandbox/lib/python2.7/site-packages (from -r /edx/app/edxapp/edx-platform/requirements/edx-sandbox/base.txt (line 8))
==> default: Requirement already satisfied (use --upgrade to upgrade): sympy==0.7.1 in /edx/app/edxapp/venvs/edxapp-sandbox/lib/python2.7/site-packages (from -r /edx/app/edxapp/edx-platform/requirements/edx-sandbox/base.txt (line 9))
==> default: Requirement already satisfied (use --upgrade to upgrade): pyparsing==2.0.1 in /edx/app/edxapp/venvs/edxapp-sandbox/lib/python2.7/site-packages (from -r /edx/app/edxapp/edx-platform/requirements/edx-sandbox/base.txt (line 10))
==> default: Requirement already satisfied (use --upgrade to upgrade): nltk==2.0.4 in /edx/app/edxapp/venvs/edxapp-sandbox/lib/python2.7/site-packages (from -r /edx/app/edxapp/edx-platform/requirements/edx-sandbox/base.txt (line 11))
==> default: Downloading/unpacking matplotlib==1.3.1 (from -r /edx/app/edxapp/edx-platform/requirements/edx-sandbox/base.txt (line 12))
==> default:   Running setup.py (path:/edx/app/edxapp/venvs/edxapp-sandbox/build/matplotlib/setup.py) egg_info for package matplotlib
==> default:     ============================================================================
==> default:     Edit setup.cfg to change the build options
==> default:    
==> default:     BUILDING MATPLOTLIB
==> default:                 matplotlib: yes [1.3.1]
==> default:                     python: yes [2.7.3 (default, Feb 27 2014, 19:58:35)  [GCC
==> default:                             4.6.3]]
==> default:                   platform: yes [linux2]
==> default:    
==> default:     REQUIRED DEPENDENCIES AND EXTENSIONS
==> default:                      numpy: yes [version 1.6.2]
==> default:                   dateutil: yes [dateutil was not found. It is required for date
==> default:                             axis support. pip/easy_install may attempt to
==> default:                             install it after matplotlib.]
==> default:                    tornado: yes [tornado was not found. It is required for the
==> default:                             WebAgg backend. pip/easy_install may attempt to
==> default:                             install it after matplotlib.]
==> default:                  pyparsing: yes [using pyparsing version 2.0.1]
==> default:                      pycxx: yes [Couldn't import.  Using local copy.]
==> default:                     libagg: yes [pkg-config information for 'libagg' could not
==> default:                             be found. Using local copy.]
==> default:                   freetype: no  [pkg-config information for 'freetype2' could
==> default:                             not be found.]
==> default:                        png: yes [version 1.2.46]
==> default:    
==> default:     OPTIONAL SUBPACKAGES
==> default:                sample_data: yes [installing]
==> default:                   toolkits: yes [installing]
==> default:                      tests: yes [nose 0.11.1 or later is required to run the
==> default:                             matplotlib test suite]
==> default:    
==> default:     OPTIONAL BACKEND EXTENSIONS
==> default:                     macosx: no  [Mac OS-X only]
==> default:                     qt4agg: no  [PyQt4 not found]
==> default:                    gtk3agg: no  [Requires pygobject to be installed.]
==> default:                  gtk3cairo: no  [Requires cairo to be installed.]
==> default:                     gtkagg: no  [Requires pygtk]
==> default:                      tkagg: no  [TKAgg requires Tkinter.]
==> default:                      wxagg: no  [requires wxPython]
==> default:                        gtk: no  [Requires pygtk]
==> default:                        agg: yes [installing]
==> default:                      cairo: no  [cairo not found]
==> default:                  windowing: no  [Microsoft Windows only]
==> default:    
==> default:     OPTIONAL LATEX DEPENDENCIES
==> default:                     dvipng: no
==> default:                ghostscript: no
==> default:                      latex: no
==> default:                    pdftops: no
==> default:    
==> default:     ============================================================================
==> default:                             * The following required packages can not be built:
==> default:                             * freetype
==> default:     Complete output from command python setup.py egg_info:
==> default:     ============================================================================
==> default:
==> default: Edit setup.cfg to change the build options
==> default:
==> default:
==> default:
==> default: BUILDING MATPLOTLIB
==> default:
==> default:             matplotlib: yes [1.3.1]
==> default:
==> default:                 python: yes [2.7.3 (default, Feb 27 2014, 19:58:35)  [GCC
==> default:
==> default:                         4.6.3]]
==> default:
==> default:               platform: yes [linux2]
==> default:
==> default:
==> default:
==> default: REQUIRED DEPENDENCIES AND EXTENSIONS
==> default:
==> default:                  numpy: yes [version 1.6.2]
==> default:
==> default:               dateutil: yes [dateutil was not found. It is required for date
==> default:
==> default:                         axis support. pip/easy_install may attempt to
==> default:
==> default:                         install it after matplotlib.]
==> default:
==> default:                tornado: yes [tornado was not found. It is required for the
==> default:
==> default:                         WebAgg backend. pip/easy_install may attempt to
==> default:
==> default:                         install it after matplotlib.]
==> default:
==> default:              pyparsing: yes [using pyparsing version 2.0.1]
==> default:
==> default:                  pycxx: yes [Couldn't import.  Using local copy.]
==> default:
==> default:                 libagg: yes [pkg-config information for 'libagg' could not
==> default:
==> default:                         be found. Using local copy.]
==> default:
==> default:               freetype: no  [pkg-config information for 'freetype2' could
==> default:
==> default:                         not be found.]
==> default:
==> default:                    png: yes [version 1.2.46]
==> default:
==> default:
==> default:
==> default: OPTIONAL SUBPACKAGES
==> default:
==> default:            sample_data: yes [installing]
==> default:
==> default:               toolkits: yes [installing]
==> default:
==> default:                  tests: yes [nose 0.11.1 or later is required to run the
==> default:
==> default:                         matplotlib test suite]
==> default:
==> default:
==> default:
==> default: OPTIONAL BACKEND EXTENSIONS
==> default:
==> default:                 macosx: no  [Mac OS-X only]
==> default:
==> default:                 qt4agg: no  [PyQt4 not found]
==> default:
==> default:                gtk3agg: no  [Requires pygobject to be installed.]
==> default:
==> default:              gtk3cairo: no  [Requires cairo to be installed.]
==> default:
==> default:                 gtkagg: no  [Requires pygtk]
==> default:
==> default:                  tkagg: no  [TKAgg requires Tkinter.]
==> default:
==> default:                  wxagg: no  [requires wxPython]
==> default:
==> default:                    gtk: no  [Requires pygtk]
==> default:
==> default:                    agg: yes [installing]
==> default:
==> default:                  cairo: no  [cairo not found]
==> default:
==> default:              windowing: no  [Microsoft Windows only]
==> default:
==> default:
==> default:
==> default: OPTIONAL LATEX DEPENDENCIES
==> default:
==> default:                 dvipng: no
==> default:
==> default:            ghostscript: no
==> default:
==> default:                  latex: no
==> default:
==> default:                pdftops: no
==> default:
==> default:
==> default:
==> default: ============================================================================
==> default:
==> default:                         * The following required packages can not be built:
==> default:
==> default:                         * freetype
==> default:
==> default: ----------------------------------------
==> default: Cleaning up...
==> default: Command python setup.py egg_info failed with error code 1 in /edx/app/edxapp/venvs/edxapp-sandbox/build/matplotlib
==> default: Storing debug log for failure in /edx/app/edxapp/venvs/edxapp-sandbox/.pip/pip.log
==> default:
==> default: FATAL: all hosts have already failed -- aborting
==> default:
==> default: PLAY RECAP ********************************************************************
==> default:            to retry, use: --limit @/root/vagrant-devstack.retry
==> default: localhost                  : ok=32   changed=13   unreachable=0    failed=1  

On vagrant-images_20140625-johnnycake-devstack.box i don't see errors during installition.
четверг, 11 сентября 2014 г., 23:05:23 UTC+4 пользователь Han Su Kim написал:

Han Su Kim

unread,
Sep 15, 2014, 12:19:51 PM9/15/14
to opene...@googlegroups.com
I just ran into this as well and it's because a new version of matplotlib that requires that libfreetype6-dev be pre installed

For now, the easiest fix is to do this

vagrant ssh
sudo apt-get install libfreetype6-dev
sudo /edx/bin/update edx-platform release (or whichever branch you want)

openg...@gmail.com

unread,
Sep 17, 2014, 6:15:35 AM9/17/14
to opene...@googlegroups.com
I use your advise and fix problem with matplotlib. But after Edx update with command  

sudo /edx/bin/update edx-platform release

production stack components are installed in VM as i see. When i start lms component i see:

Error: That port is already in use.


This message is output from Django. Devserver of Django try use port 8000 but this port already in use by gunicorn.
Netstat output:

gunicorn  5673         www-data   11u  IPv4  23710      0t0  TCP localhost:8000 (LISTEN)
Argument of netstat:  sudo netstat -lptu
 

I use workaround:
 
./manage.py lms runserver --settings=devstack 0.0.0.0:xxxx
 where xxxx -- other port. In documentation about devstack write that server of devstack -- django runserver

With workaround all works. Thank you. 

Eugene Medvedev

unread,
Sep 20, 2014, 9:22:55 AM9/20/14
to opene...@googlegroups.com
On Thursday, 11 September 2014 23:05:23 UTC+4, Han Su Kim wrote:
I've seen that because npm doesn't gracefully support shared file systems well.

Only, the file it's planning to chown is not on a shared file system:

npm ERR! Error: EPERM, chown '/edx/app/edxapp/.npmrc'

With the Vagrantfile supplied by configuration repository, the actual shared filesystem is mounted under /edx/app/edxapp/edx-platform, which is one directory below where .npmrc or .npm are. 

I've encountered this problem when trying to switch to the recent release of configuration, when I definitely had seen nothing of the sort previously.
Reply all
Reply to author
Forward
0 new messages