Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Nova image-list: 404 Not Found

I have this problem on Icehouse installed on Ubuntu 14.04. Nova is unable to find any images. When I try to use nova image-listI get error: ERROR: The resource could not be found. (HTTP 404)

When using --debug option I get this:

REQ: curl -i 'http://controller:8774/v2/24de9442e5194fbea8e32dd994dcd5c6/images/detail' -X GET -H "X-Auth-Project-Id: admin" -H "User-Agent: python-novaclient" -H "Accept: application/json" -H "X-Auth-Token: longid"
New session created for: (http://controller:8774)
INFO (connectionpool:259) Starting new HTTP connection (1): controller
DEBUG (connectionpool:390) Setting read timeout to 600.0
DEBUG (connectionpool:430) "GET /v2/24de9442e5194fbea8e32dd994dcd5c6/images/detail HTTP/1.1" 404 78
RESP: [404] CaseInsensitiveDict({'date': 'Fri, 27 Mar 2015 12:57:20 GMT', 'content-length': '78', 'content-type':  application/json; charset=UTF-8', 'x-compute-request-id': 'req-931114b4-e06f-4242-b06c-674798056070'})
RESP BODY: {"itemNotFound": {"message": "The resource could not be found.", "code": 404}}

DEBUG (shell:777) The resource could not be found. (HTTP 404) (Request-ID: req-931114b4-e06f-4242-b06c-674798056070)
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/novaclient/shell.py", line 774, in main
OpenStackComputeShell().main(map(strutils.safe_decode, sys.argv[1:]))
File "/usr/lib/python2.7/dist-packages/novaclient/shell.py", line 710, in main
args.func(self.cs, args)
File "/usr/lib/python2.7/dist-packages/novaclient/v1_1/shell.py", line 905, in do_image_list
image_list = cs.images.list(limit=limit)
File "/usr/lib/python2.7/dist-packages/novaclient/v1_1/images.py", line 69, in list
return self._list('/images%s%s' % (detail, query), 'images')
File "/usr/lib/python2.7/dist-packages/novaclient/base.py", line 64, in _list
_resp, body = self.api.client.get(url)
File "/usr/lib/python2.7/dist-packages/novaclient/client.py", line 283, in get
return self._cs_request(url, 'GET', **kwargs)
File "/usr/lib/python2.7/dist-packages/novaclient/client.py", line 260, in _cs_request
**kwargs)
File "/usr/lib/python2.7/dist-packages/novaclient/client.py", line 242, in _time_request
resp, body = self.request(url, method, **kwargs)
File "/usr/lib/python2.7/dist-packages/novaclient/client.py", line 236, in request
raise exceptions.from_response(resp, body, url, method)
NotFound: The resource could not be found. (HTTP 404) (Request-ID: req-931114b4-e06f-4242-b06c-674798056070)
ERROR: The resource could not be found. (HTTP 404) (Request-ID: req-931114b4-e06f-4242-b06c-674798056070)

Other Nova-commands work as expected. Glance image-list works as well.

Nova-api log logs these error after trying Nova image-list:

2015-03-27 13:31:21.464 4967 INFO urllib3.connectionpool [-] Starting new HTTP connection (1): controller
2015-03-27 13:31:21.587 4967 INFO urllib3.connectionpool [-] Starting new HTTP connection (1): controller
2015-03-27 13:31:22.114 4967 ERROR glanceclient.common.http [-] Request returned failure status.
2015-03-27 13:31:22.115 4967 ERROR nova.api.openstack [req-5690d8a2-a744-42a7-8e28-e226219be33b cdf45e66185b415d94bfa8c4849a4813 24de9442e5194fbea8e32dd994dcd5c6] Caught error: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /v1/images/detail was not found on this server.</p>
<hr>
<address>Apache/2.4.7 (Ubuntu) Server at controller Port 80</address>
</body></html>
 (HTTP 404)
2015-03-27 13:31:22.115 4967 TRACE nova.api.openstack Traceback (most recent call last):
2015-03-27 13:31:22.115 4967 TRACE nova.api.openstack   File "/usr/lib/python2.7/dist-packages/nova/api/openstack/__init__.py", line 125, in __call__
2015-03-27 13:31:22.115 4967 TRACE nova.api.openstack     return req.get_response(self.application)
2015-03-27 13:31:22.115 4967 TRACE nova.api.openstack   File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1320, in send
2015-03-27 13:31:22.115 4967 TRACE nova.api.openstack     application, catch_exc_info=False)
2015-03-27 13:31:22.115 4967 TRACE nova.api.openstack   File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1284, in call_application
2015-03-27 13:31:22.115 4967 TRACE nova.api.openstack     app_iter = application(self.environ, start_response)
2015-03-27 13:31:22.115 4967 TRACE nova.api.openstack   File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
2015-03-27 13:31:22.115 4967 TRACE nova.api.openstack     return resp(environ, start_response)
2015-03-27 13:31:22.115 4967 TRACE nova.api.openstack   File "/usr/lib/python2.7/dist-packages/keystoneclient/middleware/auth_token.py", line 582, in __call__
2015-03-27 13:31:22.115 4967 TRACE nova.api.openstack     return self.app(env, start_response)
2015-03-27 13:31:22.115 4967 TRACE nova.api.openstack   File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
2015-03-27 13:31:22.115 4967 TRACE nova.api.openstack     return resp(environ, start_response)
2015-03-27 13:31:22.115 4967 TRACE nova.api.openstack   File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
2015-03-27 13:31:22.115 4967 TRACE nova.api.openstack     return resp(environ, start_response)
2015-03-27 13:31:22.115 4967 TRACE nova.api.openstack   File "/usr/lib/python2.7/dist-packages/routes/middleware.py", line 131, in __call__
2015-03-27 13:31:22.115 4967 TRACE nova.api.openstack     response = self.app(environ, start_response)
2015-03-27 13:31:22.115 4967 TRACE nova.api.openstack   File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
2015-03-27 13:31:22.115 4967 TRACE nova.api.openstack     return resp(environ, start_response)
2015-03-27 13:31:22.115 4967 TRACE nova.api.openstack   File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
2015-03-27 13:31:22.115 4967 TRACE nova.api.openstack     resp = self.call_func(req, *args, **self.kwargs)
2015-03-27 13:31:22.115 4967 TRACE nova.api.openstack   File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
2015-03-27 13:31:22.115 4967 TRACE nova.api.openstack     return self.func(req, *args, **kwargs)
2015-03-27 13:31:22.115 4967 TRACE nova.api.openstack   File "/usr/lib/python2.7/dist-packages/nova/api/openstack/wsgi.py", line 917, in __call__
2015-03-27 13:31:22.115 4967 TRACE nova.api.openstack     content_type, body, accept)
2015-03-27 13:31:22.115 4967 TRACE nova.api.openstack   File "/usr/lib/python2.7/dist-packages/nova/api/openstack/wsgi.py", line 983, in _process_stack
2015-03-27 13:31:22.115 4967 TRACE nova.api.openstack     action_result = self.dispatch(meth, request, action_args)
2015-03-27 13:31:22.115 4967 TRACE nova.api.openstack   File "/usr/lib/python2.7/dist-packages/nova/api/openstack/wsgi.py", line 1070, in dispatch
2015-03-27 13:31:22.115 4967 TRACE nova.api.openstack     return method(req=request, **action_args)
2015-03-27 13:31:22.115 4967 TRACE nova.api.openstack   File "/usr/lib/python2.7/dist-packages/nova/api/openstack/compute/images.py", line 202, in detail
2015-03-27 13:31:22.115 4967 TRACE nova.api.openstack     **page_params)
2015-03-27 13:31:22.115 4967 TRACE nova.api.openstack   File "/usr/lib/python2.7/dist-packages/nova/image/glance.py", line 261, in detail
2015-03-27 13:31:22.115 4967 TRACE nova.api.openstack     for image in images:
2015-03-27 13:31:22.115 4967 TRACE nova.api.openstack   File "/usr/lib/python2.7/dist-packages/glanceclient/v1/images.py", line 174, in paginate
2015-03-27 13:31:22.115 4967 TRACE nova.api.openstack     images = self._list(url, "images")
2015-03-27 13:31:22.115 4967 TRACE nova.api.openstack   File "/usr/lib/python2.7/dist-packages/glanceclient/common/base.py", line 53, in _list
2015-03-27 13:31:22.115 4967 TRACE nova.api.openstack     resp, body = self.api.json_request('GET', url)
2015-03-27 13:31:22.115 4967 TRACE nova.api.openstack   File "/usr/lib/python2.7/dist-packages/glanceclient/common/http.py", line 266, in json_request
2015-03-27 13:31:22.115 4967 TRACE nova.api.openstack     resp, body_iter = self._http_request(url, method, **kwargs)
2015-03-27 13:31:22.115 4967 TRACE nova.api.openstack   File "/usr/lib/python2.7/dist-packages/glanceclient/common/http.py", line 249, in _http_request
2015-03-27 13:31:22.115 4967 TRACE nova.api.openstack     raise exc.from_response(resp, body_str)
2015-03-27 13:31:22.115 4967 TRACE nova.api.openstack HTTPNotFound: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
2015-03-27 13:31:22.115 4967 TRACE nova.api.openstack <html><head>
2015-03-27 13:31:22.115 4967 TRACE nova.api.openstack <title>404 Not Found</title>
2015-03-27 13:31:22.115 4967 TRACE nova.api.openstack </head><body>
2015-03-27 13:31:22.115 4967 TRACE nova.api.openstack <h1>Not Found</h1>
2015-03-27 13:31:22.115 4967 TRACE nova.api.openstack <p>The requested URL /v1/images/detail was not found on this server.</p>
2015-03-27 13:31:22.115 4967 TRACE nova.api.openstack <hr>
2015-03-27 13:31:22.115 4967 TRACE nova.api.openstack <address>Apache/2.4.7 (Ubuntu) Server at controller Port 80</address>
2015-03-27 13:31:22.115 4967 TRACE nova.api.openstack </body></html>
2015-03-27 13:31:22.115 4967 TRACE nova.api.openstack  (HTTP 404)
2015-03-27 13:31:22.115 4967 TRACE nova.api.openstack
2015-03-27 13:31:22.118 4967 INFO nova.api.openstack [req-5690d8a2-a744-42a7-8e28-e226219be33b cdf45e66185b415d94bfa8c4849a4813 24de9442e5194fbea8e32dd994dcd5c6] http://controller:8774/v2/24de9442e5194fbea8e32dd994dcd5c6/images/detail returned with HTTP 404
2015-03-27 13:31:22.119 4967 INFO nova.osapi_compute.wsgi.server [req-5690d8a2-a744-42a7-8e28-e226219be33b cdf45e66185b415d94bfa8c4849a4813 24de9442e5194fbea8e32dd994dcd5c6] compute "GET /v2/24de9442e5194fbea8e32dd994dcd5c6/images/detail HTTP/1.1" status: 404 len: 272 time: 0.6728780

What could be the cause of this?