"nova service-list" is not working but "nova endpoints" is working fine

Bug #1481255 reported by Udayendu Kar
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
openstack-manuals
Invalid
Undecided
Unassigned

Bug Description

-----------------------------------
Built: 2015-07-17T00:19:21 00:00
git SHA: 4c9835270b01fb1d14533d6741f1455a188768cb
URL: http://docs.openstack.org/kilo/install-guide/install/apt/content/ch_nova.html

I followed the above document and configured the setup. But this is not working for any services of nova like image-list or service-list but endpoints is working file.

I am getting the below error:

# nova service-list
ERROR (Unauthorized): Unauthorized (HTTP 401) (Request-ID: req-1d43ed6a-accb-4683-b861-e21c5beca717)

Thanks,
Uday

Revision history for this message
Christian Berendt (berendt) wrote :

Have you sourced the admin-openrc.sh file prior to running nova service-list?

Have you checked the nova logfile (/var/log/nova) and the keystone logfile (/var/log/keystone)?

Have you checked the nova configuration file (/etc/nova/nova.conf) for the correct credentials?

Normally this error means that the nova service cannot authenticate against the keystone service.

Changed in openstack-manuals:
status: New → Incomplete
Revision history for this message
Udayendu Kar (udayendu-kar) wrote :
Download full text (15.0 KiB)

Hello berendt,

Thanks for looking into it.

Please find the reply to your below query:

>>> Have you sourced the admin-openrc.sh file prior to running nova service-list?

        Yes, I did but still have the same issue. Here is some out put for your reference:

root@controller:~# source admin-openrc.sh
root@controller:~# nova service-list
ERROR (Unauthorized): Unauthorized (HTTP 401) (Request-ID: req-eea32c7c-2454-4d5d-89fd-ded137cb56b6)
root@controller:~# cat admin-openrc.sh
export OS_PROJECT_DOMAIN_ID=default
export OS_USER_DOMAIN_ID=default
export OS_PROJECT_NAME=admin
export OS_TENANT_NAME=admin
export OS_USERNAME=admin
export OS_PASSWORD=xxxxxxxx
export OS_AUTH_URL=http://controller:35357/v3
export OS_IMAGE_API_VERSION=2
root@controller:~# nova endpoints
WARNING: nova has no endpoint in ! Available endpoints for this service:
+-----------+------------------------------------------------------------+
| nova | Value |
+-----------+------------------------------------------------------------+
| id | 91c2845bfd784bdaa430612a91bf9377 |
| interface | admin |
| region | RegionOne |
| region_id | RegionOne |
| url | http://controller:8774/v2/e7491bb2026e4b12bdfb938820f2c3c6 |
+-----------+------------------------------------------------------------+
+-----------+------------------------------------------------------------+
| nova | Value |
+-----------+------------------------------------------------------------+
| id | afccc48848bd4bf681913a4c0bdd0f81 |
| interface | internal |
| region | RegionOne |
| region_id | RegionOne |
| url | http://controller:8774/v2/e7491bb2026e4b12bdfb938820f2c3c6 |
+-----------+------------------------------------------------------------+
+-----------+------------------------------------------------------------+
| nova | Value |
+-----------+------------------------------------------------------------+
| id | f048d6dd60eb410297e1e7548129de36 |
| interface | public |
| region | RegionOne |
| region_id | RegionOne |
| url | http://controller:8774/v2/e7491bb2026e4b12bdfb938820f2c3c6 |
+-----------+------------------------------------------------------------+
WARNING: glance has no endpoint in ! Available endpoints for this service:
+-----------+----------------------------------+
| glance | Value |
+-----------+----------------------------------+
| id | 951d2b81685e4c3385af5048ae21c0a7 |
| interface | public |
| regio...

Revision history for this message
Udayendu Kar (udayendu-kar) wrote :
Download full text (9.6 KiB)

Here are some info with debug option for your reference:

# nova --debug service-list
DEBUG (session:195) REQ: curl -g -i -X GET http://controller:35357/v3 -H "Accept: application/json" -H "User-Agent: python-keystoneclient"
INFO (connectionpool:188) Starting new HTTP connection (1): controller
DEBUG (connectionpool:362) "GET /v3 HTTP/1.1" 200 250
DEBUG (session:223) RESP: [200] content-length: 250 vary: X-Auth-Token keep-alive: timeout=5, max=100 server: Apache/2.4.7 (Ubuntu) connection: Keep-Alive date: Wed, 05 Aug 2015 03:00:35 GMT x-openstack-request-id: req-b434334e-332d-424c-b94b-0afbe8844c38 content-type: application/json x-distribution: Ubuntu
RESP BODY: {"version": {"status": "stable", "updated": "2015-03-30T00:00:00Z", "media-types": [{"base": "application/json", "type": "application/vnd.openstack.identity-v3+json"}], "id": "v3.4", "links": [{"href": "http://controller:35357/v3/", "rel": "self"}]}}

DEBUG (v3:125) Making authentication request to http://controller:35357/v3/auth/tokens
DEBUG (connectionpool:362) "POST /v3/auth/tokens HTTP/1.1" 201 2257
DEBUG (iso8601:184) Parsed 2015-08-05T04:00:36.039888Z into {'tz_sign': None, 'second_fraction': u'039888', 'hour': u'04', 'daydash': u'05', 'tz_hour': None, 'month': None, 'timezone': u'Z', 'second': u'36', 'tz_minute': None, 'year': u'2015', 'separator': u'T', 'monthdash': u'08', 'day': None, 'minute': u'00'} with default timezone <iso8601.iso8601.Utc object at 0x7f56cf813a10>
DEBUG (iso8601:140) Got u'2015' for 'year' with default None
DEBUG (iso8601:140) Got u'08' for 'monthdash' with default 1
DEBUG (iso8601:140) Got 8 for 'month' with default 8
DEBUG (iso8601:140) Got u'05' for 'daydash' with default 1
DEBUG (iso8601:140) Got 5 for 'day' with default 5
DEBUG (iso8601:140) Got u'04' for 'hour' with default None
DEBUG (iso8601:140) Got u'00' for 'minute' with default None
DEBUG (iso8601:140) Got u'36' for 'second' with default None
DEBUG (session:195) REQ: curl -g -i -X GET http://controller:8774/v2/e7491bb2026e4b12bdfb938820f2c3c6/os-services -H "User-Agent: python-novaclient" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}534a02fc026b183a3f06d272e3b9e55bfd011096"
INFO (connectionpool:188) Starting new HTTP connection (1): controller
DEBUG (connectionpool:362) "GET /v2/e7491bb2026e4b12bdfb938820f2c3c6/os-services HTTP/1.1" 401 23
DEBUG (session:223) RESP:
DEBUG (v3:125) Making authentication request to http://controller:35357/v3/auth/tokens
DEBUG (connectionpool:362) "POST /v3/auth/tokens HTTP/1.1" 201 2257
DEBUG (connectionpool:362) "GET /v2/e7491bb2026e4b12bdfb938820f2c3c6/os-services HTTP/1.1" 401 23
DEBUG (session:223) RESP:
DEBUG (shell:914) Unauthorized (HTTP 401) (Request-ID: req-b86bcfd5-7a2b-4c10-9407-f1e94293d67b)
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/novaclient/shell.py", line 911, in main
    OpenStackComputeShell().main(argv)
  File "/usr/lib/python2.7/dist-packages/novaclient/shell.py", line 838, in main
    args.func(self.cs, args)
  File "/usr/lib/python2.7/dist-packages/novaclient/v2/shell.py", line 3442, in do_service_list
    result = cs.services.list(host=args.host, binary=args.binary)
  File "/usr/lib/python2.7/dis...

Read more...

Changed in openstack-manuals:
status: Incomplete → New
Revision history for this message
Udayendu Kar (udayendu-kar) wrote :

Some additional info. And to collect these I have sourced the below:

# cat keystone-openrc.sh
export OS_PROJECT_DOMAIN_ID=default
export OS_USER_DOMAIN_ID=default
export OS_PROJECT_NAME=admin
export OS_TENANT_NAME=admin
export OS_USERNAME=admin
export OS_PASSWORD=xxxx
export OS_AUTH_URL=http://controller:35357/v2.0 <===== [With V3 its not working]
export OS_IMAGE_API_VERSION=2

root@controller:~# keystone service-list
+----------------------------------+----------+----------+-------------------------+
| id | name | type | description |
+----------------------------------+----------+----------+-------------------------+
| b8f7ae274bac47eca2ed5b36981fa5ea | glance | image | OpenStack Image service |
| e2c81fff8d0f43a781ed3a35a88e1be3 | keystone | identity | OpenStack Identity |
| 241f31a69a8e4255a37fc2dba850b997 | nova | compute | OpenStack Compute |
+----------------------------------+----------+----------+-------------------------+

root@controller:~# keystone user-list
+----------------------------------+--------+---------+-------+
| id | name | enabled | email |
+----------------------------------+--------+---------+-------+
| 1f44ac8ee04b4e8c9d49a605c8707b76 | admin | True | |
| 03d8fb3618be47c4968f943c6195532d | demo | True | |
| 43c68e8d2e5745738886efc10cff0e8f | glance | True | |
| e5c7e0e16d424c069bc83a651459c1b5 | nova | True | |
+----------------------------------+--------+---------+-------+

root@controller:~# keystone user-role-list
+----------------------------------+-------+----------------------------------+----------------------------------+
| id | name | user_id | tenant_id |
+----------------------------------+-------+----------------------------------+----------------------------------+
| 65d34f32a1384f9283e612bad3179bc7 | admin | 1f44ac8ee04b4e8c9d49a605c8707b76 | e7491bb2026e4b12bdfb938820f2c3c6 |
+----------------------------------+-------+----------------------------------+----------------------------------+

Revision history for this message
Andreas Jaeger (jaegerandi) wrote :

We cannot help debug, please ask on openstack mailing list or use ask.openstack.org

Changed in openstack-manuals:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.