dashboard Error: Unable to retrieve instance list.

Asked by neha rawat

Hi,

I am working on openstack essex.

When i am trying to access dashboard its showing below error :

1) Admin -> overview -> Error: Unable to retrieve usage information.
2) Admin->instances -> Error: Unable to retrieve instance list. ( and redirecting to login prompt).
3)Admin ->flavours -> Error: Unauthorized.

other services , images, projects,users are working fine.

Following error is coming in apche2/error.log for flavors.

root@nova:/var/log/glance# tail /var/log/apache2/error.log
[Tue Jun 12 12:15:17 2012] [error] return novaclient(request).flavors.list()
[Tue Jun 12 12:15:17 2012] [error] File "/usr/lib/python2.7/dist-packages/novaclient/v1_1/flavors.py", line 39, in list
[Tue Jun 12 12:15:17 2012] [error] return self._list("/flavors/detail", "flavors")
[Tue Jun 12 12:15:17 2012] [error] File "/usr/lib/python2.7/dist-packages/novaclient/base.py", line 71, in _list
[Tue Jun 12 12:15:17 2012] [error] resp, body = self.api.client.get(url)
[Tue Jun 12 12:15:17 2012] [error] File "/usr/lib/python2.7/dist-packages/novaclient/client.py", line 136, in get
[Tue Jun 12 12:15:17 2012] [error] return self._cs_request(url, 'GET', **kwargs)
[Tue Jun 12 12:15:17 2012] [error] File "/usr/lib/python2.7/dist-packages/novaclient/client.py", line 133, in _cs_request
[Tue Jun 12 12:15:17 2012] [error] raise ex
[Tue Jun 12 12:15:17 2012] [error] Unauthorized: n/a (HTTP 401)

i am not sure where to find logs for dashboard error - Error: Unable to retrieve instance list.
Please provide the help at the earliest.

Thanks & Regards,
Neha

Question information

Language:
English Edit question
Status:
Expired
For:
OpenStack Dashboard (Horizon) Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Gabriel Hurley (gabriel-hurley) said :
#1

It looks like there's something amiss with your Nova->Keystone auth integration. That would explain why Overview (e.g. Usages), Instances and Flavors don't work while others do: all of those come from nova (through python-novaclient), while the others talk to Glance, Keystone, etc.

Since you're getting a 401 Unauthorized that means Keystone is rejecting the auth data that's being transferred between Nova and Keystone (generally a Keystone token when using Horizon).

As to *what* is wrong with your setup, I have no idea. We'd need more information about how you installed OpenStack (particularly Nova and Keystone), what's in your conf files, etc.

I'd start by checking the Nova and Keystone logs, personally.

Revision history for this message
neha rawat (neha86rawat) said :
#2

Hi Gabriel,

Thanks for your quick response.Before i could figure out the reason for Dashboard not working properly. I have been caught in another problem with my nova-compute service. I am unable to start my nova-compute service. The following error is appearing on my nova-compute log
2012-06-14 12:15:10 TRACE nova File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 171, in decorated_function
2012-06-14 12:15:10 TRACE nova return function(self, context, instance_uuid, *args, **kwargs)
2012-06-14 12:15:10 TRACE nova File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 896, in reboot_instance
2012-06-14 12:15:10 TRACE nova network_info = self._get_instance_nw_info(context, instance)
2012-06-14 12:15:10 TRACE nova File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 313, in _get_instance_nw_info
2012-06-14 12:15:10 TRACE nova instance)
2012-06-14 12:15:10 TRACE nova File "/usr/lib/python2.7/dist-packages/nova/network/api.py", line 219, in get_instance_nw_info
2012-06-14 12:15:10 TRACE nova 'args': args})
2012-06-14 12:15:10 TRACE nova File "/usr/lib/python2.7/dist-packages/nova/rpc/__init__.py", line 68, in call
2012-06-14 12:15:10 TRACE nova return _get_impl().call(context, topic, msg, timeout)
2012-06-14 12:15:10 TRACE nova File "/usr/lib/python2.7/dist-packages/nova/rpc/impl_kombu.py", line 674, in call
2012-06-14 12:15:10 TRACE nova return rpc_amqp.call(context, topic, msg, timeout, Connection.pool)
2012-06-14 12:15:10 TRACE nova File "/usr/lib/python2.7/dist-packages/nova/rpc/amqp.py", line 338, in call
2012-06-14 12:15:10 TRACE nova rv = list(rv)
2012-06-14 12:15:10 TRACE nova File "/usr/lib/python2.7/dist-packages/nova/rpc/amqp.py", line 299, in __iter__
2012-06-14 12:15:10 TRACE nova self._iterator.next()
2012-06-14 12:15:10 TRACE nova File "/usr/lib/python2.7/dist-packages/nova/rpc/impl_kombu.py", line 572, in iterconsume
2012-06-14 12:15:10 TRACE nova yield self.ensure(_error_callback, _consume)
2012-06-14 12:15:10 TRACE nova File "/usr/lib/python2.7/dist-packages/nova/rpc/impl_kombu.py", line 503, in ensure
2012-06-14 12:15:10 TRACE nova error_callback(e)
2012-06-14 12:15:10 TRACE nova File "/usr/lib/python2.7/dist-packages/nova/rpc/impl_kombu.py", line 553, in _error_callback
2012-06-14 12:15:10 TRACE nova raise rpc_common.Timeout()
2012-06-14 12:15:10 TRACE nova Timeout: Timeout while waiting on RPC response.

