Ask Your Question
0

Can't connect to OpenStack Cloud using command line clients

asked 2016-06-29 10:47:52 -0500

Daniel Ramos gravatar image

I've been trying to connect to the cloud using the command lines clients, but I've not been successfull. For instance, when I use the command:

glance --debug image-list

I get this output:

Traceback (most recent call last):
  File "/usr/local/lib/python3.4/dist-packages/requests/packages/urllib3/connection.py", line 142, in _new_conn
    (self.host, self.port), self.timeout, **extra_kw)
  File "/usr/local/lib/python3.4/dist-packages/requests/packages/urllib3/util/connection.py", line 91, in create_connection
    raise err
  File "/usr/local/lib/python3.4/dist-packages/requests/packages/urllib3/util/connection.py", line 81, in create_connection
    sock.connect(sa)
TimeoutError: [Errno 110] Connection timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.4/dist-packages/requests/packages/urllib3/connectionpool.py", line 578, in urlopen
    chunked=chunked)
  File "/usr/local/lib/python3.4/dist-packages/requests/packages/urllib3/connectionpool.py", line 362, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/usr/lib/python3.4/http/client.py", line 1088, in request
    self._send_request(method, url, body, headers)
  File "/usr/lib/python3.4/http/client.py", line 1126, in _send_request
    self.endheaders(body)
  File "/usr/lib/python3.4/http/client.py", line 1084, in endheaders
    self._send_output(message_body)
  File "/usr/lib/python3.4/http/client.py", line 922, in _send_output
    self.send(msg)
  File "/usr/lib/python3.4/http/client.py", line 857, in send
    self.connect()
  File "/usr/local/lib/python3.4/dist-packages/requests/packages/urllib3/connection.py", line 167, in connect
    conn = self._new_conn()
  File "/usr/local/lib/python3.4/dist-packages/requests/packages/urllib3/connection.py", line 151, in _new_conn
    self, "Failed to establish a new connection: %s" % e)
requests.packages.urllib3.exceptions.NewConnectionError: <requests.packages.urllib3.connection.HTTPConnection object at 0x7f59fddced30>: Failed to establish a new connection: [Errno 110] Connection timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.4/dist-packages/requests/adapters.py", line 403, in send
    timeout=timeout
  File "/usr/local/lib/python3.4/dist-packages/requests/packages/urllib3/connectionpool.py", line 623, in urlopen
    _stacktrace=sys.exc_info()[2])
  File "/usr/local/lib/python3.4/dist-packages/requests/packages/urllib3/util/retry.py", line 281, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
requests.packages.urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='controller', port=9292): Max retries exceeded with url: /versions (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7f59fddced30>: Failed to establish a new connection: [Errno 110] Connection timed out',))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.4/dist-packages/keystoneclient/session.py", line 438, in _send_request
    resp = self.session.request(method, url, **kwargs)
  File "/usr/local/lib/python3.4/dist-packages/requests/sessions.py", line 475, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.4/dist-packages/requests/sessions.py", line 585, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.4/dist-packages/requests/adapters ...
(more)
edit retag flag offensive close merge delete

Comments

Post new results after changing your OS_AUTH_URL. Also verify that you don't have anything else listed as 'controller' for the hostname in your openrc.

mpetason gravatar imagempetason ( 2016-06-29 15:44:26 -0500 )edit

Change OS_AUTH_URL? In openrc file? If yes, I already did it. My openrc file does only contain OS_AUTH_URL, OS_TENANT_ID, OS_TENANT_NAME, OS_PASSWORD and OS_REGION.

Daniel Ramos gravatar imageDaniel Ramos ( 2016-07-04 07:38:42 -0500 )edit

Ok, you need to verify that your keystone endpoints have the correct IP (or host name) instead of controller as well, then verify that all of your configs do not contain "controller" as the hostname.

keystone endpoint-list

mpetason gravatar imagempetason ( 2016-07-04 11:55:39 -0500 )edit

1 answer

Sort by » oldest newest most voted
0

answered 2016-07-04 13:29:17 -0500

Malinoski gravatar image

Hi Daniel,

Some cloud clients (such as JCloud and OpenStack4J) can receive new URLs for specific procedures from the cloud. I believe the OpenStack client may have the same behavior. If the OpenStack cloud was configured with the host controller, the clients will not recognize the new received URLs.

So, maybe, if you configure your machine to recognize the "controller" host, can be an alternative to resolve your problem. This setting can be made ​​in /etc/hosts file by adding the line: controller openstack.remote.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

Stats

Asked: 2016-06-29 10:47:52 -0500

Seen: 899 times

Last updated: Jul 04 '16