Ask Your Question

swift http/1.1 401 unauthorized

asked 2015-01-08 06:31:03 -0500

iffyshot gravatar image

Hi All

When I run this command curl -i -v -H 'X-Auth-Token: AUTH_a995798a5721451e81daaf695eec8eca' http://controllerip:8080/v1/AUTH_test

i get this output * Trying * Connected to controllerip( port 8080 (#0)

GET /v1/AUTH_test HTTP/1.1 User-Agent: curl/7.35.0 Host: controllerip:8080 Accept: / X-Auth-Token: AUTH_a995798a5721451e81daaf695eec8eca

< HTTP/1.1 401 Unauthorized HTTP/1.1 401 Unauthorized < Content-Length: 131 Content-Length: 131 < Content-Type: text/html; charset=UTF-8 Content-Type: text/html; charset=UTF-8 < Www-Authenticate: Swift realm="AUTH_test" Www-Authenticate: Swift realm="AUTH_test" < X-Trans-Id: txfc2449276abe4e9aaa5a4-0054ae7778 X-Trans-Id: txfc2449276abe4e9aaa5a4-0054ae7778 < Date: Thu, 08 Jan 2015 12:26:32 GMT Date: Thu, 08 Jan 2015 12:26:32 GMT

Can some one assist me in correcting this command, how can i check the X-Auth token is correct any ideas greatly received

I have checked memcache using ps -ef | grep memc and it is running


edit retag flag offensive close merge delete


Which OS are you using to setup openstack. If its Redhat or centos then provide below output. systemctl status openstack-swift-proxy.service memcached.service

If its Ubuntu the below command service swift-proxy status service memcached status

Abdul Rashid gravatar imageAbdul Rashid ( 2015-01-08 07:04:18 -0500 )edit

Hi Thanks for the reply

I am using Ubuntu service swift-proxy status swift-proxy start/running service memcached status * memcached is running

I have checked the memcached


iffyshot gravatar imageiffyshot ( 2015-01-09 09:41:56 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2015-01-12 16:26:32 -0500

zaitcev gravatar image

updated 2015-01-12 16:32:49 -0500

The token looks broken, probably edited. I know of no auth system that generates tokens like "AUTH_a995798a5721451e81daaf695eec8eca" (althogh certainly there could be one out there).

For Keystone, parameters are usually like this (if UUID, not PKI):

token "id": "4ae2ee60868b48e99c6c5d7d35d9b9d5" "publicURL": "http://kvm-rei.zaitcev.lan:8080/v1/AUTH_ea15004eb664450dae0a3302d98fd28b"


curl -v -X HEAD -H "X-Auth-Token: 4ae2ee60868b48e99c6c5d7d35d9b9d5" http://kvm-rei.zaitcev.lan:8080/v1/AU...

For tempauth, parameters are usually like this:

x-auth-token: AUTH_tkcadf8292b8324abab37b9c0b219c2b84 x-storage-url:


curl -v -k -X HEAD -H "X-Auth-Token: AUTH_tkcadf8292b8324abab37b9c0b219c2b84"

It's very, very unlikely that the above combination of AUTH_a995798a5721451e81daaf695eec8eca and http://controllerip:8080/v1/AUTH_test is valid. Do not edit your tokens when passing to curl. Use my examples for guidance.

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

1 follower


Asked: 2015-01-08 06:31:03 -0500

Seen: 596 times

Last updated: Jan 12 '15