Ask Your Question

500 error when trying to create image

asked 2014-05-08 10:32:35 -0500

weevil gravatar image

I am following the tutorial to create the Openstack deployment. I am as far as creating the Cirros test image. When using the command:

glance image-create --name "cirros-0.3.2-x86_64" --disk-format qcow2 --container-format bare --is-public True --progress < cirros-0.3.2-x86_64-disk.img

I get the following error:

Request returned failure status.
HTTPInternalServerError (HTTP 500)

Here is the log tail:

controller:/tmp/images # vim /var/log/glance/api.log
    app_iter = application(self.environ, start_response)
  File "/usr/lib/python2.7/site-packages/paste/", line 203, in __call__
    return app(environ, start_response)
  File "/usr/lib/python2.7/site-packages/webob/", line 144, in __call__
    return resp(environ, start_response)
  File "/usr/lib/python2.7/site-packages/routes/", line 131, in __call__
    response =, start_response)
  File "/usr/lib/python2.7/site-packages/webob/", line 144, in __call__
    return resp(environ, start_response)
  File "/usr/lib/python2.7/site-packages/webob/", line 130, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/lib/python2.7/site-packages/webob/", line 195, in call_func
    return self.func(req, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/glance/common/", line 644, in __call__
    request, **action_args)
  File "/usr/lib/python2.7/site-packages/glance/common/", line 668, in dispatch
    return method(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/glance/common/", line 436, in wrapped
    return func(self, req, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/glance/api/v1/", line 791, in create
    image_meta = self._reserve(req, image_meta)
  File "/usr/lib/python2.7/site-packages/glance/api/v1/", line 524, in _reserve
    image_meta = registry.add_image_metadata(req.context, image_meta)
  File "/usr/lib/python2.7/site-packages/glance/registry/client/v1/", line 161, in add_image_metadata
    return c.add_image(image_meta)
  File "/usr/lib/python2.7/site-packages/glance/registry/client/v1/", line 163, in add_image
    res = self.do_request("POST", "/images", body=body, headers=headers)
  File "/usr/lib/python2.7/site-packages/glance/registry/client/v1/", line 107, in do_request
  File "/usr/lib/python2.7/site-packages/glance/common/", line 69, in wrapped
    return func(self, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/glance/common/", line 386, in do_request
  File "/usr/lib/python2.7/site-packages/glance/common/", line 83, in wrapped
    return func(self, method, url, body, headers)
  File "/usr/lib/python2.7/site-packages/glance/common/", line 527, in _do_request
    raise exception.NotAuthenticated(
NotAuthenticated: Authentication required
2014-05-08 16:29:02.727 2875 INFO glance.wsgi.server [27b6562b-5cb5-4d80-ae46-620b2aa58374 0a003bee08a548ddb6bfb2f0871a7ca9 259a71bdc7864f34b2aac82ebea5f653 - - -] - - [08/May/2014 16:29:02] "POST /v1/images HTTP/1.1" 500 139 0.335661

I can see the Authentication Required message, but I have successfully stored the admin credentials, I can check by using the keystone token-get function.

I have also checked that the ports are open and listening on 9191 and 9292:

controller:/tmp/images # netstat -aon | grep :9191
tcp        0      0 0 ...
edit retag flag offensive close merge delete


Are you getting back results from glance image-list? You may want to post the glance api conf, it could be an issue with glance authenticating with keystone, which would be under the keyston section in the api/registry.

mpetason gravatar imagempetason ( 2014-05-08 11:08:52 -0500 )edit

When I do glance image-list I get the same error.

glance-api.conf is here: (link)

weevil gravatar imageweevil ( 2014-05-08 11:27:54 -0500 )edit

What are you using for your openrc file? Are you still using the admin token or did you change over to the admin user on the admin tenant? What exports are you using? You may want update the openrc, logout of the user, log back in, source the openrc then try it again. (easier than manual removal)

mpetason gravatar imagempetason ( 2014-05-08 11:34:34 -0500 )edit

I am using the admin user on the admin tenant. When i use source I can use the keystone token-get command to spit out the token ID etc. So I think that's working. How do I update the openrc?

weevil gravatar imageweevil ( 2014-05-09 02:41:37 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2014-05-08 15:05:50 -0500

dro gravatar image

check your keystone logs, this looks like a password configuration issue. What is the output of the keystone logs. I think you will find the error there.

edit flag offensive delete link more


Keystone logs are here:

Authentication issues, as we thought, also something about cannot find admin or demo projects??

weevil gravatar imageweevil ( 2014-05-09 02:44:59 -0500 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2014-05-08 10:32:35 -0500

Seen: 1,001 times

Last updated: May 08 '14