Custom Search

Friday, May 3, 2013

Horizon Keystone ServiceCatalogException: Invalid service catalog service: compute

Error Log from Horizon
---------------------------------------

raise exceptions.ServiceCatalogException(service_type)
ServiceCatalogException: Invalid service catalog service: compute

Solution
-------------- 

0)
Your /etc/keystone/keystone.conf file should contain the following lines if it is properly configured to use the database backend.
[catalog]
driver = keystone.catalog.backends.sql.Catalog

1)
#cd install_dir/horizon
#source .venv/bin/activate
#export OS_SERVICE_TOKEN="ADMIN"
#export OS_SERVICE_ENDPOINT=http://localhost:35357/v2.0

2)
#keystone service-list

3)
#keystone service-create --name=nova --type=compute --description="Compute Service"

4)
#keystone service-list

5)
#keystone endpoint-list

6)
#keystone endpoint-create \
 --region RegionOne \
 --service-id=3dca0574e07143d3a11fb5107851933f \
 --publicurl='http://localhost:8774/v2/%(tenant_id)s' \
 --internalurl='http://localhost:8774/v2/%(tenant_id)s' \
 --adminurl='http://localhost:8774/v2/%(tenant_id)s'

7)
#keystone endpoint-list

8)
#cd install_dir/keystone
#source .venv/bin/activate
#./bin/keystone-all

9)
#cd install_dir/horizon
#source .venv/bin/activate
#python manage.py runserver

10)
*Goto Horizon and try to login again
http://127.0.0.1:8000/auth/login/

Reference link
-----------------------

http://docs.openstack.org/trunk/openstack-compute/install/yum/content/defining-services.html
http://docs.openstack.org/trunk/openstack-compute/install/yum/content/keystone-service-endpoint-create.html

Complete Error Log from Horizon
--------------------------------------------------------

DEBUG:openstack_auth.backend:Beginning user authentication for user "admin".
DEBUG:openstack_auth.backend:Authentication completed for user "admin".
[02/May/2013 19:11:47] "POST /auth/login/ HTTP/1.1" 302 0
[02/May/2013 19:11:47] "GET / HTTP/1.1" 302 0
ERROR:django.request:Internal Server Error: /admin/
Traceback (most recent call last):
  File "/home/saju/ops_manual/horizon/.venv/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 111, in get_response
    response = callback(request, *callback_args, **callback_kwargs)
  File "/home/saju/ops_manual/horizon/horizon/decorators.py", line 38, in dec
    return view_func(request, *args, **kwargs)
  File "/home/saju/ops_manual/horizon/horizon/decorators.py", line 86, in dec
    return view_func(request, *args, **kwargs)
  File "/home/saju/ops_manual/horizon/horizon/decorators.py", line 54, in dec
    return view_func(request, *args, **kwargs)
  File "/home/saju/ops_manual/horizon/horizon/decorators.py", line 38, in dec
    return view_func(request, *args, **kwargs)
  File "/home/saju/ops_manual/horizon/horizon/decorators.py", line 86, in dec
    return view_func(request, *args, **kwargs)
  File "/home/saju/ops_manual/horizon/.venv/local/lib/python2.7/site-packages/django/views/generic/base.py", line 48, in view
    return self.dispatch(request, *args, **kwargs)
  File "/home/saju/ops_manual/horizon/.venv/local/lib/python2.7/site-packages/django/views/generic/base.py", line 69, in dispatch
    return handler(request, *args, **kwargs)
  File "/home/saju/ops_manual/horizon/horizon/tables/views.py", line 155, in get
    handled = self.construct_tables()
  File "/home/saju/ops_manual/horizon/horizon/tables/views.py", line 146, in construct_tables
    handled = self.handle_table(table)
  File "/home/saju/ops_manual/horizon/horizon/tables/views.py", line 118, in handle_table
    data = self._get_data_dict()
  File "/home/saju/ops_manual/horizon/horizon/tables/views.py", line 182, in _get_data_dict
    self._data = {self.table_class._meta.name: self.get_data()}
  File "/home/saju/ops_manual/horizon/openstack_dashboard/dashboards/admin/overview/views.py", line 41, in get_data
    data = super(GlobalOverview, self).get_data()
  File "/home/saju/ops_manual/horizon/openstack_dashboard/usage/views.py", line 33, in get_data
    self.usage.summarize(*self.usage.get_date_range())
  File "/home/saju/ops_manual/horizon/openstack_dashboard/usage/base.py", line 98, in summarize
    _('Unable to retrieve usage information.'))
  File "/home/saju/ops_manual/horizon/openstack_dashboard/usage/base.py", line 95, in summarize
    self.usage_list = self.get_usage_list(start, end)
  File "/home/saju/ops_manual/horizon/openstack_dashboard/usage/base.py", line 130, in get_usage_list
    return api.nova.usage_list(self.request, start, end)
  File "/home/saju/ops_manual/horizon/openstack_dashboard/api/nova.py", line 487, in usage_list
    novaclient(request).usage.list(start, end, True)]
  File "/home/saju/ops_manual/horizon/openstack_dashboard/api/nova.py", line 255, in novaclient
    (request.user.token.id, url_for(request, 'compute')))
  File "/home/saju/ops_manual/horizon/openstack_dashboard/api/base.py", line 166, in url_for
    raise exceptions.ServiceCatalogException(service_type)
ServiceCatalogException: Invalid service catalog service: compute
[02/May/2013 19:11:47] "GET /admin/ HTTP/1.1" 500 214050

1 comment:

  1. http://docs.openstack.org/trunk/openstack-compute/install/yum/content/defining-services.html
    http://docs.openstack.org/trunk/openstack-compute/install/yum/content/keystone-service-endpoint-create.html

    ReplyDelete