Studio Display Issue

758 views
Skip to first unread message

Patrick Karjala

unread,
Oct 31, 2013, 5:50:20 PM10/31/13
to edx-...@googlegroups.com
Just got edX up and running on an Ubuntu 12.04 Virtual Machine in OpenStack, and it looks great on the front end and admin side.

However, when accessing the Studio portion of the site, it images are missing, and the layout isn't functioning properly; it comes up as a plain HTML page.

I've attached a screenshot as an example.

Thank you for any assistance that can be provided.
layout copy.png

Patrick Karjala

unread,
Nov 1, 2013, 6:12:34 PM11/1/13
to edx-...@googlegroups.com
After some additional digging around, I was at least able to find a few more bits of information.

1)  The supporting files (.css, images, etc) do exist on the server in the following directory:  /opt/wwc/staticfiles/2428b3c
2)  ngnix is pointing to the files via the following script:

location ~ /static/(?P<file>.*) {
    root /opt/wwc;
    try_files /staticfiles/$file /course_static/$file =404;

However, when loading the site at IP_ADDRESS:18010, I see the following errors:


Failed to load resource: the server responded with a status of 404 (NOT FOUND)
http://IP_ADDRESS:18010/css/cms-base-style.css
Failed to load resource: the server responded with a status of 404 (NOT FOUND) http://IP_ADDRESS:18010/js/vendor/markitup/skins/simple/style.css
Failed to load resource: the server responded with a status of 404 (NOT FOUND) http://IP_ADDRESS:18010/js/vendor/markitup/sets/wiki/style.css
Failed to load resource: the server responded with a status of 404 (NOT FOUND) http://IP_ADDRESS:18010/js/vendor/CodeMirror/codemirror.css
Failed to load resource: the server responded with a status of 404 (NOT FOUND) http://IP_ADDRESS:18010/js/vendor/require.js
Failed to load resource: the server responded with a status of 404 (NOT FOUND) http://IP_ADDRESS:18010/img/logo-edx-studio.png
Failed to load resource: the server responded with a status of 404 (NOT FOUND) http://IP_ADDRESS:18010/img/thumb-hiw-feature1.png
Failed to load resource: the server responded with a status of 404 (NOT FOUND) http://IP_ADDRESS:18010/img/thumb-hiw-feature3.png
Failed to load resource: the server responded with a status of 404 (NOT FOUND) http://IP_ADDRESS:18010/img/thumb-hiw-feature2.png
Failed to load resource: the server responded with a status of 404 (NOT FOUND) http://IP_ADDRESS:18010/img/hiw-feature1.png
Failed to load resource: the server responded with a status of 404 (NOT FOUND) http://IP_ADDRESS:18010/img/hiw-feature2.png
Failed to load resource: the server responded with a status of 404 (NOT FOUND)http://IP_ADDRESS:18010/img/hiw-feature3.png


The server logs show the following error:

Nov  1 11:58:19 testing-edx [service_variant=cms][static_replace][env:sandbox] WARNING [testing-edx  13327] [__init__.py:40] - staticfiles_storage couldn't find path css/cms-base-style.css: The file 'css/cms-base-style.css' could not be found with <pipeline.storage.PipelineCachedStorage object at 0x4ea0b50>.

Checking the permissions on the files in /opt/wwc/staticfiles/2428b3c/ shows that they are correctly owned by www-data and in the group adm, which matches other similar files in the directory tree.

Patrick Karjala

unread,
Nov 8, 2013, 3:18:43 PM11/8/13
to edx-...@googlegroups.com
Any thoughts?  I'm shy of just nuking the VM and installing again from scratch, but I'd like to know if this is something that I'm going to run into again if I do.

Chris Dodge

unread,
Nov 8, 2013, 4:03:59 PM11/8/13
to edx-...@googlegroups.com
Can you trying using the vagrant image installation directions that is on the repo Wiki?

By eye it looks like the Django "gather assets" is not working for you.

Patrick Karjala

unread,
Nov 12, 2013, 1:18:53 PM11/12/13
to edx-...@googlegroups.com
Thanks Chris,

Do you mean use the Vagrant instructions for the actual VM, or set up a separate Vagrant instance and install on there?

Samuel Soubeyran

unread,
Nov 13, 2013, 5:37:20 AM11/13/13
to edx-...@googlegroups.com
I ran in a similar issue by having DEBUG = True in my env/aws.py. It was on the LMS, so maybe it is not relevant to your problem but you might want to check.

Patrick Karjala

unread,
Nov 14, 2013, 7:29:12 PM11/14/13
to edx-...@googlegroups.com
Thanks for the tip Samuel.

I checked and all instances of aws.py have the value DEBUG = false set.

Juanan Pereira

unread,
Dec 21, 2013, 10:58:20 AM12/21/13
to Patrick Karjala, edx-...@googlegroups.com
Hi Patrick,

  did you solve this issue? It seems that it is a common problem ... but I haven't found a solution yet...




--
Ongi izan,

Juanan Pereira
Babelium Project:  http://babeliumproject.com
Euskal Herriko Unibertsitatea (EHU)
Bilboko Industria Ingeniaritza Teknikoko Unibertsitate Eskola
juanan....@ehu.es
Tel: 678 658 733 & (946 01) 7419

Yarko Tymciurak

unread,
Dec 21, 2013, 11:28:08 AM12/21/13
to Juanan Pereira, edx-...@googlegroups.com, Patrick Karjala

There have been some significant updates in github.com/edx/configuration as of yesterday - suggest you try a fresh installation with the new setup.

Paras Doshi

unread,
Apr 14, 2014, 3:31:12 AM4/14/14
to edx-...@googlegroups.com
Hi Patrick,

I am facing the same issue

Did you find a resolution?

Thanks,
Paras

Marcello Pontes

unread,
Jun 10, 2014, 2:01:27 PM6/10/14
to edx-...@googlegroups.com
Did any of you guys manage to get this working?

I've installed a brand new vagrant vm this week.

I also tried updating from repo, rebuilding, executing what's written in [https://groups.google.com/forum/#!topic/edx-code/ALm-vKXnSHg] it but.. no go.

Jay Zoldak

unread,
Jun 10, 2014, 2:30:43 PM6/10/14
to edx-code
This occurs when the static assets have not been compiled.

The paver commands will do this for you.
Are you on devstack? How did you start up the server?

-- JZ

Marcello Pontes

unread,
Jun 10, 2014, 3:22:24 PM6/10/14
to edx-...@googlegroups.com
I am actually on a production stack.

I brought my server up using this guide:

I had no issue bringing it up.

The only change i did was to modify /edx/app/supervisor/conf.d/cms.conf to replace 127.0.0.1 for 0.0.0.0.

What seemed weird for me was the path it generated:
Jun 10 19:01:39 precise64 [service_variant=cms][django.request][env:sandbox] WARNING [precise64  1827] [base.py:142] - Not Found: /static/19b6718/img/logo-edx-studio.ac97954b353a.png


Thanks,
Marcello

SUMAN GHOSH

unread,
Feb 4, 2015, 9:57:46 AM2/4/15
to edx-...@googlegroups.com
Hello Jesse,want your help here I have installed edX production successfully on ubuntu 12.04 server and its up & running but when I try to compile assets manually I get the following error incase of CMS only can you please check and say where am I getting wrong :-

$ paver update_assets cms --settings=aws



---> pavelib.assets.update_assets
---> pavelib.prereqs.install_ruby_
prereqs
---> pavelib.prereqs.install_node_prereqs
python manage.py cms --settings=aws preprocess_assets


2015-02-04 08:10:02,512 INFO 13492 [dd.dogapi] dog_stats_api.py:66 - Initializing dog api to use statsd: localhost, 8125
xmodule_assets common/static/xmodule
---> pavelib.assets.compile_coffeescript
node_modules/.bin/coffee --compile `find /edx/app/edxapp/edx-platform/lms /edx/app/edxapp/edx-platform/cms /edx/app/edxapp/edx-platform/common -type f -name "*.coffee"`


sass --style compressed  --cache-location /tmp/sass-cache --load-path ./common/static/sass --update -E utf-8 */static
      write lms/static/sass/application-extend1-rtl.css
      write lms/static/sass/application-extend1.css
      write lms/static/sass/application-extend2-rtl.css
DEPRECATION WARNING on line 32 of lms/static/sass/views/_login-register.scss:
Assigning to global variable "$grid-columns" by default is deprecated.
In future versions of Sass, this will create a new local variable.
If you want to assign to the global variable, use "$grid-columns: 12 !global" instead.
Note that this will be incompatible with Sass 3.2.

      write lms/static/sass/application-extend2.css
      write lms/static/sass/application-rtl.css
      write lms/static/sass/application.css


      write lms/static/sass/course-rtl.css
      write lms/static/sass/course.css
python manage.py cms --settings=aws collectstatic --noinput > /dev/null
2015-02-04 08:10:35,827 INFO 13736 [dd.dogapi] dog_stats_api.py:66 - Initializing dog api to use statsd: localhost, 8125


Traceback (most recent call last):
  File "manage.py", line 116, in <module>
    execute_from_command_line([sys.argv[0]] + django_args)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 443, in execute_from_command_line
    utility.execute()
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 382, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/management/base.py", line 196, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/management/base.py", line 232, in execute
    output = self.handle(*args, **options)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/management/base.py", line 371, in handle
    return self.handle_noargs(**options)
  File "/edx/app/edxapp/venvs/edxapp/src/django-staticfiles/staticfiles/management/commands/collectstatic.py", line 169, in handle_noargs
    collected = self.collect()
  File "/edx/app/edxapp/venvs/edxapp/src/django-staticfiles/staticfiles/management/commands/collectstatic.py", line 126, in collect
    for original_path, processed_path, processed in processor:
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/require/storage.py", line 108, in post_process
    baseUrl = require_settings.REQUIRE_BASE_URL,
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/require/storage.py", line 52, in run_optimizer
    raise OptimizationError("Error while running r.js optimizer.")
require.storage.OptimizationError: Error while running r.js optimizer.


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

---> pavelib.assets.update_assets
---> pavelib.prereqs.install_ruby_prereqs
---> pavelib.prereqs.install_node_prereqs
python manage.py cms --settings=aws preprocess_assets
xmodule_assets common/static/xmodule
---> pavelib.assets.compile_coffeescript
node_modules/.bin/coffee --compile `find /edx/app/edxapp/edx-platform/lms /edx/app/edxapp/edx-platform/cms /edx/app/edxapp/edx-platform/common -type f -name "*.coffee"`
sass --style compressed  --cache-location /tmp/sass-cache --load-path ./common/static/sass --update -E utf-8 */static
python manage.py cms --settings=aws collectstatic --noinput > /dev/null

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

Carlos H

unread,
May 28, 2015, 5:18:53 PM5/28/15
to edx-...@googlegroups.com
Dear All,

I'm facing the same issue after internationalize my new full stack installation (Ubuntu 12.04 Full stack) by following this https://github.com/edx/edx-platform/wiki/Internationalization-and-localization

http://edx2.solexi.net:18010/

Help please



_______________________________________________________________________________________________________________

Reid Ransom

unread,
Jun 3, 2015, 6:46:28 PM6/3/15
to edx-...@googlegroups.com
I was having this same issue today and found that STATIC_URL and STATIC_ROOT are based on the hash of the latest git commit:

https://github.com/edx/edx-platform/blob/master/cms/envs/common.py#L404-L416

This is why you end up with file paths like `/static/19b6718/img/logo-edx-studio.ac97954b353a.png` (from above) where `19b6718` changes with each git commit.  To avoid requiring to run collectstatic (or paver update_assets) and supervisorctl restart every time I update my fullstack server I just hardcoded my current git commit hash into my cms settings file:

https://github.com/DefyVentures/edx-platform/commit/aa6bd31e150257d004e4bba40b78bf452bc775cd

A cleaner solution would be to set the EDX_PLATFORM_REVISION environment variable so you could control this from config instead.. but this works for me.

Leonardo Meurer

unread,
Jun 30, 2015, 3:45:17 PM6/30/15
to edx-...@googlegroups.com

Leonardo Meurer

unread,
Jun 30, 2015, 3:45:18 PM6/30/15
to edx-...@googlegroups.com

Dear Carlos H,

i did the same thing, and after internationalization i got this issue.

How did u solve this?

Tks

Leninlal K

unread,
Jul 1, 2015, 5:57:04 AM7/1/15
to edx-...@googlegroups.com
I faced the same issue but after compiling javascript and css manullay it is fixed. 
   sudo -H -u edxapp bash
   source /edx/app/edxapp/edxapp_env
   cd /edx/app/edxapp/edx-platform
   paver update_assets cms --settings=aws
   paver update_assets lms --settings=aws

Zachary Trabookis

unread,
Sep 10, 2015, 3:46:51 PM9/10/15
to General Open edX discussion
@nedbat suggested that I run the following command instead of paver update_assets lms --settings=aws for more details as to why I was getting this error.

Traceback (most recent call last):
  File "manage.py", line 116, in <module>
    execute_from_command_line([sys.argv[0]] + django_args)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 443, in execute_from_command_line
    utility.execute()
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 382, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/management/base.py", line 196, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/management/base.py", line 232, in execute
    output = self.handle(*args, **options)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/management/base.py", line 371, in handle
    return self.handle_noargs(**options)
  File "/edx/app/edxapp/venvs/edxapp/src/django-staticfiles/staticfiles/management/commands/collectstatic.py", line 169, in handle_noargs
    collected = self.collect()
  File "/edx/app/edxapp/venvs/edxapp/src/django-staticfiles/staticfiles/management/commands/collectstatic.py", line 126, in collect
    for original_path, processed_path, processed in processor:
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/require/storage.py", line 108, in post_process
    baseUrl = require_settings.REQUIRE_BASE_URL,
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/require/storage.py", line 52, in run_optimizer
    raise OptimizationError("Error while running r.js optimizer.")
require.storage.OptimizationError: Error while running r.js optimizer.


Run this command for more details.

edxapp@educateworkforce-dev-ztraboo:~/edx-platform$
     python manage.py cms --settings=aws collectstatic --noinput

Here are the results that I need to resolve this problem.
Error: Parse error using esprima for file: /tmp/tmpzFaCF8/js/views/settings/main.js
Error: Line 393: Unexpected identifier
In module tree:
    js/factories/settings

Error: Error: Parse error using esprima for file: /tmp/tmpzFaCF8/js/views/settings/main.js
Error: Line 393: Unexpected identifier
In module tree:
    js/factories/settings

    at /edx/app/edxapp/venvs/edxapp/lib/python2.7/site-packages/require/resources/r.js:25301:47

Traceback (most recent call last):
  File "manage.py", line 116, in <module>
    execute_from_command_line([sys.argv[0]] + django_args)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 443, in execute_from_command_line
    utility.execute()
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 382, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/management/base.py", line 196, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/management/base.py", line 232, in execute
    output = self.handle(*args, **options)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/management/base.py", line 371, in handle
    return self.handle_noargs(**options)
  File "/edx/app/edxapp/venvs/edxapp/src/django-staticfiles/staticfiles/management/commands/collectstatic.py", line 169, in handle_noargs
    collected = self.collect()
  File "/edx/app/edxapp/venvs/edxapp/src/django-staticfiles/staticfiles/management/commands/collectstatic.py", line 126, in collect
    for original_path, processed_path, processed in processor:
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/require/storage.py", line 108, in post_process
    baseUrl = require_settings.REQUIRE_BASE_URL,
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/require/storage.py", line 52, in run_optimizer
    raise OptimizationError("Error while running r.js optimizer.")
require.storage.OptimizationError: Error while running r.js optimizer.


I resolved this by fixing the missing comma and updating the assets again.

Vladas Tamoshaitis

unread,
Oct 6, 2015, 9:11:07 AM10/6/15
to General Open edX discussion
If you get 404 errors for static files like .../static/unknown/.../cms-main.css then
In my case it turned out that i had invalid permissions for .git
Path for static assets is built with string value of last commit hash that usually is placed instead "unknown" and when trying to fetch that value TypeError is raised

четверг, 31 октября 2013 г., 23:50:20 UTC+2 пользователь Patrick Karjala написал:
Reply all
Reply to author
Forward
0 new messages