nova-manage service list is appearing as follows:
inary Host Zone Status State Updated_At
nova-scheduler nova nova enabled :-) 2012-06-14 06:51:10
nova-network nova nova enabled :-) 2012-06-14 06:51:15
nova-cert nova nova enabled :-) 2012-06-14 06:51:12
nova-compute nova nova enabled XXX 2012-06-13 11:00:42

There are no other errors in nova-network nova-api or nova-manage logs.

My nova.conf file is as follows:

root@nova:~# cat /etc/nova/nova.conf
--dhcpbridge_flagfile=/etc/nova/nova.conf
--dhcpbridge=/usr/bin/nova-dhcpbridge
--logdir=/var/log/nova
--state_path=/var/lib/nova
--lock_path=/var/lock/nova
--allow_admin_api=true
--use_deprecated_auth=false
--scheduler_driver=nova.scheduler.simple.SimpleScheduler
--force_dhcp_release
--iscsi_helper=tgtadm
--libvirt_use_virtio_for_bridges=true
--connection_type=libvirt
--root_helper=sudo nova-rootwrap
--verbose
--ec2_private_dns_show_ip
--s3_host=192.168.1.100
--rabbit_host=192.168.1.100
--cc_host=192.168.1.100
--ec2_host=192.168.1.100
--osapi_host=192.168.1.100
--fixed_range=192.168.1.0/24
--network_size=10
--FAKE_subdomain=ec2
--routing_source_ip=192.168.1.100
--verbose
--sql_connection=mysql://root:password@192.168.1.100/nova
--network_manager=nova.network.manager.FlatDHCPManager
--flat_interface=eth0
--flat_network_bridge=br100
--flat_injected=False
--glance_api_servers=192.168.1.100:9292
--image_service=nova.image.glance.GlanceImageService
--libvirt-type=kvm
--nova_url=http://192.168.1.100:8774/v1.1/
--ec2_url=http://192.168.1.100:8773/services/Cloud
--keystone_ec2_url=http://192.168.1.100:5000/v2.0/ec2tokens
--api_paste_config=/etc/nova/api-paste.ini
--novnc_enabled=true
--novncproxy_base_url=http://192.168.1.100:6080/vnc_auto.html
--vncserver_proxyclient_address=192.168.1.100
--vncserver_listen=192.168.1.100
--auth_strategy=keystone
--start_guests_on_host_boot=true
--resume_guests_on_host_boot=true
--osapi_compute_extension=nova.api.openstack.compute.contrib.standard_extensions

My Keystone.conf is as follows:

root@nova:~# cat /etc/keystone/keystone.conf
[DEFAULT]
#bind_host = 0.0.0.0
public_port = 5000
admin_port = 35357
admin_token = admin
compute_port = 8774
verbose = True
debug = True
log_config = /etc/keystone/logging.conf

# ================= Syslog Options ============================
# Send logs to syslog (/dev/log) instead of to file specified
# by `log-file`
use_syslog = False
log-file=/var/log/keystone/keystone.log
# Facility to use. If unset defaults to LOG_USER.
# syslog_log_facility = LOG_LOCAL0

[sql]
connection = mysql://keystonedbadmin:password@192.168.1.100/keystone
idle_timeout = 200

