SAHARA ERROR: Unable to establish connection [closed]

asked 2016-01-05 01:12:49 -0600

xiangfei-ma gravatar image

updated 2016-01-05 04:09:33 -0600

I am running kilo on RHEL7. I installed SAHARA recently, but it keeps showing error when I excute the sahara command just like below.
How to fix this?
my controller:
internal ip: 128.0.0.27
external ip: 109.105.117.27

[root@osc-27 ~(keystone_admin)]# sahara --debug cluster-list
DEBUG (session:195) REQ: curl -g -i -X GET http://128.0.0.27:5000/v2.0 -H "Accept: application/json" -H "User-Agent: python-keystoneclient"
INFO (connectionpool:203) Starting new HTTP connection (1): 128.0.0.27
DEBUG (connectionpool:383) "GET /v2.0 HTTP/1.1" 200 336
DEBUG (session:224) RESP: [200] content-length: 336 vary: X-Auth-Token connection: keep-alive date: Tue, 05 Jan 2016 06:56:29 GMT content-type: application/json x-openstack-request-id: req-546aa178-1130-49a6-9315-6d0e9d5da37a 
RESP BODY: {"version": {"status": "stable", "updated": "2014-04-17T00:00:00Z", "media-types": [{"base": "application/json", "type": "application/vnd.openstack.identity-v2.0+json"}], "id": "v2.0", "links": [{"href": "http://128.0.0.27:5000/v2.0/", "rel": "self"}, {"href": "http://docs.openstack.org/", "type": "text/html", "rel": "describedby"}]}}

DEBUG (v2:76) Making authentication request to http://128.0.0.27:5000/v2.0/tokens
DEBUG (connectionpool:383) "POST /v2.0/tokens HTTP/1.1" 200 3721
DEBUG (iso8601:184) Parsed 2016-01-05T07:56:29Z into {'tz_sign': None, 'second_fraction': None, 'hour': u'07', 'daydash': u'05', 'tz_hour': None, 'month': None, 'timezone': u'Z', 'second': u'29', 'tz_minute': None, 'year': u'2016', 'separator': u'T', 'monthdash': u'01', 'day': None, 'minute': u'56'} with default timezone <iso8601.iso8601.Utc object at 0x19ef610>
DEBUG (iso8601:140) Got u'2016' for 'year' with default None
DEBUG (iso8601:140) Got u'01' for 'monthdash' with default 1
DEBUG (iso8601:140) Got 1 for 'month' with default 1
DEBUG (iso8601:140) Got u'05' for 'daydash' with default 1
DEBUG (iso8601:140) Got 5 for 'day' with default 5
DEBUG (iso8601:140) Got u'07' for 'hour' with default None
DEBUG (iso8601:140) Got u'56' for 'minute' with default None
DEBUG (iso8601:140) Got u'29' for 'second' with default None
DEBUG (session:195) REQ: curl -g -i -X GET http://109.105.117.27:8386/v1.1/fa1533c611514fc493b8777fc57aac09/clusters -H "User-Agent: python-saharaclient" -H "X-Auth-Token: {SHA1}a710c062d2bef3b2a53aad840cd0583d2ffc6c25"
INFO (connectionpool:203) Starting new HTTP connection (1): 109.105.117.27
DEBUG (shell:716) Unable to establish connection to http://109.105.117.27:8386/v1.1/fa1533c611514fc493b8777fc57aac09/clusters
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/saharaclient/shell.py", line 713, in main
    sys.argv[1:]))
  File "/usr/lib/python2.7/site-packages/saharaclient/shell.py", line 653, in main
    args.func(self.cs, args)
  File "/usr/lib/python2.7/site-packages/saharaclient/api/shell.py", line 287, in do_cluster_list
    clusters = cs.clusters.list()
  File "/usr/lib/python2.7/site-packages/saharaclient/api/clusters.py", line 58, in list
    return self._list('/clusters%s' % query, 'clusters')
  File "/usr/lib/python2.7/site-packages/saharaclient/api/base.py", line 121, in _list
    resp = self.api.get(url)
  File "/usr/lib/python2.7/site-packages/keystoneclient/adapter.py", line 170, in get
    return self ...
(more)
edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by xiangfei-ma
close date 2016-01-05 06:30:51.649394

Comments

1

Seems like an endpoint issue. You authenticate versus internal IP and sahara request is done versus external IP, where sahara is not listening. It does at the internal IP

Eduardo Gonzalez gravatar imageEduardo Gonzalez ( 2016-01-05 04:14:28 -0600 )edit

Much appreciated. It is caused exactly as you said.
I checked my sahara.conf again, then I found that pacstack wrote the host of sahara to internal ip by default.
After I changed
[DEFAULT]
host=128.0.0.27

to
[DEFAULT]
host=0.0.0.0 #or just comment this line out

it works.

xiangfei-ma gravatar imagexiangfei-ma ( 2016-01-05 06:27:05 -0600 )edit