UnknownConnectionError

Bug #1730800 reported by zhi xu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Expired
Undecided
Unassigned

Bug Description

[root@controller ~]# openstack server create --flavor m1.nano --image cirros-0.3.0-i386 --security-group permitall --key-name mykey provider-instance Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.
<class 'keystoneauth1.exceptions.connection.UnknownConnectionError'> (HTTP 500) (Request-ID: req-87716e72-824e-4618-9854-4be8ea96166b)
[root@controller ~]#
[root@controller ~]#
[root@controller ~]# !cat
cat /var/log/nova/nova-api.log

2017-11-08 09:29:32.956 1938 INFO nova.api.openstack.wsgi [req-a6350065-4421-4e8f-b9a4-a65913a1d568 78688b319571447080aea1e62f59ecb5 15e6f6ed6c9240168b85b561fcc8bc0f - default default] HTTP exception thrown: Flavor m1.nano could not be found.
2017-11-08 09:29:32.959 1938 INFO nova.osapi_compute.wsgi.server [req-a6350065-4421-4e8f-b9a4-a65913a1d568 78688b319571447080aea1e62f59ecb5 15e6f6ed6c9240168b85b561fcc8bc0f - default default] 192.168.99.6 "GET /v2.1/flavors/m1.nano HTTP/1.1" status: 404 len: 500 time: 0.0435319
2017-11-08 09:29:32.982 1938 INFO nova.osapi_compute.wsgi.server [req-8a0509c7-3178-4458-94ab-7a10299d0134 78688b319571447080aea1e62f59ecb5 15e6f6ed6c9240168b85b561fcc8bc0f - default default] 192.168.99.6 "GET /v2.1/flavors HTTP/1.1" status: 200 len: 586 time: 0.0198040
2017-11-08 09:29:32.999 1938 INFO nova.osapi_compute.wsgi.server [req-49747957-6405-4370-81ac-c9c4eaf80708 78688b319571447080aea1e62f59ecb5 15e6f6ed6c9240168b85b561fcc8bc0f - default default] 192.168.99.6 "GET /v2.1/flavors/0 HTTP/1.1" status: 200 len: 752 time: 0.0131040
2017-11-08 09:29:33.189 1938 ERROR nova.api.openstack.extensions [req-87716e72-824e-4618-9854-4be8ea96166b 78688b319571447080aea1e62f59ecb5 15e6f6ed6c9240168b85b561fcc8bc0f - default default] Unexpected exception in API method: UnknownConnectionError: Unexpected exception for api_server = http://controller:9292/v2/images/6c861554-35b2-49eb-8dbf-a2a51bc1d07a: No connection adapters were found for 'api_server = http://controller:9292/v2/images/6c861554-35b2-49eb-8dbf-a2a51bc1d07a'
2017-11-08 09:29:33.189 1938 ERROR nova.api.openstack.extensions Traceback (most recent call last):
2017-11-08 09:29:33.189 1938 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/nova/api/openstack/extensions.py", line 336, in wrapped
2017-11-08 09:29:33.189 1938 ERROR nova.api.openstack.extensions return f(*args, **kwargs)
2017-11-08 09:29:33.189 1938 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/nova/api/validation/__init__.py", line 108, in wrapper
2017-11-08 09:29:33.189 1938 ERROR nova.api.openstack.extensions return func(*args, **kwargs)
2017-11-08 09:29:33.189 1938 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/nova/api/validation/__init__.py", line 108, in wrapper
2017-11-08 09:29:33.189 1938 ERROR nova.api.openstack.extensions return func(*args, **kwargs)
2017-11-08 09:29:33.189 1938 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/nova/api/validation/__init__.py", line 108, in wrapper
2017-11-08 09:29:33.189 1938 ERROR nova.api.openstack.extensions return func(*args, **kwargs)
2017-11-08 09:29:33.189 1938 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/nova/api/validation/__init__.py", line 108, in wrapper
2017-11-08 09:29:33.189 1938 ERROR nova.api.openstack.extensions return func(*args, **kwargs)
2017-11-08 09:29:33.189 1938 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/nova/api/validation/__init__.py", line 108, in wrapper
2017-11-08 09:29:33.189 1938 ERROR nova.api.openstack.extensions return func(*args, **kwargs)
2017-11-08 09:29:33.189 1938 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/nova/api/validation/__init__.py", line 108, in wrapper
2017-11-08 09:29:33.189 1938 ERROR nova.api.openstack.extensions return func(*args, **kwargs)
2017-11-08 09:29:33.189 1938 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/nova/api/validation/__init__.py", line 108, in wrapper
2017-11-08 09:29:33.189 1938 ERROR nova.api.openstack.extensions return func(*args, **kwargs)
2017-11-08 09:29:33.189 1938 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/nova/api/openstack/compute/servers.py", line 553, in create
2017-11-08 09:29:33.189 1938 ERROR nova.api.openstack.extensions **create_kwargs)
2017-11-08 09:29:33.189 1938 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/nova/hooks.py", line 154, in inner
2017-11-08 09:29:33.189 1938 ERROR nova.api.openstack.extensions rv = f(*args, **kwargs)
2017-11-08 09:29:33.189 1938 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/nova/compute/api.py", line 1635, in create
2017-11-08 09:29:33.189 1938 ERROR nova.api.openstack.extensions tags=tags)
2017-11-08 09:29:33.189 1938 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/nova/compute/api.py", line 1076, in _create_instance
2017-11-08 09:29:33.189 1938 ERROR nova.api.openstack.extensions image_id, boot_meta = self._get_image(context, image_href)
2017-11-08 09:29:33.189 1938 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/nova/compute/api.py", line 742, in _get_image
2017-11-08 09:29:33.189 1938 ERROR nova.api.openstack.extensions image = self.image_api.get(context, image_href)
2017-11-08 09:29:33.189 1938 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/nova/image/api.py", line 95, in get
2017-11-08 09:29:33.189 1938 ERROR nova.api.openstack.extensions show_deleted=show_deleted)
2017-11-08 09:29:33.189 1938 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/nova/image/glance.py", line 231, in show
2017-11-08 09:29:33.189 1938 ERROR nova.api.openstack.extensions _reraise_translated_image_exception(image_id)
2017-11-08 09:29:33.189 1938 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/nova/image/glance.py", line 820, in _reraise_translated_image_exception
2017-11-08 09:29:33.189 1938 ERROR nova.api.openstack.extensions six.reraise(type(new_exc), new_exc, exc_trace)
2017-11-08 09:29:33.189 1938 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/nova/image/glance.py", line 229, in show
2017-11-08 09:29:33.189 1938 ERROR nova.api.openstack.extensions image = self._client.call(context, 2, 'get', image_id)
2017-11-08 09:29:33.189 1938 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/nova/image/glance.py", line 166, in call
2017-11-08 09:29:33.189 1938 ERROR nova.api.openstack.extensions result = getattr(controller, method)(*args, **kwargs)
2017-11-08 09:29:33.189 1938 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/glanceclient/v2/images.py", line 197, in get
2017-11-08 09:29:33.189 1938 ERROR nova.api.openstack.extensions return self._get(image_id)
2017-11-08 09:29:33.189 1938 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/glanceclient/common/utils.py", line 545, in inner
2017-11-08 09:29:33.189 1938 ERROR nova.api.openstack.extensions return RequestIdProxy(wrapped(*args, **kwargs))
2017-11-08 09:29:33.189 1938 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/glanceclient/v2/images.py", line 190, in _get
2017-11-08 09:29:33.189 1938 ERROR nova.api.openstack.extensions resp, body = self.http_client.get(url, headers=header)
2017-11-08 09:29:33.189 1938 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/keystoneauth1/adapter.py", line 288, in get
2017-11-08 09:29:33.189 1938 ERROR nova.api.openstack.extensions return self.request(url, 'GET', **kwargs)
2017-11-08 09:29:33.189 1938 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/glanceclient/common/http.py", line 335, in request
2017-11-08 09:29:33.189 1938 ERROR nova.api.openstack.extensions **kwargs)
2017-11-08 09:29:33.189 1938 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/keystoneauth1/adapter.py", line 192, in request
2017-11-08 09:29:33.189 1938 ERROR nova.api.openstack.extensions return self.session.request(url, method, **kwargs)
2017-11-08 09:29:33.189 1938 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/positional/__init__.py", line 101, in inner
2017-11-08 09:29:33.189 1938 ERROR nova.api.openstack.extensions return wrapped(*args, **kwargs)
2017-11-08 09:29:33.189 1938 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/keystoneauth1/session.py", line 703, in request
2017-11-08 09:29:33.189 1938 ERROR nova.api.openstack.extensions resp = send(**kwargs)
2017-11-08 09:29:33.189 1938 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/keystoneauth1/session.py", line 781, in _send_request
2017-11-08 09:29:33.189 1938 ERROR nova.api.openstack.extensions raise exceptions.UnknownConnectionError(msg, e)
2017-11-08 09:29:33.189 1938 ERROR nova.api.openstack.extensions UnknownConnectionError: Unexpected exception for api_server = http://controller:9292/v2/images/6c861554-35b2-49eb-8dbf-a2a51bc1d07a: No connection adapters were found for 'api_server = http://controller:9292/v2/images/6c861554-35b2-49eb-8dbf-a2a51bc1d07a'
2017-11-08 09:29:33.189 1938 ERROR nova.api.openstack.extensions
2017-11-08 09:29:33.190 1938 INFO nova.api.openstack.wsgi [req-87716e72-824e-4618-9854-4be8ea96166b 78688b319571447080aea1e62f59ecb5 15e6f6ed6c9240168b85b561fcc8bc0f - default default] HTTP exception thrown: Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.
<class 'keystoneauth1.exceptions.connection.UnknownConnectionError'>
2017-11-08 09:29:33.191 1938 INFO nova.osapi_compute.wsgi.server [req-87716e72-824e-4618-9854-4be8ea96166b 78688b319571447080aea1e62f59ecb5 15e6f6ed6c9240168b85b561fcc8bc0f - default default] 192.168.99.6 "POST /v2.1/servers HTTP/1.1" status: 500 len: 665 time: 0.0402000
[root@controller ~]#

