nova image-list say class 'glanceclient.exc.HTTPInternalServerError'

Bug #1523889 reported by dingyu
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Invalid
Undecided
Unassigned

Bug Description

When I use nova image-list
THe shell show

ERROR (ClientException): Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.
<class 'glanceclient.exc.HTTPInternalServerError'> (HTTP 500) (Request-ID: req-770ce041-380d-4dcf-95d2-1c844c70945d)

I get the log ,like this

2015-12-08 06:31:11.501 2112 INFO nova.osapi_compute.wsgi.server [req-d2d814a0-d9bc-4aba-a34b-e7fc4bce0363 db6f17743bd342fe9615dce76aff1556 089850858b4049a589bf00a6cd2373fd - - -] 192.168.60.122 "GET /v2/ HTTP/1.1" status: 200 len: 576 time: 3.4160471
2015-12-08 06:31:12.355 2112 INFO nova.osapi_compute.wsgi.server [-] 192.168.60.122 "OPTIONS / HTTP/1.0" status: 200 len: 505 time: 0.0006258
2015-12-08 06:31:14.358 2112 INFO nova.osapi_compute.wsgi.server [-] 192.168.60.122 "OPTIONS / HTTP/1.0" status: 200 len: 505 time: 0.0006728
2015-12-08 06:31:16.361 2112 INFO nova.osapi_compute.wsgi.server [-] 192.168.60.122 "OPTIONS / HTTP/1.0" status: 200 len: 505 time: 0.0005569
2015-12-08 06:31:18.141 2112 ERROR nova.api.openstack.extensions [req-770ce041-380d-4dcf-95d2-1c844c70945d db6f17743bd342fe9615dce76aff1556 089850858b4049a589bf00a6cd2373fd - - -] Unexpected exception in API method
2015-12-08 06:31:18.141 2112 ERROR nova.api.openstack.extensions Traceback (most recent call last):
2015-12-08 06:31:18.141 2112 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/nova/api/openstack/extensions.py", line 478, in wrapped
2015-12-08 06:31:18.141 2112 ERROR nova.api.openstack.extensions return f(*args, **kwargs)
2015-12-08 06:31:18.141 2112 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/nova/api/openstack/compute/images.py", line 145, in detail
2015-12-08 06:31:18.141 2112 ERROR nova.api.openstack.extensions **page_params)
2015-12-08 06:31:18.141 2112 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/nova/image/api.py", line 68, in get_all
2015-12-08 06:31:18.141 2112 ERROR nova.api.openstack.extensions return session.detail(context, **kwargs)
2015-12-08 06:31:18.141 2112 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/nova/image/glance.py", line 284, in detail
2015-12-08 06:31:18.141 2112 ERROR nova.api.openstack.extensions for image in images:
2015-12-08 06:31:18.141 2112 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/glanceclient/v1/images.py", line 254, in list
2015-12-08 06:31:18.141 2112 ERROR nova.api.openstack.extensions for image in paginate(params, return_request_id):
2015-12-08 06:31:18.141 2112 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/glanceclient/v1/images.py", line 238, in paginate
2015-12-08 06:31:18.141 2112 ERROR nova.api.openstack.extensions images, resp = self._list(url, "images")
2015-12-08 06:31:18.141 2112 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/glanceclient/v1/images.py", line 63, in _list
2015-12-08 06:31:18.141 2112 ERROR nova.api.openstack.extensions resp, body = self.client.get(url)
2015-12-08 06:31:18.141 2112 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/glanceclient/common/http.py", line 280, in get
2015-12-08 06:31:18.141 2112 ERROR nova.api.openstack.extensions return self._request('GET', url, **kwargs)
2015-12-08 06:31:18.141 2112 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/glanceclient/common/http.py", line 272, in _request
2015-12-08 06:31:18.141 2112 ERROR nova.api.openstack.extensions resp, body_iter = self._handle_response(resp)
2015-12-08 06:31:18.141 2112 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/glanceclient/common/http.py", line 93, in _handle_response
2015-12-08 06:31:18.141 2112 ERROR nova.api.openstack.extensions raise exc.from_response(resp, resp.content)
2015-12-08 06:31:18.141 2112 ERROR nova.api.openstack.extensions HTTPInternalServerError: 500 Internal Server Error: The server has either erred or is incapable of performing the requested operation. (HTTP 500)
2015-12-08 06:31:18.141 2112 ERROR nova.api.openstack.extensions
2015-12-08 06:31:18.161 2112 INFO nova.api.openstack.wsgi [req-770ce041-380d-4dcf-95d2-1c844c70945d db6f17743bd342fe9615dce76aff1556 089850858b4049a589bf00a6cd2373fd - - -] HTTP exception thrown: Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.
<class 'glanceclient.exc.HTTPInternalServerError'>
2015-12-08 06:31:18.161 2112 INFO nova.osapi_compute.wsgi.server [req-770ce041-380d-4dcf-95d2-1c844c70945d db6f17743bd342fe9615dce76aff1556 089850858b4049a589bf00a6cd2373fd - - -] 192.168.60.122 "GET /v2/089850858b4049a589bf00a6cd2373fd/images/detail HTTP/1.1" status: 500 len: 445 time: 6.5481448