[ldap]
#url = ldap://localhost
#tree_dn = dc=example,dc=com
#user_tree_dn = ou=Users,dc=example,dc=com
#role_tree_dn = ou=Roles,dc=example,dc=com
#tenant_tree_dn = ou=Groups,dc=example,dc=com
#user = dc=Manager,dc=example,dc=com
#password = freeipa4all
#suffix = cn=example,cn=com

[identity]
driver = keystone.identity.backends.sql.Identity

[catalog]
driver = keystone.catalog.backends.sql.Catalog

[token]
driver = keystone.token.backends.sql.Token

# Amount of time a token should remain valid (in seconds)
expiration = 86400

[policy]
driver = keystone.policy.backends.rules.Policy

[ec2]
driver = keystone.contrib.ec2.backends.sql.Ec2

[filter:debug]
paste.filter_factory = keystone.common.wsgi:Debug.factory

[filter:token_auth]
paste.filter_factory = keystone.middleware:TokenAuthMiddleware.factory

[filter:admin_token_auth]
paste.filter_factory = keystone.middleware:AdminTokenAuthMiddleware.factory

[filter:xml_body]
paste.filter_factory = keystone.middleware:XmlBodyMiddleware.factory

[filter:json_body]
paste.filter_factory = keystone.middleware:JsonBodyMiddleware.factory

[filter:crud_extension]
paste.filter_factory = keystone.contrib.admin_crud:CrudExtension.factory

[filter:ec2_extension]
paste.filter_factory = keystone.contrib.ec2:Ec2Extension.factory

[app:public_service]
paste.app_factory = keystone.service:public_app_factory

[app:admin_service]
paste.app_factory = keystone.service:admin_app_factory

[pipeline:public_api]
pipeline = token_auth admin_token_auth xml_body json_body debug ec2_extension public_service

[pipeline:admin_api]
pipeline = token_auth admin_token_auth xml_body json_body debug ec2_extension crud_extension admin_service

[app:public_version_service]
paste.app_factory = keystone.service:public_version_app_factory

[app:admin_version_service]
paste.app_factory = keystone.service:admin_version_app_factory

[pipeline:public_version_api]
pipeline = xml_body public_version_service

[pipeline:admin_version_api]
pipeline = xml_body admin_version_service

[composite:main]
use = egg:Paste#urlmap
/v2.0 = public_api
/ = public_version_api

[composite:admin]
use = egg:Paste#urlmap
/v2.0 = admin_api
/ = admin_version_api

Please let me know if there is any mistake in the configuration file. Thanks for your help.

Revision history for this message
Gabriel Hurley (gabriel-hurley) said :
#3

You should ask for help debugging Nova from the Nova team. That's not our area of expertise.

Revision history for this message
neha rawat (neha86rawat) said :
#4

Hi Gabriel,

Thanks for your suggestion, i checked with nova team and now nova-compute service is running.
But still same issue with horizon.

My nova.conf file is as follows:

root@nova:~# cat /etc/nova/nova.conf
--dhcpbridge_flagfile=/etc/nova/nova.conf
--dhcpbridge=/usr/bin/nova-dhcpbridge
--logdir=/var/log/nova
--state_path=/var/lib/nova
--lock_path=/var/lock/nova
--allow_admin_api=true
--use_deprecated_auth=false
--scheduler_driver=nova.scheduler.simple.SimpleScheduler
--force_dhcp_release
--iscsi_helper=tgtadm
--libvirt_use_virtio_for_bridges=true
--connection_type=libvirt
--root_helper=sudo nova-rootwrap
--verbose
--ec2_private_dns_show_ip
--s3_host=192.168.1.100
--rabbit_host=192.168.1.100
--cc_host=192.168.1.100
--ec2_host=192.168.1.100
--osapi_host=192.168.1.100
--fixed_range=192.168.1.0/24
--network_size=10
--FAKE_subdomain=ec2
--routing_source_ip=192.168.1.100
--verbose
--sql_connection=mysql://root:password@192.168.1.100/nova
--network_manager=nova.network.manager.FlatDHCPManager
--flat_interface=eth0
--flat_network_bridge=br100
--flat_injected=False
--glance_api_servers=192.168.1.100:9292
--image_service=nova.image.glance.GlanceImageService
--libvirt-type=kvm
--nova_url=http://192.168.1.100:8774/v1.1/
--ec2_url=http://192.168.1.100:8773/services/Cloud
--keystone_ec2_url=http://192.168.1.100:5000/v2.0/ec2tokens
--api_paste_config=/etc/nova/api-paste.ini
--novnc_enabled=true
--novncproxy_base_url=http://192.168.1.100:6080/vnc_auto.html
--vncserver_proxyclient_address=192.168.1.100
--vncserver_listen=192.168.1.100
--auth_strategy=keystone
--start_guests_on_host_boot=true
--resume_guests_on_host_boot=true
--osapi_compute_extension=nova.api.openstack.compute.contrib.standard_extensions

