Error accessing Dashboard server from browser client

Asked by Mauricio Arango on 2011-07-28

Hi,

I installed Openstack Dashboard per the instructions in http://wiki.openstack.org/OpenStackDashboard

 - I successfully start the openstack-dashboard server:

(.dashboard-venv)mauricio@openstack-ubuntu:~/src/openstack-dashboard/openstack-dashboard$ tools/with_venv.sh dashboard/manage.py runserver 0.0.0.0:8000
INFO:root:Running in debug mode without debug_toolbar.
INFO:root:Running in debug mode without debug_toolbar.
INFO:root:Running in debug mode without debug_toolbar.
INFO:root:Running in debug mode without debug_toolbar.
Validating models...

0 errors found
Django version 1.3, using settings 'dashboard.settings'
Development server is running at http://0.0.0.0:8000/
Quit the server with CONTROL-C.

- Successfully start the Keystone instance:

mauricio@openstack-ubuntu:~/src/keystone$ ./bin/keystone -v -d
Starting the Legacy Authentication component
Using config file: /home/mauricio/src/keystone/etc/keystone.conf
Service API listening on 0.0.0.0:5000
Admin API listening on 0.0.0.0:5001
eventlet.wsgi.server: DEBUG (4617) wsgi starting up on http://0.0.0.0:5000/
eventlet.wsgi.server: DEBUG (4617) wsgi starting up on http://0.0.0.0:5001/

- When I point my browser to http://localhost:8000/ I get the following error dump on the browser window:

ViewDoesNotExist at /

Could not import dashboard.views. Error was: No module named xattr

Request Method: GET
Request URL: http://localhost:8000/
Django Version: 1.3
Exception Type: ViewDoesNotExist
Exception Value:

Could not import dashboard.views. Error was: No module named xattr

Exception Location: /home/mauricio/src/openstack-dashboard/openstack-dashboard/.dashboard-venv/local/lib/python2.7/site-packages/django/core/urlresolvers.py in _get_callback, line 167
Python Executable: /home/mauricio/src/openstack-dashboard/openstack-dashboard/.dashboard-venv/bin/python
Python Version: 2.7.1
Python Path:

['/home/mauricio/src/openstack-dashboard/openstack-dashboard/dashboard',
 '/home/mauricio/src/openstack-dashboard/openstack-dashboard/.dashboard-venv/local/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg',
 '/home/mauricio/src/openstack-dashboard/openstack-dashboard/.dashboard-venv/local/lib/python2.7/site-packages/pip-1.0.2-py2.7.egg',
 '/home/mauricio/src/openstack-dashboard/openstack-dashboard/.dashboard-venv/src/openstack',
 '/home/mauricio/src/openstack-dashboard/openstack-dashboard/.dashboard-venv/src/openstackx',
 '/home/mauricio/src/openstack-dashboard/django-openstack',
 '/home/mauricio/src/openstack-dashboard/openstack-dashboard/.dashboard-venv/local/lib/python2.7/site-packages/mox-0.5.3-py2.7.egg',
 '/home/mauricio/src/openstack-dashboard/openstack-dashboard/.dashboard-venv/lib/python2.7',
 '/home/mauricio/src/openstack-dashboard/openstack-dashboard/.dashboard-venv/lib/python2.7/plat-linux2',
 '/home/mauricio/src/openstack-dashboard/openstack-dashboard/.dashboard-venv/lib/python2.7/lib-tk',
 '/home/mauricio/src/openstack-dashboard/openstack-dashboard/.dashboard-venv/lib/python2.7/lib-old',
 '/home/mauricio/src/openstack-dashboard/openstack-dashboard/.dashboard-venv/lib/python2.7/lib-dynload',
 '/usr/lib/python2.7',
 '/usr/lib/python2.7/plat-linux2',
 '/usr/lib/python2.7/lib-tk',
 '/home/mauricio/src/openstack-dashboard/openstack-dashboard/.dashboard-venv/local/lib/python2.7/site-packages',
 '/home/mauricio/src/openstack-dashboard/openstack-dashboard',
 '/home/mauricio/src/openstack-dashboard/openstack-dashboard/dashboard',
 '/home/mauricio/src/openstack-dashboard/openstack-dashboard/dashboard']

Server time: Thu, 28 Jul 2011 06:49:54 -0400
Traceback Switch to copy-and-paste view

    /home/mauricio/src/openstack-dashboard/openstack-dashboard/.dashboard-venv/local/lib/python2.7/site-packages/django/core/handlers/base.py in get_response

                                    request.path_info)

        ...
    ▶ Local vars
    /home/mauricio/src/openstack-dashboard/openstack-dashboard/.dashboard-venv/local/lib/python2.7/site-packages/django/core/urlresolvers.py in resolve

                            sub_match = pattern.resolve(new_path)

        ...
    ▶ Local vars
    /home/mauricio/src/openstack-dashboard/openstack-dashboard/.dashboard-venv/local/lib/python2.7/site-packages/django/core/urlresolvers.py in resolve

                    return ResolverMatch(self.callback, args, kwargs, self.name)

        ...
    ▶ Local vars
    /home/mauricio/src/openstack-dashboard/openstack-dashboard/.dashboard-venv/local/lib/python2.7/site-packages/django/core/urlresolvers.py in _get_callback

                    raise ViewDoesNotExist("Could not import %s. Error was: %s" % (mod_name, str(e)))

        ...
    ▶ Local vars

- I installed the Dashboard last Friday, following the same procedure and didn't have this problem, was getting access to the OpenStack Dashboard home page. I run into another problem and re-installed the system today and started having the above problem.

Any ideas on what could be the problem?
Thanks for your help.

Mauricio

Question information

Language:
English Edit question
Status:
Solved
For:
OpenStack Dashboard (Horizon) Edit question
Assignee:
No assignee Edit question
Solved by:
Mark Gius
Solved:
2011-07-31
Last query:
2011-07-31
Last reply:
2011-07-31
Mark Gius (markgius) said : #1

The Glance project recently updated their code to have a new dependency on the xattr module. Can you try re-rerunning

$ python tools/install_venv.py

Then re-running the dashboard to see if that picks up the missing dependency? That process worked for me but it is entirely possible I have xattr installed somewhere on my system masking this issue for me.

Thanks Mark,

Tried re-running
$ python tools/install_venv.py

but the problem continues......

Mauricio

Mark Gius (markgius) said : #3

Alright, that probably means I've got xattr installed through some other means. I'll take a look at this tomorrow, it probably means one of the dependencies files are out of date.

You can get around this in the meantime by installing xattr yourself through pip or easy_install.

$ pip install xattr
$ easy_install xattr

Depending on your setup you may need to run those with root privs.

Thank you very much for your help, Mark.

Unfortunately this didn't work. Tried restarting my machine and repeating the Dashboard reinstall, bu still get the same error.

Mauricio

Best Mark Gius (markgius) said : #5

How odd that the local install of xattr didn't work...

I added xattr to the list of dependencies for the dashboard, and was able to get the dashboard splash page to load successfully. That change has been pushed to 4P/openstack-dashboard/master

My system was Ubuntu 11.04 desktop, with the following packages installed through apt:

git
bzr
python-dev
vim-nox
python-virtualenv

I then checked out openstack-dashboard and ran

$ python tools/install_venv.py

Followed by creating local_settings.py and then running the dashboard. Splash page loaded successfully. I don't have anything else from openstack running right now so I haven't seen if any other glance functionality is broken.

Mark Gius (markgius) said : #6

I should note that the ubuntu system was a clean install of the OS.

This solved the problem.
Thank you very much,

Mauricio

Thanks Mark Gius, that solved my question.