Skip to content
This repository has been archived by the owner on May 6, 2024. It is now read-only.

Error on [TASK: gather lms static assets with rake] #196

Closed
elimence opened this issue Jul 31, 2013 · 6 comments
Closed

Error on [TASK: gather lms static assets with rake] #196

elimence opened this issue Jul 31, 2013 · 6 comments

Comments

@elimence
Copy link

I did a test deploy of edx using ansible today, and discovered errors at three points which were okay, previously.
Most likely broken by some of the new changes.

TASK: [check if django can collect lms static data] *************************** 
failed: [localhost] => {"changed": true, "cmd": "SERVICE_VARIANT=lms django-admin.py help collectstatic --pythonpath=/opt/wwc/edx-platform --settings=lms.envs.aws ", "delta": "0:00:00.400344", "end": "2013-07-31 23:27:31.311594", "item": "", "rc": 1, "start": "2013-07-31 23:27:30.911250"}
stderr: Unknown command: 'collectstatic'
Type 'django-admin.py help' for usage.
...ignoring

TASK: [check if django can collect cms static data] *************************** 
failed: [localhost] => {"changed": true, "cmd": "SERVICE_VARIANT=lms django-admin.py help collectstatic --pythonpath=/opt/wwc/edx-platform --settings=cms.envs.aws ", "delta": "0:00:00.233741", "end": "2013-07-31 23:27:31.890674", "item": "", "rc": 1, "start": "2013-07-31 23:27:31.656933"}
stderr: Unknown command: 'collectstatic'
Type 'django-admin.py help' for usage.
...ignoring

TASK: [check if django can update cms templates] ****************************** 
failed: [localhost] => {"changed": true, "cmd": "SERVICE_VARIANT=cms django-admin.py help update_templates --pythonpath=/opt/wwc/edx-platform --settings=cms.envs.aws ", "delta": "0:00:00.231082", "end": "2013-07-31 23:27:32.450945", "item": "", "rc": 1, "start": "2013-07-31 23:27:32.219863"}
stderr: Unknown command: 'update_templates'
Type 'django-admin.py help' for usage.
...ignoring

TASK: [gather lms static assets with rake] ************************************ 
failed: [localhost] => {"changed": true, "cmd": " SERVICE_VARIANT=lms rake lms:gather_assets:aws ", "delta": "0:00:08.639905", "end": "2013-07-31 23:27:41.432361", "item": "", "rc": 1, "start": "2013-07-31 23:27:32.792456"}
stderr: mkdir -p /opt/wwc/edx-platform/.ws_migrations_complete
./manage.py lms --settings aws preprocess_assets --traceback 
xmodule_assets common/static/xmodule
Traceback (most recent call last):
  File "/opt/edx/bin/xmodule_assets", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/opt/edx/local/lib/python2.7/site-packages/pkg_resources.py", line 2897, in <module>
    add_activation_listener(lambda dist: dist.activate())
  File "/opt/edx/local/lib/python2.7/site-packages/pkg_resources.py", line 712, in subscribe
    callback(dist)
  File "/opt/edx/local/lib/python2.7/site-packages/pkg_resources.py", line 2897, in <lambda>
    add_activation_listener(lambda dist: dist.activate())
  File "/opt/edx/local/lib/python2.7/site-packages/pkg_resources.py", line 2329, in activate
    self.insert_on(path)
  File "/opt/edx/local/lib/python2.7/site-packages/pkg_resources.py", line 2436, in insert_on
    self.check_version_conflict()
  File "/opt/edx/local/lib/python2.7/site-packages/pkg_resources.py", line 2475, in check_version_conflict
    for modname in self._get_metadata('top_level.txt'):
  File "/opt/edx/local/lib/python2.7/site-packages/pkg_resources.py", line 2323, in _get_metadata
    for line in self.get_metadata_lines(name):
  File "/opt/edx/local/lib/python2.7/site-packages/pkg_resources.py", line 1246, in get_metadata_lines
    return yield_lines(self.get_metadata(name))
  File "/opt/edx/local/lib/python2.7/site-packages/pkg_resources.py", line 1238, in get_metadata
    return self._get(self._fn(self.egg_info,name))
  File "/opt/edx/local/lib/python2.7/site-packages/pkg_resources.py", line 1353, in _get
    stream = open(path, 'rb')
