[Openstack-operators] Glance - HTTPInternalServerError (HTTP 500)

Jay Pipes jaypipes at gmail.com
Wed Jan 16 21:03:29 UTC 2013


It's likely an issue with configuration.

Could you pastebin the contents of your glance-api log file? By default
it's in /var/log/glance/api.log

Thanks!
-jay

On 01/16/2013 03:48 PM, Richard Cunningham wrote:
> Hi,
> 
> I am looking for some help debugging glance.  My build is:
> 
> cunningr at OpenStack:/tmp/images$ uname -a
> Linux OpenStack 3.5.0-17-generic #28-Ubuntu SMP Tue Oct 9 19:31:23 UTC
> 2012 x86_64 x86_64 x86_64 GNU/Linux
> 
> glance is the latest version:
> 
> cunningr at OpenStack:/tmp/images$ sudo apt-get install glance
> [sudo] password for cunningr:
> Reading package lists... Done
> Building dependency tree
> Reading state information... Done
> glance is already the newest version.
> 0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
> 
> (not sure how to get the version from glance as "glance --version" is
> not working)
> 
> When I try to add an image as per the install guidelines I get
> "HTTPInternalServerError (HTTP 500)".
> 
> I worked through some authentication errors already with keystone and
> I _think_ this part is working now.  When I try to get an auth token
> with curl using the same credentials  it seems to work ok:
> 
> cunningr at OpenStack:/tmp/images$ curl -k -X 'POST' -v
> http://127.0.0.1:5000/v2.0/tokens -d
> '{"auth":{"passwordCredentials":{"username": "glance",
> "password":"glance"}, "tenantId":"f931d6fac2ca4640b72c3e34bbbc7496"}}'
> -H 'Content-type: application/json'
> * About to connect() to 127.0.0.1 port 5000 (#0)
> *   Trying 127.0.0.1...
> * connected
> * Connected to 127.0.0.1 (127.0.0.1) port 5000 (#0)
>> POST /v2.0/tokens HTTP/1.1
>> User-Agent: curl/7.27.0
>> Host: 127.0.0.1:5000
>> Accept: */*
>> Content-type: application/json
>> Content-Length: 123
>>
> * upload completely sent off: 123 out of 123 bytes
> * additional stuff not fine transfer.c:1037: 0 0
> * HTTP 1.1 or later with persistent connection, pipelining supported
> < HTTP/1.1 200 OK
> < Vary: X-Auth-Token
> < Content-Type: application/json
> < Date: Wed, 16 Jan 2013 20:31:38 GMT
> < Transfer-Encoding: chunked
> <
> * Connection #0 to host 127.0.0.1 left intact
> {"access": {"token": {"expires": "2013-01-17T20:31:38Z", "id":
> "29c7ab7bbd6d48edaf3c2348d4552605", "tenant": {"enabled": true,
> "description": null, "name": "service", "id":
> "f931d6fac2ca4640b72c3e34bbbc7496"}}, "serviceCatalog": [{"endpoints":
> [{"adminURL": "http://192.168.1.77:9292", "region": "myregion",
> "internalURL": "http://192.168.1.77:9292", "id":
> "ed983128768d418a854e8bf7862fb12e", "publicURL":
> "http://192.168.1.77:9292"}], "endpoints_links": [], "type": "image",
> "name": "glance"}], "user": {"username": "glance", "roles_links": [],
> "id": "4eedc5061093419a9ca95435f4f60cd4", "roles": [{"name":
> "admin"}], "name": "glance"}, "metadata": {"is_admin": 0, "roles":
> ["ff3a8f105bee464d8ac9930ea0ae802d"]}}}* Closing connection #0
> 
> But when I try to add an image with Glance I get an internal server error:
> 
> cunningr at OpenStack:/tmp/images$ glance -dv --os_username=glance
> --os_password=glance --os_tenant_name=demo
> --os_auth_url=http://127.0.0.1:5000/v2.0 add name="tty-linux-kernel"
> disk_format=aki container_format=aki <
> ttylinux-uec-amd64-12.1_2.6.35-22_1-vmlinuz
> No handlers could be found for logger "keystoneclient.v2_0.client"
> curl -i -X POST -H 'x-image-meta-container_format: aki' -H
> 'x-image-meta-protected: False' -H 'x-image-meta-min_disk: 0' -H
> 'User-Agent: python-glanceclient' -H 'x-image-meta-size: 4404752' -H
> 'x-image-meta-is_public: False' -H 'x-image-meta-min_ram: 0' -H
> 'X-Auth-Token: 4cb5873786ee4945af95306ecf4dd630' -H 'Content-Type:
> application/octet-stream' -H 'x-image-meta-disk_format: aki' -H
> 'x-image-meta-name: tty-linux-kernel' -d '<open file '<stdin>', mode
> 'r' at 0x7fbc1f677150>' http://192.168.1.77:9292/v1/images
> 
> HTTP/1.1 500 Internal Server Error
> date: Wed, 16 Jan 2013 20:37:42 GMT
> content-length: 4044
> content-type: text/plain
> connection: close
> 
> Traceback (most recent call last):
>   File "/usr/lib/python2.7/dist-packages/eventlet/wsgi.py", line 382,
> in handle_one_response
>     result = self.application(self.environ, start_response)
>   File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 147, in __call__
>     resp = self.call_func(req, *args, **self.kwargs)
>   File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 210, in call_func
>     return self.func(req, *args, **kwargs)
>   File "/usr/lib/python2.7/dist-packages/glance/common/wsgi.py", line
> 326, in __call__
>     response = req.get_response(self.application)
>   File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1086,
> in get_response
>     application, catch_exc_info=False)
>   File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1055,
> in call_application
>     app_iter = application(self.environ, start_response)
>   File "/usr/lib/python2.7/dist-packages/keystone/middleware/auth_token.py",
> line 278, in __call__
>     return self.app(env, start_response)
>   File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 147, in __call__
>     resp = self.call_func(req, *args, **self.kwargs)
>   File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 210, in call_func
>     return self.func(req, *args, **kwargs)
>   File "/usr/lib/python2.7/dist-packages/glance/common/wsgi.py", line
> 326, in __call__
>     response = req.get_response(self.application)
>   File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1086,
> in get_response
>     application, catch_exc_info=False)
>   File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1055,
> in call_application
>     app_iter = application(self.environ, start_response)
>   File "/usr/lib/python2.7/dist-packages/paste/urlmap.py", line 203, in __call__
>     return app(environ, start_response)
>   File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 159, in __call__
>     return resp(environ, start_response)
>   File "/usr/lib/python2.7/dist-packages/routes/middleware.py", line
> 131, in __call__
>     response = self.app(environ, start_response)
>   File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 159, in __call__
>     return resp(environ, start_response)
>   File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 147, in __call__
>     resp = self.call_func(req, *args, **self.kwargs)
>   File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 210, in call_func
>     return self.func(req, *args, **kwargs)
>   File "/usr/lib/python2.7/dist-packages/glance/common/wsgi.py", line
> 532, in __call__
>     request, **action_args)
>   File "/usr/lib/python2.7/dist-packages/glance/common/wsgi.py", line
> 549, in dispatch
>     return method(*args, **kwargs)
>   File "/usr/lib/python2.7/dist-packages/glance/common/utils.py", line
> 408, in wrapped
>     return func(self, req, *args, **kwargs)
>   File "/usr/lib/python2.7/dist-packages/glance/api/v1/images.py",
> line 684, in create
>     image_meta = self._reserve(req, image_meta)
>   File "/usr/lib/python2.7/dist-packages/glance/api/v1/images.py",
> line 362, in _reserve
>     image_meta = registry.add_image_metadata(req.context, image_meta)
>   File "/usr/lib/python2.7/dist-packages/glance/registry/__init__.py",
> line 139, in add_image_metadata
>     return c.add_image(image_meta)
>   File "/usr/lib/python2.7/dist-packages/glance/registry/client.py",
> line 140, in add_image
>     res = self.do_request("POST", "/images", body=body, headers=headers)
>   File "/usr/lib/python2.7/dist-packages/glance/registry/client.py",
> line 89, in do_request
>     action, **kwargs)
>   File "/usr/lib/python2.7/dist-packages/glance/common/client.py",
> line 63, in wrapped
>     return func(self, *args, **kwargs)
>   File "/usr/lib/python2.7/dist-packages/glance/common/client.py",
> line 444, in do_request
>     headers=headers)
>   File "/usr/lib/python2.7/dist-packages/glance/common/client.py",
> line 80, in wrapped
>     return func(self, method, url, body, headers)
>   File "/usr/lib/python2.7/dist-packages/glance/common/client.py",
> line 581, in _do_request
>     raise exception.ServerError()
> ServerError: The request returned 500 Internal Server Error.
> 
> 
> Request returned failure status.
> None
> HTTPInternalServerError (HTTP 500)
> 
> Can anyone help me debug this?
> 
> Cheers,
> 
> R
> 
> _______________________________________________
> OpenStack-operators mailing list
> OpenStack-operators at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators
> 



More information about the OpenStack-operators mailing list