when I use ,like this

[root@controller2 ~]# nova --debug image-list
DEBUG (session:198) REQ: curl -g -i -X GET http://192.168.60.120:35357/v3 -H "Accept: application/json" -H "User-Agent: python-keystoneclient"
INFO (connectionpool:203) Starting new HTTP connection (1): 192.168.60.120
DEBUG (connectionpool:383) "GET /v3 HTTP/1.1" 200 254
DEBUG (session:215) RESP: [200] content-length: 254 vary: X-Auth-Token keep-alive: timeout=5, max=100 server: Apache/2.4.6 (CentOS) mod_wsgi/3.4 Python/2.7.5 connection: Keep-Alive date: Tue, 08 Dec 2015 11:36:09 GMT content-type: application/json x-openstack-request-id: req-c9fcb990-ad72-474c-86f7-5268d31e5aea
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://192.168.60.120:35357/v3/", "rel": "self"}]}}

DEBUG (base:188) Making authentication request to http://192.168.60.120:35357/v3/auth/tokens
DEBUG (connectionpool:383) "POST /v3/auth/tokens HTTP/1.1" 201 2293
DEBUG (session:198) REQ: curl -g -i -X GET http://192.168.60.120:8774/v2/ -H "User-Agent: python-novaclient" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}a9fb6afb959514a7667e559e6b487591e4d10ebb"
INFO (connectionpool:203) Starting new HTTP connection (1): 192.168.60.120
DEBUG (connectionpool:383) "GET /v2/ HTTP/1.1" 401 23
DEBUG (session:215) RESP: [401] content-length: 23 x-compute-request-id: req-ec75e857-c8b5-4691-858b-952ff6f2d500 connection: keep-alive date: Tue, 08 Dec 2015 11:36:13 GMT content-type: text/html; charset=UTF-8 www-authenticate: Keystone uri='http://192.168.60.120:5000'
RESP BODY: Authentication required

DEBUG (base:188) Making authentication request to http://192.168.60.120:35357/v3/auth/tokens
DEBUG (connectionpool:383) "POST /v3/auth/tokens HTTP/1.1" 201 2293
DEBUG (connectionpool:383) "GET /v2/ HTTP/1.1" 200 379
DEBUG (session:215) RESP: [200] date: Tue, 08 Dec 2015 11:36:20 GMT connection: keep-alive content-type: application/json content-length: 379 x-compute-request-id: req-8d7a1d17-a384-4689-ad84-279674025851
RESP BODY: {"version": {"status": "SUPPORTED", "updated": "2011-01-21T11:33:21Z", "links": [{"href": "http://192.168.60.120:8774/v2/", "rel": "self"}, {"href": "http://docs.openstack.org/", "type": "text/html", "rel": "describedby"}], "min_version": "", "version": "", "media-types": [{"base": "application/json", "type": "application/vnd.openstack.compute+json;version=2"}], "id": "v2.0"}}