IOError: [Errno 13] Permission denied: '/opt/edx/lib/python2.7/site-packages/httplib2-0.8-py2.7.egg-info/top_level.txt'
node_modules/.bin/coffee --compile  .
rake aborted!
Command failed with status (1): [xmodule_assets common/static/xmodule...]
/opt/www/.gem/gems/rake-10.0.4/lib/rake/file_utils.rb:53:in `block in create_shell_runner'
/opt/www/.gem/gems/rake-10.0.4/lib/rake/file_utils.rb:45:in `call'
/opt/www/.gem/gems/rake-10.0.4/lib/rake/file_utils.rb:45:in `sh'
/opt/www/.gem/gems/rake-10.0.4/lib/rake/file_utils_ext.rb:37:in `sh'
/opt/wwc/edx-platform/rakelib/assets.rake:82:in `block (3 levels) in <top (required)>'
/opt/www/.gem/gems/rake-10.0.4/lib/rake/task.rb:246:in `call'
/opt/www/.gem/gems/rake-10.0.4/lib/rake/task.rb:246:in `block in execute'
/opt/www/.gem/gems/rake-10.0.4/lib/rake/task.rb:241:in `each'
/opt/www/.gem/gems/rake-10.0.4/lib/rake/task.rb:241:in `execute'
/opt/www/.gem/gems/rake-10.0.4/lib/rake/task.rb:184:in `block in invoke_with_call_chain'
/opt/www/.gem/gems/rake-10.0.4/lib/rake/task.rb:177:in `invoke_with_call_chain'
/opt/www/.gem/gems/rake-10.0.4/lib/rake/task.rb:215:in `block (2 levels) in invoke_prerequisites_concurrently'
/opt/www/.gem/gems/rake-10.0.4/lib/rake/promise.rb:63:in `call'
/opt/www/.gem/gems/rake-10.0.4/lib/rake/promise.rb:63:in `chore'
/opt/www/.gem/gems/rake-10.0.4/lib/rake/promise.rb:45:in `work'
/opt/www/.gem/gems/rake-10.0.4/lib/rake/thread_pool.rb:103:in `process_queue_item'
/opt/www/.gem/gems/rake-10.0.4/lib/rake/thread_pool.rb:117:in `block (2 levels) in start_thread'
Tasks: TOP => gather_assets => assets => assets:all => assets:xmodule
(See full trace by running task with --trace)
Unknown command: 'preprocess_assets'
Type 'manage.py help' for usage.
stdout: phantomjs not found on path. Set $PHANTOMJS_PATH. Using browser for jasmine tests

FATAL: all hosts have already failed -- aborting

PLAY RECAP ******************************************************************** 
           to retry, use: --limit @/var/tmp/ansible/edx_sandbox.retry

localhost                  : ok=124  changed=113  unreachable=0    failed=1 
@elimence
Copy link
Author

elimence commented Aug 1, 2013

Problem solved, but a new one has materialised.

TASK: [stop edxapp services] ************************************************** 
failed: [localhost] => {"failed": true, "item": ""}
msg: stop: Job has already been stopped: edxapp


FATAL: all hosts have already failed -- aborting

PLAY RECAP ******************************************************************** 
           to retry, use: --limit @/var/tmp/ansible/edx_sandbox.retry

localhost                  : ok=98   changed=25   unreachable=0    failed=1  

When i try to access lms or studio, i get this error:

502 Bad Gateway
___________________________________
nginx/1.1.19

@jarv
Copy link
Contributor

jarv commented Aug 1, 2013

I just saw the permission issue referenced above, I believe it's due to the fact that our virtualenv is owned by root and some files are only readable by root and adm. We are changing around virtualenv management which will fix this but in the meantime I have this quick fix which will be merged as soon as it is reviewed - https://github.com/edx/configuration/pull/199

I think the second problem will also be fixed in that pull since edx-platform master is not stable, I have switched the default branch to the release branch which is probably a better branch to use in general.

@jarv
Copy link
Contributor

jarv commented Aug 1, 2013

I just confirmed that https://github.com/edx/configuration/pull/199 installs cleanly so I will close this, if you run into the same error using that branch (or after it's merged) let us know.

@jarv jarv closed this as completed Aug 1, 2013
@elimence
Copy link
Author

elimence commented Aug 1, 2013

Just tried it, but failure occured at the same point as indicated below:

TASK: [stop edxapp services] ************************************************** 
failed: [localhost] => {"failed": true, "item": ""}
msg: stop: Job has already been stopped: edxapp


FATAL: all hosts have already failed -- aborting

PLAY RECAP ******************************************************************** 
           to retry, use: --limit @/var/tmp/ansible/edx_sandbox.retry

localhost                  : ok=98   changed=25   unreachable=0    failed=1  

When i try to access lms or studio, i get this error:

502 Bad Gateway
___________________________________
nginx/1.1.19

@plejik-zz
Copy link

How you solve [TASK: gather lms static assets with rake] ?

@elimence
Copy link
Author

That error was resolved by pull request 201 (at least for me, it was resolved after merging that)
Just make sure you have the latest updates from the default branch and try running the ansible thing again.
Have you been able to get the system running previously?
What platform are you working on and is it local or remote (eg ec2)
Anyways, if you already have the latest code, i think you should create a new issue with some more specifics

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants