Failed to discover available identity versions when contacting http://controller:35357

The easiest solution is to read up on the manual for this error since it’s either a typo or you didn’t finish the configuration of openstack and that’s why you’re getting this message.

The message below is from glance the image service for virtual images

2020-05-16 11:13:25.001 4210 WARNING keystoneauth.identity.generic.base [-] Failed to discover available identity versions when contacting http://controller:35357. Attempting to parse version from URL.: ConnectFailure: Unable to establish connection to http://controller:35357: HTTPConnectionPool(host='controller', port=35357): Max retries exceeded with url: / (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7fc412312150>: Failed to establish a new connection: [Errno -2] No address found',))2020-05-16 11:13:25.001 4210 WARNING keystoneauth.identity.generic.base [-] Failed to discover available identity versions when contacting http://controller:35357. Attempting to parse version from URL.: ConnectFailure: Unable to establish connection to http://controller:35357: HTTPConnectionPool(host='controller', port=35357): Max retries exceeded with url: / (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7fc412312150>: Failed to establish a new connection: [Errno -2] No address found',))2020-05-16 11:13:25.003 4210 INFO eventlet.wsgi.server [-] Traceback (most recent call last):  File "/usr/lib/python2.7/site-packages/eventlet/wsgi.py", line 490, in handle_one_response    result = self.application(self.environ, start_response)  File "/usr/lib/python2.7/site-packages/webob/dec.py", line 131, in __call__    resp = self.call_func(req, *args, **self.kwargs)  File "/usr/lib/python2.7/site-packages/webob/dec.py", line 196, in call_func    return self.func(req, *args, **kwargs)  File "/usr/lib/python2.7/site-packages/oslo_middleware/base.py", line 131, in __call__    response = req.get_response(self.application)  File "/usr/lib/python2.7/site-packages/webob/request.py", line 1316, in send    application, catch_exc_info=False)  File "/usr/lib/python2.7/site-packages/webob/request.py", line 1280, in call_application    app_iter = application(self.environ, start_response)  File "/usr/lib/python2.7/site-packages/webob/dec.py", line 131, in __call__    resp = self.call_func(req, *args, **self.kwargs)  File "/usr/lib/python2.7/site-packages/webob/dec.py", line 196, in call_func    return self.func(req, *args, **kwargs)  File "/usr/lib/python2.7/site-packages/oslo_middleware/base.py", line 131, in __call__    response = req.get_response(self.application)  File "/usr/lib/python2.7/site-packages/webob/request.py", line 1316, in send    application, catch_exc_info=False)  File "/usr/lib/python2.7/site-packages/webob/request.py", line 1280, in call_application    app_iter = application(self.environ, start_response)  File "/usr/lib/python2.7/site-packages/webob/dec.py", line 131, in __call__    resp = self.call_func(req, *args, **self.kwargs)  File "/usr/lib/python2.7/site-packages/webob/dec.py", line 196, in call_func    return self.func(req, *args, **kwargs)  File "/usr/lib/python2.7/site-packages/oslo_middleware/base.py", line 131, in __call__    response = req.get_response(self.application)  File "/usr/lib/python2.7/site-packages/webob/request.py", line 1316, in send    application, catch_exc_info=False)  File "/usr/lib/python2.7/site-packages/webob/request.py", line 1280, in call_application    app_iter = application(self.environ, start_response)  File "/usr/lib/python2.7/site-packages/webob/dec.py", line 131, in __call__    resp = self.call_func(req, *args, **self.kwargs)  File "/usr/lib/python2.7/site-packages/webob/dec.py", line 196, in call_func    return self.func(req, *args, **kwargs)  File "/usr/lib/python2.7/site-packages/glance/common/wsgi.py", line 809, in __call__    response = req.get_response(self.application)  File "/usr/lib/python2.7/site-packages/webob/request.py", line 1316, in send    application, catch_exc_info=False)  File "/usr/lib/python2.7/site-packages/webob/request.py", line 1280, in call_application    app_iter = application(self.environ, start_response)  File "/usr/lib/python2.7/site-packages/webob/dec.py", line 131, in __call__    resp = self.call_func(req, *args, **self.kwargs)  File "/usr/lib/python2.7/site-packages/webob/dec.py", line 196, in call_func    return self.func(req, *args, **kwargs)  File "/usr/lib/python2.7/site-packages/osprofiler/web.py", line 119, in __call__    return request.get_response(self.application)  File "/usr/lib/python2.7/site-packages/webob/request.py", line 1316, in send    application, catch_exc_info=False)  File "/usr/lib/python2.7/site-packages/webob/request.py", line 1280, in call_application    app_iter = application(self.environ, start_response)  File "/usr/lib/python2.7/site-packages/webob/dec.py", line 131, in __call__    resp = self.call_func(req, *args, **self.kwargs)  File "/usr/lib/python2.7/site-packages/webob/dec.py", line 196, in call_func    return self.func(req, *args, **kwargs)  File "/usr/lib/python2.7/site-packages/keystonemiddleware/auth_token/__init__.py", line 334, in __call__    response = self.process_request(req)  File "/usr/lib/python2.7/site-packages/keystonemiddleware/auth_token/__init__.py", line 633, in process_request    resp = super(AuthProtocol, self).process_request(request)  File "/usr/lib/python2.7/site-packages/keystonemiddleware/auth_token/__init__.py", line 407, in process_request    allow_expired=allow_expired)  File "/usr/lib/python2.7/site-packages/keystonemiddleware/auth_token/__init__.py", line 440, in _do_fetch_token    data = self.fetch_token(token, **kwargs)  File "/usr/lib/python2.7/site-packages/keystonemiddleware/auth_token/__init__.py", line 772, in fetch_token    allow_expired=allow_expired)  File "/usr/lib/python2.7/site-packages/keystonemiddleware/auth_token/_identity.py", line 219, in verify_token    auth_ref = self._request_strategy.verify_token(  File "/usr/lib/python2.7/site-packages/keystonemiddleware/auth_token/_identity.py", line 170, in _request_strategy    strategy_class = self._get_strategy_class()  File "/usr/lib/python2.7/site-packages/keystonemiddleware/auth_token/_identity.py", line 192, in _get_strategy_class    if self._adapter.get_endpoint(version=klass.AUTH_VERSION):  File "/usr/lib/python2.7/site-packages/keystoneauth1/adapter.py", line 223, in get_endpoint    return self.session.get_endpoint(auth or self.auth, **kwargs)  File "/usr/lib/python2.7/site-packages/keystoneauth1/session.py", line 942, in get_endpoint    return auth.get_endpoint(self, **kwargs)  File "/usr/lib/python2.7/site-packages/keystoneauth1/identity/base.py", line 379, in get_endpoint    allow_version_hack=allow_version_hack, **kwargs)  File "/usr/lib/python2.7/site-packages/keystoneauth1/identity/base.py", line 270, in get_endpoint_data    service_catalog = self.get_access(session).service_catalog  File "/usr/lib/python2.7/site-packages/keystoneauth1/identity/base.py", line 134, in get_access    self.auth_ref = self.get_auth_ref(session)  File "/usr/lib/python2.7/site-packages/keystoneauth1/identity/generic/base.py", line 199, in get_auth_ref    self._plugin = self._do_create_plugin(session)  File "/usr/lib/python2.7/site-packages/keystoneauth1/identity/generic/base.py", line 194, in _do_create_plugin    raise exceptions.DiscoveryFailure('Could not determine a suitable URL 'DiscoveryFailure: Could not determine a suitable URL for the plugin
2020-05-16 11:13:25.004 4210 INFO eventlet.wsgi.server [-] 192.168.2.60 - - [16/May/2020 11:13:25] "GET /v2/schemas/image HTTP/1.1" 500 139 0.101550