My Keystone.conf is as follows:

root@nova:~# cat /etc/keystone/keystone.conf
[DEFAULT]
#bind_host = 0.0.0.0
public_port = 5000
admin_port = 35357
admin_token = admin
compute_port = 8774
verbose = True
debug = True
log_config = /etc/keystone/logging.conf

# ================= Syslog Options ============================
# Send logs to syslog (/dev/log) instead of to file specified
# by `log-file`
use_syslog = False
log-file=/var/log/keystone/keystone.log
# Facility to use. If unset defaults to LOG_USER.
# syslog_log_facility = LOG_LOCAL0

[sql]
connection = mysql://keystonedbadmin:password@192.168.1.100/keystone
idle_timeout = 200

[ldap]
#url = ldap://localhost
#tree_dn = dc=example,dc=com
#user_tree_dn = ou=Users,dc=example,dc=com
#role_tree_dn = ou=Roles,dc=example,dc=com
#tenant_tree_dn = ou=Groups,dc=example,dc=com
#user = dc=Manager,dc=example,dc=com
#password = freeipa4all
#suffix = cn=example,cn=com

[identity]
driver = keystone.identity.backends.sql.Identity

[catalog]
driver = keystone.catalog.backends.sql.Catalog

[token]
driver = keystone.token.backends.sql.Token

# Amount of time a token should remain valid (in seconds)
expiration = 86400

[policy]
driver = keystone.policy.backends.rules.Policy

[ec2]
driver = keystone.contrib.ec2.backends.sql.Ec2

[filter:debug]
paste.filter_factory = keystone.common.wsgi:Debug.factory

[filter:token_auth]
paste.filter_factory = keystone.middleware:TokenAuthMiddleware.factory

[filter:admin_token_auth]
paste.filter_factory = keystone.middleware:AdminTokenAuthMiddleware.factory

[filter:xml_body]
paste.filter_factory = keystone.middleware:XmlBodyMiddleware.factory

[filter:json_body]
paste.filter_factory = keystone.middleware:JsonBodyMiddleware.factory

[filter:crud_extension]
paste.filter_factory = keystone.contrib.admin_crud:CrudExtension.factory

[filter:ec2_extension]
paste.filter_factory = keystone.contrib.ec2:Ec2Extension.factory

[app:public_service]
paste.app_factory = keystone.service:public_app_factory

[app:admin_service]
paste.app_factory = keystone.service:admin_app_factory

[pipeline:public_api]
pipeline = token_auth admin_token_auth xml_body json_body debug ec2_extension public_service

[pipeline:admin_api]
pipeline = token_auth admin_token_auth xml_body json_body debug ec2_extension crud_extension admin_service

[app:public_version_service]
paste.app_factory = keystone.service:public_version_app_factory

[app:admin_version_service]
paste.app_factory = keystone.service:admin_version_app_factory

[pipeline:public_version_api]
pipeline = xml_body public_version_service

[pipeline:admin_version_api]
pipeline = xml_body admin_version_service

[composite:main]
use = egg:Paste#urlmap
/v2.0 = public_api
/ = public_version_api

[composite:admin]
use = egg:Paste#urlmap
/v2.0 = admin_api
/ = admin_version_api

Please let me know if there is any mistake in the configuration file. Thanks for your help.

Revision history for this message
Launchpad Janitor (janitor) said :
#5

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
VangelisAngelou (vagoskar) said :
#6

Hello,

Has anyone found a solution for this yet? I get that there is a misconfiguration between dashboard and nova, but where exactly? Or is it a problem with incompatible API versions on ubuntu precise?

Thanks!

Revision history for this message
techmate (techmate250) said :
#7

Hi neha rawat,

I am facing a similar issue with images list.
can u provide the glance-registry-paste.ini and glance-api-paste.ini please.

Thanks in advance

Revision history for this message
Vignesh sankaran (viki-infotech01) said :
#8

hi,
i am also having that error but with network list. it cannot be retrieved to dashboard.pls provide me with a solution

Regards.
Vignesh