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

Salman Toor salman.toor at it.uu.se
Tue Oct 9 11:17:31 UTC 2012


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]
******************** REQUEST BODY ********************
2012-10-08 19:42:25    DEBUG [keystone.common.wsgi]
2012-10-08 19:42:25    DEBUG [routes.middleware] Matched GET
/tokens/8901f727aeba4d61a7dbb838b3146c72
2012-10-08 19:42:25    DEBUG [routes.middleware] Route path:
'{path_info:.*}', defaults: {'controller':
<keystone.contrib.admin_crud.core.CrudExtension object at 0x3021610>}
2012-10-08 19:42:25    DEBUG [routes.middleware] Match dict:
{'controller': <keystone.contrib.admin_crud.core.CrudExtension object
at 0x3021610>, 'path_info':
'/tokens/8901f727aeba4d61a7dbb838b3146c72'}
2012-10-08 19:42:25    DEBUG [routes.middleware] Matched GET
/tokens/8901f727aeba4d61a7dbb838b3146c72
2012-10-08 19:42:25    DEBUG [routes.middleware] Route path:
'{path_info:.*}', defaults: {'controller':
<keystone.service.AdminRouter object at 0x2395410>}
2012-10-08 19:42:25    DEBUG [routes.middleware] Match dict:
{'controller': <keystone.service.AdminRouter object at 0x2395410>,
'path_info': '/tokens/8901f727aeba4d61a7dbb838b3146c72'}
2012-10-08 19:42:25    DEBUG [routes.middleware] Matched GET
/tokens/8901f727aeba4d61a7dbb838b3146c72
2012-10-08 19:42:25    DEBUG [routes.middleware] Route path:
'/tokens/{token_id}', defaults: {'action': u'validate_token',
'controller': <keystone.service.TokenController object at 0x2f5fd50>}
2012-10-08 19:42:25    DEBUG [routes.middleware] Match dict:
{'action': u'validate_token', 'token_id':
u'8901f727aeba4d61a7dbb838b3146c72', 'controller':
<keystone.service.TokenController object at 0x2f5fd50>}
2012-10-08 19:42:25    DEBUG [keystone.common.wsgi] arg_dict:
{'token_id': u'8901f727aeba4d61a7dbb838b3146c72'}
2012-10-08 19:42:25    DEBUG [keystone.common.wsgi]
******************** RESPONSE HEADERS ********************
2012-10-08 19:42:25    DEBUG [keystone.common.wsgi] Content-Type =
application/json
2012-10-08 19:42:25    DEBUG [keystone.common.wsgi] Vary = X-Auth-Token
2012-10-08 19:42:25    DEBUG [keystone.common.wsgi] Content-Length = 418
2012-10-08 19:42:25    DEBUG [keystone.common.wsgi]
2012-10-08 19:42:25    DEBUG [keystone.common.wsgi]
******************** RESPONSE BODY ********************
2012-10-08 19:42:25    DEBUG [keystone.common.wsgi] {"access":
{"token": {"expires": "2012-10-09T17:42:25Z", "id":
"8901f727aeba4d61a7dbb838b3146c72", "tenant": {"enabled": true,
"description": "Default Tenant", "name": "openstackDemo", "id":
"1a030f42a4f34254a6b45d6c46d65f04"}}, "user": {"username":
"adminUser", "roles_links": [], "id":
"49454ac73a8f40d6b4082bfdfe78ff04", "roles": [{"id":
"9fb34c1f21504b8badc153fe0d031b38", "name": "admin"}], "name":
"adminUser"}}}
2012-10-08 19:42:25    DEBUG [eventlet.wsgi.server] 10.0.2.15 - -
[08/Oct/2012 19:42:25] "GET
/v2.0/tokens/8901f727aeba4d61a7dbb838b3146c72 HTTP/1.1" 200 566
0.064224
2012-10-08 19:42:31    DEBUG [routes.middleware] No route matched for
GET /auth/v2.0
2012-10-08 19:42:31    DEBUG [eventlet.wsgi.server] 10.0.2.15 - -
[08/Oct/2012 19:42:31] "GET /auth/v2.0 HTTP/1.1" 404 278 0.003240

-------------------------------------------------------------------


------------- keystone.conf --------------- 

[DEFAULT]
#bind_host = 0.0.0.0
bind_host = 10.0.2.15
public_port = 5000
admin_port = 35357
admin_token = ccecafff4522894d32d9
compute_port = 8774
verbose = True
debug = True
#log_config = ./etc/logging.conf.sample

# ================= Syslog Options ============================
# Send logs to syslog (/dev/log) instead of to file specified
# by `log-file`
use_syslog = False
log_file = /var/log/keystone/keystone.log