You would resolve this by adding an entry in your /etc/hosts file

Our controller is called controller and from error message our IP address is 192.168.2.60

$ sudo vim /etc/hosts

add line:

192.168.2.60  controller 

and save, you shouldn’t have an error now.

Now if you try’en insert the cirros-0.3.5-x86_64-disk.img image you should now see

# openstack image create “cirros” –file cirros-0.3.5-x86_64-disk.img –disk-format qcow2 –container-format bare –public

+——————+——————————————————+
| Field | Value |
+——————+——————————————————+
| checksum | f8ab98ff5e73ebab884d80c9dc9c7290 |
| container_format | bare |
| created_at | 2020-05-16T18:37:43Z |
| disk_format | qcow2 |
| file | /v2/images/e8c329ac-dc75-4c47-88de-ca8313e1956c/file |
| id | e8c329ac-dc75-4c47-88de-ca8313e1956c |
| min_disk | 0 |
| min_ram | 0 |
| name | cirros |
| owner | 47af17373cd840e398f45f6db59cd21b |
| protected | False |
| schema | /v2/schemas/image |
| size | 13267968 |
| status | active |
| tags | |
| updated_at | 2020-05-16T18:37:44Z |
| virtual_size | None |
| visibility | public |
+——————+——————————————————+

Insertion completed without errors, also if you have the auth errors please verify your configuration file.

Resolved


Go to Source of this post
Author Of this post:
Title Of post: Failed to discover available identity versions when contacting http://controller:35357
Author Link: {authorlink}