Ask Your Question
0

Launch Instance "Error: Registry client request GET /images/cirros-0.3.4 raised BadStatusLine"

asked 2016-11-21 08:24:33 -0600

vathanlal gravatar image

updated 2016-11-21 08:29:36 -0600

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 ...
(more)
edit retag flag offensive close merge delete

Comments

You use Glance API v2 but registry client v1. I would think they should have the same version.

Bernd Bausch gravatar imageBernd Bausch ( 2016-11-21 15:18:40 -0600 )edit

Python doc says that BadStatusLine means the status from the http server can't be parsed. This makes me wonder if the registry client is really contacting the registry or something else listens at the registry port 9191. Check the other registry options, switch on DEBUG logging and try again.

Bernd Bausch gravatar imageBernd Bausch ( 2016-11-21 17:41:29 -0600 )edit

It seems like haproxy is listening at 9191

root@info:~# netstat -anp | grep 9191

tcp 0 0 0.0.0.0:9191 0.0.0.0:* LISTEN 23046/haproxy

vathanlal gravatar imagevathanlal ( 2016-11-22 02:41:36 -0600 )edit

there is no python process running in port 9191

vathanlal gravatar imagevathanlal ( 2016-11-22 02:46:50 -0600 )edit

First, what is behind that HA-proxy? If it's the Glance registry, perhaps the ha-proxy config is wrong. If not, why do you use port 9191? Second, you dont't need the registry. Comments in the glance-api.conf explain how to disable it. Better reduce the number of moving parts.

Bernd Bausch gravatar imageBernd Bausch ( 2016-11-22 05:23:05 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2016-11-25 09:56:11 -0600

vathanlal gravatar image

I solved this issue by adding below line in my glance-api.conf

registry_host = HAproxy node IP
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2016-11-21 08:24:33 -0600

Seen: 637 times

Last updated: Nov 25 '16