# Facility to use. If unset defaults to LOG_USER.
# syslog_log_facility = LOG_LOCAL0

[sql]
connection = mysql://keystone:keystone@10.0.2.15/keystone
idle_timeout = 200

[ldap]
#url = ldap://localhost
#tree_dn = dc=example,dc=com
#user_tree_dn = ou=Users,dc=example,dc=com
#role_tree_dn = ou=Roles,dc=example,dc=com
#tenant_tree_dn = ou=Groups,dc=example,dc=com
#user = dc=Manager,dc=example,dc=com
#password = freeipa4all
#suffix = cn=example,cn=com

[identity]
driver = keystone.identity.backends.sql.Identity

[catalog]
driver = keystone.catalog.backends.sql.Catalog
#template_file = /etc/keystone/default_catalog.templates

[token]
driver = keystone.token.backends.sql.Token

# Amount of time a token should remain valid (in seconds)
expiration = 86400

[policy]
driver = keystone.policy.backends.rules.Policy

[ec2]
driver = keystone.contrib.ec2.backends.sql.Ec2

[filter:debug]
paste.filter_factory = keystone.common.wsgi:Debug.factory

[filter:token_auth]
paste.filter_factory = keystone.middleware:TokenAuthMiddleware.factory

[filter:admin_token_auth]
paste.filter_factory = keystone.middleware:AdminTokenAuthMiddleware.factory

[filter:xml_body]
paste.filter_factory = keystone.middleware:XmlBodyMiddleware.factory

[filter:json_body]
paste.filter_factory = keystone.middleware:JsonBodyMiddleware.factory

[filter:crud_extension]
paste.filter_factory = keystone.contrib.admin_crud:CrudExtension.factory

[filter:ec2_extension]
paste.filter_factory = keystone.contrib.ec2:Ec2Extension.factory

[app:public_service]
paste.app_factory = keystone.service:public_app_factory

[app:admin_service]
paste.app_factory = keystone.service:admin_app_factory

[pipeline:public_api]
pipeline = token_auth admin_token_auth xml_body json_body debug
ec2_extension public_service

[pipeline:admin_api]
pipeline = token_auth admin_token_auth xml_body json_body debug
ec2_extension crud_extension admin_service

[app:public_version_service]
paste.app_factory = keystone.service:public_version_app_factory

[app:admin_version_service]
paste.app_factory = keystone.service:admin_version_app_factory

[pipeline:public_version_api]
pipeline = xml_body public_version_service

[pipeline:admin_version_api]
pipeline = xml_body admin_version_service

[composite:main]
use = egg:Paste#urlmap
/v2.0 = public_api
/ = public_version_api

[composite:admin]
use = egg:Paste#urlmap
/v2.0 = admin_api
/ = admin_version_api

---------------------------------------------------------------------------


I am wondering is this section correct in keystone.conf

[composite:main]
use = egg:Paste#urlmap
/v2.0 = public_api
/ = public_version_api

[composite:admin]
use = egg:Paste#urlmap
/v2.0 = admin_api
/ = admin_version_api


Am I missing something ? As this shows that the request should go to either admin_api or public_api. 

And if I send a simple request to / it correctly shows the version …. 

[sztoor at swift ~]$ curl -k -v -H 'X-Storage-User:
openstackDemo:adminUser' -H 'X-Storage-Pass: adminUser'
http://10.0.2.15:5000/
* 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 / 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 300 Multiple Choices
< Content-Type: application/json
< Vary: X-Auth-Token
< Content-Length: 625
< Date: Mon, 08 Oct 2012 18:07:43 GMT
<
* Connection #0 to host 10.0.2.15 left intact
{"versions": {"values": [{"status": "beta", "updated":
"2011-11-19T00:00:00Z", "media-types": [{"base": "application/json",
"type": "application/vnd.openstack.identity-v2.0+json"}, {"base":
"application/xml", "type":
"application/vnd.openstack.identity-v2.0+xml"}], "id": "v2.0",
"links": [{"href": "http://10.0.2.15:5000/v2.0/", "rel": "self"},
{"href": "http://docs.openstack.org/api/openstack-identity-service/2.0/content/",
"type": "text/html", "rel": "describedby"}, {"href":
"http://docs.openstack.org/api/openstack-identity-service/2.0/identity-dev-guide-2.0.pdf",
"type": "application/pdf", "rel": "describedby"}]}]}}* Closing
connection #0

help please….

Thanks in Advance!! 

Regards..
Salman. 

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


More information about the OpenStack-operators mailing list