[Openstack-operators] keystone problem, [routes.middleware] No route match for Get /auth/v2.0

Salman Toor salman.toor at it.uu.se
Thu Oct 11 10:33:14 UTC 2012


Hi, 

Finally I think I have manage to get through with the SWIFT varification steps. 

Thanks Kiall for the reply. 

Yes you were right that I should send a POST request than the GET. When I send the POST request using curl (mentioned in my last mail), everything works fine. 

I think some more work required to do with the documentation of the  object store verification section. 

Regards..
Salman. 


On Oct 9, 2012, at 5:05 PM, Kiall Mac Innes wrote:

> You're still issuing a GET request...
> 
> > GET /v2.0/auth HTTP/1.1
> 
> It will only respond to a POST request.
> 
> Thanks,
> Kiall
> 
> 
> On Tue, Oct 9, 2012 at 3:15 PM, Salman Toor <salman.toor at it.uu.se> wrote:
> Hi, 
> 
> Thanks for your reply! 
> 
> I have tried your suggestion but no effect. 
> 
> [sztoor at swift ~]$ curl -k -v -H 'X-Storage-User:
> openstackDemo:adminUser' -H 'X-Storage-Pass: adminUser'
> http://10.0.2.15:5000/v2.0/auth
> 
> * About to connect() to 10.0.2.15 port 5000 (#0)
> *   Trying 10.0.2.15...
> * connected
> * Connected to 10.0.2.15 (10.0.2.15) port 5000 (#0)
> > GET /v2.0/auth HTTP/1.1
> 
> > User-Agent: curl/7.24.0 (x86_64-redhat-linux-gnu) libcurl/7.24.0 NSS/3.13.5.0 zlib/1.2.5 libidn/1.24 libssh2/1.4.1
> > Host: 10.0.2.15:5000
> > Accept: */*
> > X-Storage-User: openstackDemo:adminUser
> > X-Storage-Pass: adminUser
> >
> < HTTP/1.1 404 Not Found
> < Content-Type: text/html; charset=UTF-8
> < Date: Mon, 08 Oct 2012 19:05:01 GMT
> < Transfer-Encoding: chunked
> 
> <
> <html>
>  <head>
>   <title>404 Not Found</title>
>  </head>
>  <body>
>   <h1>404 Not Found</h1>
>   The resource could not be found.<br /><br />
> 
> 
> 
>  </body>
> * Connection #0 to host 10.0.2.15 left intact
> </html>* Closing connection #0
> 
> 
> I have also tried following and that works fine. 
> 
> # curl -k -v -X 'POST' http://10.0.2.15:5000/v2.0/tokens -d
> '{"auth":{"passwordCredentials":{"username":"adminUser",
> "password":"adminUser"}, "tenantName":"openstackDemo"}}' -H
> 'Content-type: application/json' -H 'Accept: application/xml'
> 
>  # curl -k  -H 'X-Auth-Token:e5853a79d4cd4affb718397f7088aca3'
> http://10.0.2.15:8888/v1/AUTH_1a030f42a4f34254a6b45d6c46d65f04
> 
> 
> 
> In the verification section of SWIFT's latest guide the author suggest the command like following 
> 
> Get an X-Storage-Url and X-Auth-Token:
> 
> 
> $ curl -k -v -H 'X-Storage-User: openstackDemo:admin' -H 'X-Storage-Pass: $ADMINPASS' http://<AUTH_HOSTNAME>:5000/auth/v2.0
> 
> 
> I am struggling with this from last two days. :-( 
> 
> 
> Regards..
> Salman. 
> 
> 
> 
> On Oct 9, 2012, at 3:55 PM, Kiall Mac Innes wrote:
> 
>> It should be /v2.0/auth rather than /auth/v2.0 - and it will only respond to a POST request, not a GET request.
>> 
>> Thanks,
>> Kiall
>> 
>> 
>> On Tue, Oct 9, 2012 at 2:46 PM, Salman Toor <salman.toor at it.uu.se> wrote:
>> Hi again, 
>> 
>> Just to update my previous mail:
>> 
>> Following is the log message when I send the / request using curl and keystone fined the correct routing … But with auth/v2.0 its didn't find the path … is it a bug ?
>> 
>> ----- keystone.log -----
>> 
>> 2012-10-08 20:07:43    DEBUG [routes.middleware] Matched GET /
>> 2012-10-08 20:07:43    DEBUG [routes.middleware] Route path: '/',
>> defaults: {'action': u'get_versions', 'controller':
>> <keystone.service.VersionController object at 0x303fc50>}
>> 2012-10-08 20:07:43    DEBUG [routes.middleware] Match dict:
>> {'action': u'get_versions', 'controller':
>> <keystone.service.VersionController object at 0x303fc50>}
>> 2012-10-08 20:07:43    DEBUG [keystone.common.wsgi] arg_dict: {}
>> 2012-10-08 20:07:43    DEBUG [eventlet.wsgi.server] 10.0.2.15 - -
>> [08/Oct/2012 20:07:43] "GET / HTTP/1.1" 300 768 0.024546
>> 
>> -------------------------------
>> 
>> Regards..
>> Salman. 
>> 
>> 
>> 
>> 
>> 
>> 
>> On Oct 9, 2012, at 1:17 PM, Salman Toor wrote:
>> 
>>> Hi, 
>>> 
>>> I am struggling with configuring SWIFT. 
>>> 
>>> I have followed latest guide. 
>>> 
>>> Install and Deploy Guide for Red Hat Enterprise Linux, CentOS 6.x, or Fedora 17 (Folsom)
>>> 
>>> swift -V 2.0 -A http://10.0.2.15:5000/v2.0 -U openstackDemo:adminUser
>>> -K adminUser stat -vStorageURL:
>>> http://10.0.2.15:8888/v1/AUTH_1a030f42a4f34254a6b45d6c46d65f04
>>> Auth Token: 8901f727aeba4d61a7dbb838b3146c72
>>>    Account: AUTH_1a030f42a4f34254a6b45d6c46d65f04
>>> Containers: 1
>>>    Objects: 0
>>>      Bytes: 0
>>> Accept-Ranges: bytes
>>> 
>>> works fine But 
>>> 
>>> 
>>> 
>>> [sztoor at swift ~]$ curl -k -v -H 'X-Storage-User:
>>> openstackDemo:adminUser' -H 'X-Storage-Pass: adminUser'
>>> http://10.0.2.15:5000/auth/v2.0
>>> * About to connect() to 10.0.2.15 port 5000 (#0)
>>> *   Trying 10.0.2.15...
>>> * connected
>>> * Connected to 10.0.2.15 (10.0.2.15) port 5000 (#0)
>>> > GET /auth/v2.0 HTTP/1.1
>>> > User-Agent: curl/7.24.0 (x86_64-redhat-linux-gnu) libcurl/7.24.0 NSS/3.13.5.0 zlib/1.2.5 libidn/1.24 libssh2/1.4.1
>>> > Host: 10.0.2.15:5000
>>> > Accept: */*
>>> > X-Storage-User: openstackDemo:adminUser
>>> > X-Storage-Pass: adminUser
>>> >
>>> < HTTP/1.1 404 Not Found
>>> < Content-Length: 154
>>> < Content-Type: text/html; charset=UTF-8
>>> < Date: Mon, 08 Oct 2012 17:42:31 GMT
>>> <
>>> <html>
>>>  <head>
>>>   <title>404 Not Found</title>
>>>  </head>
>>>  <body>
>>>   <h1>404 Not Found</h1>
>>>   The resource could not be found.<br /><br />
>>> 
>>> 
>>> I have checked the logs. In the first command using swift command-line-tool everything works fine but with curl command I got this message  DEBUG [routes.middleware] No route match
>>> 
>>> also show in the log with red color. 
>>> 
>>> ---- keystone.log ------
>>> 
>>> 2012-10-08 19:42:25    DEBUG [keystone.common.wsgi]
>>> ******************** REQUEST ENVIRON ********************
>>> 2012-10-08 19:42:25    DEBUG [keystone.common.wsgi] SCRIPT_NAME = /v2.0
>>> 2012-10-08 19:42:25    DEBUG [keystone.common.wsgi] webob.adhoc_attrs
>>> = {'response': <Response at 0x3519a50 200 OK>}
>>> 2012-10-08 19:42:25    DEBUG [keystone.common.wsgi] REQUEST_METHOD = GET
>>> 2012-10-08 19:42:25    DEBUG [keystone.common.wsgi] PATH_INFO =
>>> /tokens/8901f727aeba4d61a7dbb838b3146c72
>>> 2012-10-08 19:42:25    DEBUG [keystone.common.wsgi] SERVER_PROTOCOL = HTTP/1.0
>>> 2012-10-08 19:42:25    DEBUG [keystone.common.wsgi] HTTP_X_AUTH_TOKEN
>>> = ccecafff4522894d32d9
>>> 2012-10-08 19:42:25    DEBUG [keystone.common.wsgi] eventlet.posthooks = []
>>> 2012-10-08 19:42:25    DEBUG [keystone.common.wsgi] SERVER_NAME = 10.0.2.15
>>> 2012-10-08 19:42:25    DEBUG [keystone.common.wsgi] REMOTE_ADDR = 10.0.2.15
>>> 2012-10-08 19:42:25    DEBUG [keystone.common.wsgi] eventlet.input =
>>> <eventlet.wsgi.Input object at 0x35096d0>
>>> 2012-10-08 19:42:25    DEBUG [keystone.common.wsgi] wsgi.url_scheme = http
>>> 2012-10-08 19:42:25    DEBUG [keystone.common.wsgi] SERVER_PORT = 35357
>>> 2012-10-08 19:42:25    DEBUG [keystone.common.wsgi] wsgi.input =
>>> <eventlet.wsgi.Input object at 0x35096d0>
>>> 2012-10-08 19:42:25    DEBUG [keystone.common.wsgi] openstack.context
>>> = {'token_id': 'ccecafff4522894d32d9', 'is_admin': True}
>>> 2012-10-08 19:42:25    DEBUG [keystone.common.wsgi] HTTP_HOST = 10.0.2.15:35357
>>> 2012-10-08 19:42:25    DEBUG [keystone.common.wsgi] wsgi.multithread = True
>>> 2012-10-08 19:42:25    DEBUG [keystone.common.wsgi] HTTP_ACCEPT =
>>> application/json
>>> 2012-10-08 19:42:25    DEBUG [keystone.common.wsgi] wsgi.version = (1, 0)
>>> 2012-10-08 19:42:25    DEBUG [keystone.common.wsgi] RAW_PATH_INFO =
>>> /v2.0/tokens/8901f727aeba4d61a7dbb838b3146c72
>>> 2012-10-08 19:42:25    DEBUG [keystone.common.wsgi] GATEWAY_INTERFACE = CGI/1.1
>>> 2012-10-08 19:42:25    DEBUG [keystone.common.wsgi] wsgi.run_once = False
>>> 2012-10-08 19:42:25    DEBUG [keystone.common.wsgi] wsgi.errors =
>>> <open file '<stderr>', mode 'w' at 0x7f7bd7c32270>
>>> 2012-10-08 19:42:25    DEBUG [keystone.common.wsgi] wsgi.multiprocess = False
>>> 2012-10-08 19:42:25    DEBUG [keystone.common.wsgi] CONTENT_TYPE =
>>> application/json
>>> 2012-10-08 19:42:25    DEBUG [keystone.common.wsgi]
>>> HTTP_ACCEPT_ENCODING = identity
>>> 2012-10-08 19:42:25    DEBUG [keystone.common.wsgi]
>>> 2012-10-08 19:42:25    DEBUG [keystone.common.wsgi]
>> 
>> _______________________________________________
>> OpenStack-operators mailing list
>> OpenStack-operators at lists.openstack.org
>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators
>> 
>> 
> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-operators/attachments/20121011/4cad389a/attachment-0001.html>


More information about the OpenStack-operators mailing list