[Openstack] "swift stat" returns "Auth GET failed: http://127.0.0.1:5000/v2.0/tokens 401 Not Authorized"

Shashi Kanth Boddula shashi.bsd at gmail.com
Mon May 7 23:29:22 UTC 2012


Actually i have defined the endpoints for swift correctly, but i pasted
wrongly.

I am getting the endpoint for swift like bellow.


{
                "endpoints": [
                    {
                        "adminURL": "http://OpenStack:8080/",
                        "internalURL": "
http://OpenStack:8080/v2/AUTH_0e63498833bf44e4aeb0ac314635b68f",
                        "publicURL": "
http://OpenStack:8080/v2/AUTH_0e63498833bf44e4aeb0ac314635b68f",
                        "region": "RegionOne"
                    }
                ],
                "endpoints_links": [],
                "name": "swift",
                "type": "object-store"
            },

But still
*
# swift -V 2 -A http://OpenStack:5000/v2.0 -U adminUser:admin -K
012345SECRET99TOKEN012345 stat
Auth GET failed: http://OpenStack:5000/v2.0/tokens 401 Not Authorized


The c*command which i run to create endpoint is

keystone --token 012345SECRET99TOKEN012345 --endpoint
http://OpenStack:35357/v2.0/ endpoint-create --region RegionOne
--service_id=32c42e1c8dbf49e3a8164103fd0718e2 --publicurl '
http://OpenStack:8080/v2/AUTH_%(tenant_id)s' --adminurl '
http://OpenStack:8080/' --internalurl '
http://OpenStack:8080/v2/AUTH_%(tenant_id)s'

Here i have some questions.

1) do i need to say v1 or v2 in URL? or V2.0 ? Actually where to looks for
whether i need to say v1.X or V2.X? In the keystone.conf file i see only v2
word.

2) Do i need to say % or $ in the above command infront of tenant_id ? . In
some docs i see %, and some docs i see $.






On Tue, May 8, 2012 at 3:01 AM, Pete Zaitcev <zaitcev at redhat.com> wrote:

> On Mon, 7 May 2012 23:34:02 +0530
> Shashi Kanth Boddula <shashi.bsd at gmail.com> wrote:
>
> > root at OpenStack:~# swift -V 2 -A http://OpenStack:5000/v2.0 -U
> > adminUser:admin -K 012345SECRET99TOKEN012345 stat
> > Auth GET failed: http://OpenStack:5000/v2.0/tokens 401 Not Authorized
>
> >                 "endpoints": [
> >                     {
> >                         "adminURL": "http://OpenStack:35357/v2.0",
> >                         "internalURL": "http://OpenStack:5000/v2.0",
> >                         "publicURL": "http://OpenStack:5000/v2.0",
>
> The above is supposed to be the endpoint of Swift, but you put the
> endpoint of Keystone in there. When you pass the -A
> http://OpenStack:5000/v2.0,
> the CLI tool accesses the Keystone to discover where the Swift is, using
> the endpoint record.
>
> So:
>
> # With SSL proxy at kvm-san:
> $keystone endpoint-create --region RegionOne --service_id $SSID \
>        --adminurl 'http://kvm-rei.zaitcev.lan/v1.0/' \
>        --publicurl 'https://kvm-san.zaitcev.lan/v1/AUTH_$(tenant_id)s' \
>        --internalurl 'http://kvm-rei.zaitcev.lan/v1/AUTH_$(tenant_id)s'
>
> -- P
>



-- 
Thanks & Regards,
Shashi Kanth
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20120508/6bab4772/attachment.html>


More information about the Openstack mailing list