Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Registry client request GET /images/cirros-0.3.4 raised BadStatusLine

Hi,

I created an Openstack HA cluster with newton release. Everything seems to be working but when I tried to launch an instance Iam getting an error like below

root@info#openstack server create --flavor m1.nano --image cirros-0.3.4   --nic net-id=8b269db5-0361-473a-ab45-de9edd2b770f --security-group ec587216-4506-49a7-a3e0-e02034e54ff6   --key-name mykey test-instance

    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-3640b4f6-2afc-41c1-bae0-83f0fc647772)

I got the same above error while listing image with nova-image list

    root@info# nova image-list

 WARNING: Command image-list is deprecated and will be removed after Nova 15.0.0 is released. Use python-glanceclient or openstackclient instead.
    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-b842a4b0-e15b-4a17-bf93-b81cd4146e56)

When I checked /var/log/glance/glance-api.log I got error as Registry client request GET /images/cirros-0.3.4 raised BadStatusLine

2016-11-21 14:09:28.957 22488 INFO eventlet.wsgi.server [req-f9cc8eba-815f-414b-9a2e-b7b4008e785e 2cfe6360fd8d494c80ee2740b901e1e1 20d65370e91d428d8d83abb84b5c2c21 - default default] 172.30.160.7 - - [21/Nov/2016 14:09:28] "GET /v2/images?limit=20&sort_key=name&sort_dir=asc HTTP/1.1" 200 907 0.615587
2016-11-21 14:09:28.965 22488 INFO eventlet.wsgi.server [req-5c89d9a4-1f97-4bc5-b0c0-e8e43568d0e1 2cfe6360fd8d494c80ee2740b901e1e1 20d65370e91d428d8d83abb84b5c2c21 - default default] 172.30.160.7 - - [21/Nov/2016 14:09:28] "GET /v2/schemas/image HTTP/1.1" 200 4364 0.004669
2016-11-21 14:13:32.479 22491 ERROR glance.registry.client.v1.client [req-a3be22d6-9734-46fd-b694-2ee4273898b1 2cfe6360fd8d494c80ee2740b901e1e1 20d65370e91d428d8d83abb84b5c2c21 - default default] Registry client request GET /images/cirros-0.3.4 raised BadStatusLine
2016-11-21 14:13:32.479 22491 ERROR glance.registry.client.v1.client Traceback (most recent call last):
2016-11-21 14:13:32.479 22491 ERROR glance.registry.client.v1.client   File "/usr/lib/python2.7/dist-packages/glance/registry/client/v1/client.py", line 124, in do_request
2016-11-21 14:13:32.479 22491 ERROR glance.registry.client.v1.client     **kwargs)
2016-11-21 14:13:32.479 22491 ERROR glance.registry.client.v1.client   File "/usr/lib/python2.7/dist-packages/glance/common/client.py", line 70, in wrapped
2016-11-21 14:13:32.479 22491 ERROR glance.registry.client.v1.client     return func(self, *args, **kwargs)
2016-11-21 14:13:32.479 22491 ERROR glance.registry.client.v1.client   File "/usr/lib/python2.7/dist-packages/glance/common/client.py", line 373, in do_request
2016-11-21 14:13:32.479 22491 ERROR glance.registry.client.v1.client     headers=copy.deepcopy(headers))
2016-11-21 14:13:32.479 22491 ERROR glance.registry.client.v1.client   File "/usr/lib/python2.7/dist-packages/glance/common/client.py", line 87, in wrapped
2016-11-21 14:13:32.479 22491 ERROR glance.registry.client.v1.client     return func(self, method, url, body, headers)
2016-11-21 14:13:32.479 22491 ERROR glance.registry.client.v1.client   File "/usr/lib/python2.7/dist-packages/glance/common/client.py", line 507, in _do_request
2016-11-21 14:13:32.479 22491 ERROR glance.registry.client.v1.client     res = c.getresponse()
2016-11-21 14:13:32.479 22491 ERROR glance.registry.client.v1.client   File "/usr/lib/python2.7/httplib.py", line 1136, in getresponse
2016-11-21 14:13:32.479 22491 ERROR glance.registry.client.v1.client     response.begin()
2016-11-21 14:13:32.479 22491 ERROR glance.registry.client.v1.client   File "/usr/lib/python2.7/httplib.py", line 453, in begin
2016-11-21 14:13:32.479 22491 ERROR glance.registry.client.v1.client     version, status, reason = self._read_status()
2016-11-21 14:13:32.479 22491 ERROR glance.registry.client.v1.client   File "/usr/lib/python2.7/httplib.py", line 417, in _read_status
2016-11-21 14:13:32.479 22491 ERROR glance.registry.client.v1.client     raise BadStatusLine(line)
2016-11-21 14:13:32.479 22491 ERROR glance.registry.client.v1.client BadStatusLine: ''
2016-11-21 14:13:32.479 22491 ERROR glance.registry.client.v1.client
2016-11-21 14:13:32.482 22491 ERROR glance.common.wsgi [req-a3be22d6-9734-46fd-b694-2ee4273898b1 2cfe6360fd8d494c80ee2740b901e1e1 20d65370e91d428d8d83abb84b5c2c21 - default default] Caught error: ''
2016-11-21 14:13:32.482 22491 ERROR glance.common.wsgi Traceback (most recent call last):
2016-11-21 14:13:32.482 22491 ERROR glance.common.wsgi   File "/usr/lib/python2.7/dist-packages/glance/common/wsgi.py", line 1113, in __call__
2016-11-21 14:13:32.482 22491 ERROR glance.common.wsgi     request, **action_args)
2016-11-21 14:13:32.482 22491 ERROR glance.common.wsgi   File "/usr/lib/python2.7/dist-packages/glance/common/wsgi.py", line 1152, in dispatch
2016-11-21 14:13:32.482 22491 ERROR glance.common.wsgi     return method(*args, **kwargs)
2016-11-21 14:13:32.482 22491 ERROR glance.common.wsgi   File "/usr/lib/python2.7/dist-packages/glance/api/v1/images.py", line 459, in meta
2016-11-21 14:13:32.482 22491 ERROR glance.common.wsgi     image_meta = self.get_image_meta_or_404(req, id)
2016-11-21 14:13:32.482 22491 ERROR glance.common.wsgi   File "/usr/lib/python2.7/dist-packages/glance/api/v1/controller.py", line 41, in get_image_meta_or_404
2016-11-21 14:13:32.482 22491 ERROR glance.common.wsgi     return registry.get_image_metadata(context, image_id)
2016-11-21 14:13:32.482 22491 ERROR glance.common.wsgi   File "/usr/lib/python2.7/dist-packages/glance/registry/client/v1/api.py", line 182, in get_image_metadata
2016-11-21 14:13:32.482 22491 ERROR glance.common.wsgi     return c.get_image(image_id)
2016-11-21 14:13:32.482 22491 ERROR glance.common.wsgi   File "/usr/lib/python2.7/dist-packages/glance/registry/client/v1/client.py", line 169, in get_image
2016-11-21 14:13:32.482 22491 ERROR glance.common.wsgi     res = self.do_request("GET", "/images/%s" % image_id)
2016-11-21 14:13:32.482 22491 ERROR glance.common.wsgi   File "/usr/lib/python2.7/dist-packages/glance/registry/client/v1/client.py", line 147, in do_request
2016-11-21 14:13:32.482 22491 ERROR glance.common.wsgi     'exc_name': exc_name})
2016-11-21 14:13:32.482 22491 ERROR glance.common.wsgi   File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 220, in __exit__
2016-11-21 14:13:32.482 22491 ERROR glance.common.wsgi     self.force_reraise()
2016-11-21 14:13:32.482 22491 ERROR glance.common.wsgi   File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise
2016-11-21 14:13:32.482 22491 ERROR glance.common.wsgi     six.reraise(self.type_, self.value, self.tb)
2016-11-21 14:13:32.482 22491 ERROR glance.common.wsgi   File "/usr/lib/python2.7/dist-packages/glance/registry/client/v1/client.py", line 124, in do_request
2016-11-21 14:13:32.482 22491 ERROR glance.common.wsgi     **kwargs)
2016-11-21 14:13:32.482 22491 ERROR glance.common.wsgi   File "/usr/lib/python2.7/dist-packages/glance/common/client.py", line 70, in wrapped
2016-11-21 14:13:32.482 22491 ERROR glance.common.wsgi     return func(self, *args, **kwargs)
2016-11-21 14:13:32.482 22491 ERROR glance.common.wsgi   File "/usr/lib/python2.7/dist-packages/glance/common/client.py", line 373, in do_request
2016-11-21 14:13:32.482 22491 ERROR glance.common.wsgi     headers=copy.deepcopy(headers))
2016-11-21 14:13:32.482 22491 ERROR glance.common.wsgi   File "/usr/lib/python2.7/dist-packages/glance/common/client.py", line 87, in wrapped
2016-11-21 14:13:32.482 22491 ERROR glance.common.wsgi     return func(self, method, url, body, headers)
2016-11-21 14:13:32.482 22491 ERROR glance.common.wsgi   File "/usr/lib/python2.7/dist-packages/glance/common/client.py", line 507, in _do_request
2016-11-21 14:13:32.482 22491 ERROR glance.common.wsgi     res = c.getresponse()
2016-11-21 14:13:32.482 22491 ERROR glance.common.wsgi   File "/usr/lib/python2.7/httplib.py", line 1136, in getresponse
2016-11-21 14:13:32.482 22491 ERROR glance.common.wsgi     response.begin()
2016-11-21 14:13:32.482 22491 ERROR glance.common.wsgi   File "/usr/lib/python2.7/httplib.py", line 453, in begin
2016-11-21 14:13:32.482 22491 ERROR glance.common.wsgi     version, status, reason = self._read_status()
2016-11-21 14:13:32.482 22491 ERROR glance.common.wsgi   File "/usr/lib/python2.7/httplib.py", line 417, in _read_status
2016-11-21 14:13:32.482 22491 ERROR glance.common.wsgi     raise BadStatusLine(line)
2016-11-21 14:13:32.482 22491 ERROR glance.common.wsgi BadStatusLine: ''
2016-11-21 14:13:32.482 22491 ERROR glance.common.wsgi
2016-11-21 14:13:32.487 22491 INFO eventlet.wsgi.server [req-a3be22d6-9734-46fd-b694-2ee4273898b1 2cfe6360fd8d494c80ee2740b901e1e1 20d65370e91d428d8d83abb84b5c2c21 - default default] 172.30.160.7 - - [21/Nov/2016 14:13:32] "HEAD /v1/images/cirros-0.3.4 HTTP/1.1" 500 224 11.261853
2016-11-21 14:13:44.479 22491 ERROR glance.registry.client.v1.client [req-19a8ad51-396c-4339-9942-b3cc2e5eb1e4 2cfe6360fd8d494c80ee2740b901e1e1 20d65370e91d428d8d83abb84b5c2c21 - default default] Registry client request GET /images/cirros-0.3.4 raised BadStatusLine
2016-11-21 14:13:44.479 22491 ERROR glance.registry.client.v1.client Traceback (most recent call last):
2016-11-21 14:13:44.479 22491 ERROR glance.registry.client.v1.client   File "/usr/lib/python2.7/dist-packages/glance/registry/client/v1/client.py", line 124, in do_request