DEBUG (session:198) REQ: curl -g -i -X GET http://192.168.60.120:8774/v2/089850858b4049a589bf00a6cd2373fd/images/detail -H "User-Agent: python-novaclient" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}7741af7d6ecc5251f64549fd5b90d13996551779"
DEBUG (connectionpool:383) "GET /v2/089850858b4049a589bf00a6cd2373fd/images/detail HTTP/1.1" 500 214
DEBUG (session:215) RESP: [500] date: Tue, 08 Dec 2015 11:36:20 GMT connection: keep-alive content-type: application/json; charset=UTF-8 content-length: 214 x-compute-request-id: req-35801b58-7ff5-4b51-becc-ee04a125914a
RESP BODY: {"computeFault": {"message": "Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.\n<class 'glanceclient.exc.HTTPInternalServerError'>", "code": 500}}

DEBUG (shell:905) Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.
<class 'glanceclient.exc.HTTPInternalServerError'> (HTTP 500) (Request-ID: req-35801b58-7ff5-4b51-becc-ee04a125914a)
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/novaclient/shell.py", line 903, in main
    OpenStackComputeShell().main(argv)
  File "/usr/lib/python2.7/site-packages/novaclient/shell.py", line 830, in main
    args.func(self.cs, args)
  File "/usr/lib/python2.7/site-packages/novaclient/v2/shell.py", line 1115, in do_image_list
    image_list = cs.images.list(limit=limit)
  File "/usr/lib/python2.7/site-packages/novaclient/v2/images.py", line 74, in list
    return self._list('/images%s%s' % (detail, query), 'images')
  File "/usr/lib/python2.7/site-packages/novaclient/base.py", line 72, in _list
    _resp, body = self.api.client.get(url)
  File "/usr/lib/python2.7/site-packages/keystoneclient/adapter.py", line 170, in get
    return self.request(url, 'GET', **kwargs)
  File "/usr/lib/python2.7/site-packages/novaclient/client.py", line 93, in request
    raise exceptions.from_response(resp, body, url, method)
ClientException: Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.
<class 'glanceclient.exc.HTTPInternalServerError'> (HTTP 500) (Request-ID: req-35801b58-7ff5-4b51-becc-ee04a125914a)
ERROR (ClientException): Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.
<class 'glanceclient.exc.HTTPInternalServerError'> (HTTP 500) (Request-ID: req-35801b58-7ff5-4b51-becc-ee04a125914a)

I don't konw what to do ,but it tell me report this possible

Revision history for this message
aginwala (aginwala-f) wrote :

Please make sure all the passwords in glance configs, nova configs and databases are correct. This is a config issue. Please see duplicate bugs for this 500 error .

Changed in nova:
status: New → Invalid
Revision history for this message
leye (lei-ye) wrote :

I met same issue recently,

[root@controller ~]# glance image-list
+--------------------------------------+--------+
| ID | Name |
+--------------------------------------+--------+
| 1d961e0b-558d-49f8-bc97-6f18105ea77b | cirros |
+--------------------------------------+--------+
[root@controller ~]# nova image-list
ERROR (ClientException): Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.
<class 'glanceclient.exc.HTTPInternalServerError'> (HTTP 500) (Request-ID: req-68b86a3c-b071-4987-801a-68daa988628e)

you can see that glance is OK but nova doesn't work.

Revision history for this message
Martins Jakubovics (martins-k) wrote :

I have same issue.

Revision history for this message
weezer su (weezer-su) wrote :

check your /etc/glance/glance-registry.conf and make sure your config is right.

Revision history for this message
Petri (petri-laihonen) wrote :

I created a bug report yesterday about the problem in the nova configuration documentation. This may or may not be related. I have been following the instruction literally, and this happens.

https://bugs.launchpad.net/openstack-manuals/+bug/1569689

Revision history for this message
Sudheep D Ulikkara (sudeepud) wrote :

I got the same bug. Glance was working. But Nova has thrown me the same error. As Weezer suggested I had gone through /etc/glance/glance-registry.conf and found DB connection was missing. Corrected it, restarted the glance-registry service. Now it works fine.

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.