Tags: api
Revision history for this message
priyaduggirala (priyad) wrote :

Looks like a configuration issue in glance/nova. I would suggest you to look at or share debug logs and versions of python-glanceclient

Revision history for this message
Matt Riedemann (mriedem) wrote :

This might be related to what Eric Fried is doing with keystoneauth adapters for configuration in Queens (current master).

tags: added: api
Revision history for this message
Matt Riedemann (mriedem) wrote :

What does the [glance] section of your nova.conf look like? Because it looks like you might have a full URL reference to an image in there? That would be wrong.

'api_server = http://controller:9292/v2/images/6c861554-35b2-49eb-8dbf-a2a51bc1d07a'

Revision history for this message
Matt Riedemann (mriedem) wrote :

Or maybe the 'image' entry in the service catalog does not match 'controller:9292'? What does "openstack catalog list" look like?

Revision history for this message
Eric Fried (efried) wrote :

What version is this? Pike? What's the version of keystoneauth? Looks like could be 3.1.0? Your confs will probably be needed.

This could be a missing/invalid service catalog entry for glance. Does the URL displayed by

openstack endpoint list --service glance

match what you've listed in your nova compute conf under [glance]api_servers ?

Changed in nova:
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for OpenStack Compute (nova) because there has been no activity for 60 days.]

Changed in nova:
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.