Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Can't connect to OpenStack Cloud using command line clients

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.py", line 467, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: 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/glanceclient/common/http.py", line 321, in request
    **kwargs)
  File "/usr/local/lib/python3.4/dist-packages/keystoneclient/adapter.py", line 101, in request
    return self.session.request(url, method, **kwargs)
  File "/usr/local/lib/python3.4/dist-packages/positional/__init__.py", line 101, in inner
    return wrapped(*args, **kwargs)
  File "/usr/local/lib/python3.4/dist-packages/keystoneclient/session.py", line 404, in request
    resp = send(**kwargs)
  File "/usr/local/lib/python3.4/dist-packages/keystoneclient/session.py", line 448, in _send_request
    raise exceptions.ConnectionRefused(msg)
keystoneauth1.exceptions.connection.ConnectFailure: Unable to establish connection to http://controller:9292/versions

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.4/dist-packages/glanceclient/shell.py", line 670, in main
    OpenStackImagesShell().main(argv)
  File "/usr/local/lib/python3.4/dist-packages/glanceclient/shell.py", line 556, in main
    resp, body = client.http_client.get('/versions')
  File "/usr/local/lib/python3.4/dist-packages/keystoneclient/adapter.py", line 176, in get
    return self.request(url, 'GET', **kwargs)
  File "/usr/local/lib/python3.4/dist-packages/glanceclient/common/http.py", line 333, in request
    raise exc.CommunicationError(message=message)
glanceclient.exc.CommunicationError: Error finding address for http://controller:9292/versions: Unable to establish connection to http://controller:9292/versions
Error finding address for http://controller:9292/versions: Unable to establish connection to http://controller:9292/versions

I've already downloaded the Open Stack RC file from the cloud and changed

export OS_AUTH_URL=http://controller:5000/v2.0

to

export OS_AUTH_URL=http://theaddressofmycloud:5000/v2.0

I also tried to use the python API such that when I followed the tutorial from the documentation, I get:

2016-06-29 12:38:23,078 DEBUG: keystoneauth.identity.v2 Making authentication request to http://theaddressofmycloud:5000/v2.0/tokens
2016-06-29 12:38:23,131 DEBUG: keystoneauth.session REQ: curl -g -i -X GET http://controller:9292/v1/images -H "User-Agent: openstacksdk/0.8.6 keystoneauth1/2.8.0 python-requests/2.10.0 CPython/3.4.3" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}5e5e626fee1757101edfd7f81d1b9fd276682faa"

It is weird because I installed the command lines tools following the tutorial instructions. Am I missing to do some configuration?