Ask Your Question

How to specify swift endpoint after authenticating with keystone

asked 2017-04-18 12:11:36 -0500

SyCode7 gravatar image

I have an OpenStack installation behind a firewall. I have configured port forwarding for keystone and swift. Authentication to keystone works fine using the port forwarded address, however requests to the swift endpoint still fail. An inspection the request and response logs show that the requests to swift still go to the internal ip address and port. below snippet

19:04:48.990 [main] DEBUG o.o.c.t.internal.HttpExecutor - Executing Request: -> 
1 > Accept: application/json
1 > X-Auth-Token: gAAAAABY8PNuQ08uN6lXGszGcCRMBmH_ag6avAwVhRDvBciN2DQb8-9ln-CnFJx0BdmYa3JBWQ8DttgzBREeGZ-5RCQNf0CqsvvsAGZuL_qM51wdscF9VC3ofL2V-zneovLpljw3-OKnWrA-`swJRQsSo5HMaW3wzRed4cbMPvsNl39pQ2blq5x0
Exception in thread "main" ConnectionException{ Connection timed out: connect, status=0}


Is there any way that to specify the swift endpoint or send the request directly with the port-forwarded address ? I am using jcloud java api.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2017-04-25 19:01:18 -0500

akaris gravatar image


The information for the swift endpoint is coming from your keystone catalog:

[root@undercloud-6 ~]# openstack catalog list | grep swift -A3
| swift      | object-store    | regionOne                                                                       |
|            |                 |   publicURL:      |
|            |                 |   internalURL: |
|            |                 |   adminURL:                                          |

This is using your publicURL endpoint, and you will need to change it if it's not the correct address / if you are NATting it.

[root@undercloud-6 ~]# swift --debug list
DEBUG:keystoneclient.auth.identity.v2:Making authentication request to
INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1):
DEBUG:requests.packages.urllib3.connectionpool:"POST /v2.0/tokens HTTP/1.1" 200 1061
INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1):
DEBUG:requests.packages.urllib3.connectionpool:"GET /v1/AUTH_cb0d5805d72a4f2a89ff260b15629799?format=json HTTP/1.1" 200 2
DEBUG:swiftclient:REQ: curl -i -X GET -H "X-Auth-Token: 220b8f939772419aa187df193d33958e"
DEBUG:swiftclient:RESP STATUS: 200 OK
DEBUG:swiftclient:RESP HEADERS: {u'Content-Length': u'2', u'X-Put-Timestamp': u'1493164815.01466', u'X-Account-Object-Count': u'0', u'X-Timestamp': u'1493164815.01466', u'X-Trans-Id': u'tx1598f5b794704553b4b7b-0058ffe30e', u'Date': u'Wed, 26 Apr 2017 00:00:15 GMT', u'X-Account-Bytes-Used': u'0', u'X-Account-Container-Count': u'0', u'Content-Type': u'application/json; charset=utf-8'}
DEBUG:swiftclient:RESP BODY: []
edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2017-04-18 12:11:36 -0500

Seen: 274 times

Last updated: Apr 25 '17