In nova-api.log I got the error as below

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'>

I found setting registry_host in glance-api.conf and glance-registry.conf is a solution to this. But currently iam not using any registry_host field in both conf files. I dont know what is actually causing this issue. Any help is really appreciated..

Registry client request GET /images/cirros-0.3.4 raised BadStatusLine

Hi,

I created an Openstack HA cluster with newton release. Everything seems to be working but when I tried to launch an instance Iam getting an error like below

root@info#openstack server create --flavor m1.nano --image cirros-0.3.4   --nic net-id=8b269db5-0361-473a-ab45-de9edd2b770f --security-group ec587216-4506-49a7-a3e0-e02034e54ff6   --key-name mykey test-instance

    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-3640b4f6-2afc-41c1-bae0-83f0fc647772)

I got the same above error while listing image with nova-image list

    root@info# nova image-list

 WARNING: Command image-list is deprecated and will be removed after Nova 15.0.0 is released. Use python-glanceclient or openstackclient instead.
    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-b842a4b0-e15b-4a17-bf93-b81cd4146e56)

When I checked /var/log/glance/glance-api.log I got error as Registry client request GET /images/cirros-0.3.4 raised BadStatusLine

2016-11-21 14:09:28.957 22488 INFO eventlet.wsgi.server [req-f9cc8eba-815f-414b-9a2e-b7b4008e785e 2cfe6360fd8d494c80ee2740b901e1e1 20d65370e91d428d8d83abb84b5c2c21 - default default] 172.30.160.7 - - [21/Nov/2016 14:09:28] "GET /v2/images?limit=20&sort_key=name&sort_dir=asc HTTP/1.1" 200 907 0.615587
2016-11-21 14:09:28.965 22488 INFO eventlet.wsgi.server [req-5c89d9a4-1f97-4bc5-b0c0-e8e43568d0e1 2cfe6360fd8d494c80ee2740b901e1e1 20d65370e91d428d8d83abb84b5c2c21 - default default] 172.30.160.7 - - [21/Nov/2016 14:09:28] "GET /v2/schemas/image HTTP/1.1" 200 4364 0.004669
2016-11-21 14:13:32.479 22491 ERROR glance.registry.client.v1.client [req-a3be22d6-9734-46fd-b694-2ee4273898b1 2cfe6360fd8d494c80ee2740b901e1e1 20d65370e91d428d8d83abb84b5c2c21 - default default] Registry client request GET /images/cirros-0.3.4 raised BadStatusLine
2016-11-21 14:13:32.479 22491 ERROR glance.registry.client.v1.client Traceback (most recent call last):
2016-11-21 14:13:32.479 22491 ERROR glance.registry.client.v1.client   File "/usr/lib/python2.7/dist-packages/glance/registry/client/v1/client.py", line 124, in do_request
2016-11-21 14:13:32.479 22491 ERROR glance.registry.client.v1.client     **kwargs)
2016-11-21 14:13:32.479 22491 ERROR glance.registry.client.v1.client   File "/usr/lib/python2.7/dist-packages/glance/common/client.py", line 70, in wrapped
2016-11-21 14:13:32.479 22491 ERROR glance.registry.client.v1.client     return func(self, *args, **kwargs)
2016-11-21 14:13:32.479 22491 ERROR glance.registry.client.v1.client   File "/usr/lib/python2.7/dist-packages/glance/common/client.py", line 373, in do_request
2016-11-21 14:13:32.479 22491 ERROR glance.registry.client.v1.client     headers=copy.deepcopy(headers))
2016-11-21 14:13:32.479 22491 ERROR glance.registry.client.v1.client   File "/usr/lib/python2.7/dist-packages/glance/common/client.py", line 87, in wrapped
2016-11-21 14:13:32.479 22491 ERROR glance.registry.client.v1.client     return func(self, method, url, body, headers)
2016-11-21 14:13:32.479 22491 ERROR glance.registry.client.v1.client   File "/usr/lib/python2.7/dist-packages/glance/common/client.py", line 507, in _do_request
2016-11-21 14:13:32.479 22491 ERROR glance.registry.client.v1.client     res = c.getresponse()
2016-11-21 14:13:32.479 22491 ERROR glance.registry.client.v1.client   File "/usr/lib/python2.7/httplib.py", line 1136, in getresponse
2016-11-21 14:13:32.479 22491 ERROR glance.registry.client.v1.client     response.begin()
2016-11-21 14:13:32.479 22491 ERROR glance.registry.client.v1.client   File "/usr/lib/python2.7/httplib.py", line 453, in begin
2016-11-21 14:13:32.479 22491 ERROR glance.registry.client.v1.client     version, status, reason = self._read_status()
2016-11-21 14:13:32.479 22491 ERROR glance.registry.client.v1.client   File "/usr/lib/python2.7/httplib.py", line 417, in _read_status
2016-11-21 14:13:32.479 22491 ERROR glance.registry.client.v1.client     raise BadStatusLine(line)
2016-11-21 14:13:32.479 22491 ERROR glance.registry.client.v1.client BadStatusLine: ''
2016-11-21 14:13:32.479 22491 ERROR glance.registry.client.v1.client
2016-11-21 14:13:32.482 22491 ERROR glance.common.wsgi [req-a3be22d6-9734-46fd-b694-2ee4273898b1 2cfe6360fd8d494c80ee2740b901e1e1 20d65370e91d428d8d83abb84b5c2c21 - default default] Caught error: ''
2016-11-21 14:13:32.482 22491 ERROR glance.common.wsgi Traceback (most recent call last):
2016-11-21 14:13:32.482 22491 ERROR glance.common.wsgi   File "/usr/lib/python2.7/dist-packages/glance/common/wsgi.py", line 1113, in __call__
2016-11-21 14:13:32.482 22491 ERROR glance.common.wsgi     request, **action_args)
2016-11-21 14:13:32.482 22491 ERROR glance.common.wsgi   File "/usr/lib/python2.7/dist-packages/glance/common/wsgi.py", line 1152, in dispatch
2016-11-21 14:13:32.482 22491 ERROR glance.common.wsgi     return method(*args, **kwargs)
2016-11-21 14:13:32.482 22491 ERROR glance.common.wsgi   File "/usr/lib/python2.7/dist-packages/glance/api/v1/images.py", line 459, in meta
2016-11-21 14:13:32.482 22491 ERROR glance.common.wsgi     image_meta = self.get_image_meta_or_404(req, id)
2016-11-21 14:13:32.482 22491 ERROR glance.common.wsgi   File "/usr/lib/python2.7/dist-packages/glance/api/v1/controller.py", line 41, in get_image_meta_or_404
2016-11-21 14:13:32.482 22491 ERROR glance.common.wsgi     return registry.get_image_metadata(context, image_id)
2016-11-21 14:13:32.482 22491 ERROR glance.common.wsgi   File "/usr/lib/python2.7/dist-packages/glance/registry/client/v1/api.py", line 182, in get_image_metadata
2016-11-21 14:13:32.482 22491 ERROR glance.common.wsgi     return c.get_image(image_id)
2016-11-21 14:13:32.482 22491 ERROR glance.common.wsgi   File "/usr/lib/python2.7/dist-packages/glance/registry/client/v1/client.py", line 169, in get_image
2016-11-21 14:13:32.482 22491 ERROR glance.common.wsgi     res = self.do_request("GET", "/images/%s" % image_id)
2016-11-21 14:13:32.482 22491 ERROR glance.common.wsgi   File "/usr/lib/python2.7/dist-packages/glance/registry/client/v1/client.py", line 147, in do_request
2016-11-21 14:13:32.482 22491 ERROR glance.common.wsgi     'exc_name': exc_name})
2016-11-21 14:13:32.482 22491 ERROR glance.common.wsgi   File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 220, in __exit__
2016-11-21 14:13:32.482 22491 ERROR glance.common.wsgi     self.force_reraise()
2016-11-21 14:13:32.482 22491 ERROR glance.common.wsgi   File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise
2016-11-21 14:13:32.482 22491 ERROR glance.common.wsgi     six.reraise(self.type_, self.value, self.tb)
2016-11-21 14:13:32.482 22491 ERROR glance.common.wsgi   File "/usr/lib/python2.7/dist-packages/glance/registry/client/v1/client.py", line 124, in do_request
2016-11-21 14:13:32.482 22491 ERROR glance.common.wsgi     **kwargs)
2016-11-21 14:13:32.482 22491 ERROR glance.common.wsgi   File "/usr/lib/python2.7/dist-packages/glance/common/client.py", line 70, in wrapped
2016-11-21 14:13:32.482 22491 ERROR glance.common.wsgi     return func(self, *args, **kwargs)
2016-11-21 14:13:32.482 22491 ERROR glance.common.wsgi   File "/usr/lib/python2.7/dist-packages/glance/common/client.py", line 373, in do_request
2016-11-21 14:13:32.482 22491 ERROR glance.common.wsgi     headers=copy.deepcopy(headers))
2016-11-21 14:13:32.482 22491 ERROR glance.common.wsgi   File "/usr/lib/python2.7/dist-packages/glance/common/client.py", line 87, in wrapped
2016-11-21 14:13:32.482 22491 ERROR glance.common.wsgi     return func(self, method, url, body, headers)
2016-11-21 14:13:32.482 22491 ERROR glance.common.wsgi   File "/usr/lib/python2.7/dist-packages/glance/common/client.py", line 507, in _do_request
2016-11-21 14:13:32.482 22491 ERROR glance.common.wsgi     res = c.getresponse()
2016-11-21 14:13:32.482 22491 ERROR glance.common.wsgi   File "/usr/lib/python2.7/httplib.py", line 1136, in getresponse
2016-11-21 14:13:32.482 22491 ERROR glance.common.wsgi     response.begin()
2016-11-21 14:13:32.482 22491 ERROR glance.common.wsgi   File "/usr/lib/python2.7/httplib.py", line 453, in begin
2016-11-21 14:13:32.482 22491 ERROR glance.common.wsgi     version, status, reason = self._read_status()
2016-11-21 14:13:32.482 22491 ERROR glance.common.wsgi   File "/usr/lib/python2.7/httplib.py", line 417, in _read_status
2016-11-21 14:13:32.482 22491 ERROR glance.common.wsgi     raise BadStatusLine(line)
2016-11-21 14:13:32.482 22491 ERROR glance.common.wsgi BadStatusLine: ''
2016-11-21 14:13:32.482 22491 ERROR glance.common.wsgi
2016-11-21 14:13:32.487 22491 INFO eventlet.wsgi.server [req-a3be22d6-9734-46fd-b694-2ee4273898b1 2cfe6360fd8d494c80ee2740b901e1e1 20d65370e91d428d8d83abb84b5c2c21 - default default] 172.30.160.7 - - [21/Nov/2016 14:13:32] "HEAD /v1/images/cirros-0.3.4 HTTP/1.1" 500 224 11.261853
2016-11-21 14:13:44.479 22491 ERROR glance.registry.client.v1.client [req-19a8ad51-396c-4339-9942-b3cc2e5eb1e4 2cfe6360fd8d494c80ee2740b901e1e1 20d65370e91d428d8d83abb84b5c2c21 - default default] Registry client request GET /images/cirros-0.3.4 raised BadStatusLine
2016-11-21 14:13:44.479 22491 ERROR glance.registry.client.v1.client Traceback (most recent call last):
2016-11-21 14:13:44.479 22491 ERROR glance.registry.client.v1.client   File "/usr/lib/python2.7/dist-packages/glance/registry/client/v1/client.py", line 124, in do_request

In nova-api.log I got the error as below

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'>

I found setting registry_host in glance-api.conf and glance-registry.conf is a solution to this. But currently iam not using any registry_host field in both conf files. I dont know what is actually causing this issue. Any help is really appreciated..