Re: [Openstack] Code 500 when authenticating with password
That would do it! Glad you found your problem. I'll be working on improving the docs for building your service catalog pretty soon; common issues like this are useful to know about. -Dolph On Fri, Mar 30, 2012 at 11:03 PM, Pete Zaitcev zait...@redhat.com wrote: On Sat, 31 Mar 2012 10:26:10 +0800 Yong Sheng Gong gong...@cn.ibm.com wrote: Second: you can use keystone --debug user-list to show what http message sent to server As it turned out, I omitted 's' after the format, because I redone my old Keystone population script, which did not have any of those. E.g. public_url was: http://kvm-rei.zaitcev.lan/v1/AUTH_$(tenant_id) but it should've been: http://kvm-rei.zaitcev.lan/v1/AUTH_$(tenant_id)s -- Pete ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp
[Openstack] Code 500 when authenticating with password
Greetings: It seems that I am unable to authenticate against the current Keystone, and I am not sure if it is a bug or a local misconfiguration. So, before I file in Launchpad, I'd like someone to verify that I am doing the right thing. The problem looks like this: [zaitcev@kvm-rei zaitcev]$ keystone --os_auth_url=http://localhost:35357/v2.0 --os_username=admin --os_password=admpass --os_tenant_name=admten user-list No handlers could be found for logger keystoneclient.v2_0.client Authorization Failed: An unexpected error prevented the server from fulfilling your request. incomplete format (HTTP 500) The server logs this: 2012-03-30 21:35:41ERROR [root] incomplete format Traceback (most recent call last): File /usr/lib/python2.7/site-packages/keystone/common/wsgi.py, line 184, in __call__ result = method(context, **params) File /usr/lib/python2.7/site-packages/keystone/service.py, line 292, in authenticate metadata=metadata_ref) File /usr/lib/python2.7/site-packages/keystone/common/manager.py, line 48, in _wrapper return f(*args, **kw) File /usr/lib/python2.7/site-packages/keystone/catalog/backends/sql.py, line 167, in get_catalog catalog[region][srv_type]['publicURL'] = public_url % d ValueError: incomplete format 2012-03-30 21:35:41DEBUG [keystone.common.wsgi] RESPONSE HEADERS 2012-03-30 21:35:41DEBUG [keystone.common.wsgi] Content-Type = application/json 2012-03-30 21:35:41DEBUG [keystone.common.wsgi] Vary = X-Auth-Token 2012-03-30 21:35:41DEBUG [keystone.common.wsgi] Content-Length = 161 2012-03-30 21:35:41DEBUG [keystone.common.wsgi] 2012-03-30 21:35:41DEBUG [keystone.common.wsgi] RESPONSE BODY 2012-03-30 21:35:41DEBUG [keystone.common.wsgi] {error: {message: An unexpected error prevented the server from fulfilling your request. incomplete format, code: 500, title: Internal Server Error}} 2012-03-30 21:35:41DEBUG [eventlet.wsgi.server] 127.0.0.1 - - [30/Mar/2012 21:35:41] POST /v2.0/tokens HTTP/1.1 500 327 0.260567 Yay, a traceback. However, it may be hinting that some kind of publicURL field is not set somewhere. Does this looks familiar to anyone? BTW, authentication with token works, and produces this: [zaitcev@kvm-rei zaitcev]$ keystone --endpoint http://kvm-rei:35357/v2.0 --token=758ce883df47 user-list +--+-+---+-+ |id| enabled | email | name | +--+-+---+-+ | 5c3c279d18f541aa859178869584ca40 | True| None | zaitcev | | ed6aa912c28849c0913cb1106bb26b8c | True| None | admin | +--+-+---+-+ So, the Keystone server kinda-sorta works, just not really. -- Pete ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp
Re: [Openstack] Code 500 when authenticating with password
First:Make sure you have not set SERVICE_TOKEN and SERVICE_ENDPOINT env since keystone client honours token auth over user/password way.Second: you can use keystone --debug user-list to show what http message sent to serveralso you can see the request body from server log, just like this:2012-03-31 10:16:44 DEBUG [keystone.common.wsgi] REQUEST BODY 2012-03-31 10:16:44 DEBUG [keystone.common.wsgi] {"auth": {"tenantName": "admin", "passwordCredentials": {"username": "admin", "password": "password"}}}2012-03-31 10:16:44 DEBUG [keystone.common.wsgi] -openstack-bounces+gongysh=cn.ibm@lists.launchpad.net wrote: -To: openstack openstack@lists.launchpad.netFrom: Pete Zaitcev zait...@redhat.comSent by: openstack-bounces+gongysh=cn.ibm@lists.launchpad.netDate: 03/31/2012 09:47AMSubject: [Openstack] Code 500 when authenticating with passwordGreetings:It seems that I am unable to authenticate against the current Keystone,and I am not sure if it is a bug or a local misconfiguration. So, beforeI file in Launchpad, I'd like someone to verify that I am doing theright thing.The problem looks like this:[zaitcev@kvm-rei zaitcev]$ keystone --os_auth_url=http://localhost:35357/v2.0 --os_username=admin --os_password=admpass --os_tenant_name=admten user-listNo handlers could be found for logger "keystoneclient.v2_0.client"Authorization Failed: An unexpected error prevented the server from fulfilling your request. incomplete format (HTTP 500)The server logs this:2012-03-30 21:35:41 ERROR [root] incomplete formatTraceback (most recent call last):File "/usr/lib/python2.7/site-packages/keystone/common/wsgi.py", line 184, in __call__ result = method(context, **params)File "/usr/lib/python2.7/site-packages/keystone/service.py", line 292, in authenticate metadata=metadata_ref)File "/usr/lib/python2.7/site-packages/keystone/common/manager.py", line 48, in _wrapper return f(*args, **kw)File "/usr/lib/python2.7/site-packages/keystone/catalog/backends/sql.py", line 167, in get_catalog catalog[region][srv_type]['publicURL'] = public_url % dValueError: incomplete format2012-03-30 21:35:41 DEBUG [keystone.common.wsgi] RESPONSE HEADERS 2012-03-30 21:35:41 DEBUG [keystone.common.wsgi] Content-Type = application/json2012-03-30 21:35:41 DEBUG [keystone.common.wsgi] Vary = X-Auth-Token2012-03-30 21:35:41 DEBUG [keystone.common.wsgi] Content-Length = 1612012-03-30 21:35:41 DEBUG [keystone.common.wsgi] 2012-03-30 21:35:41 DEBUG [keystone.common.wsgi] RESPONSE BODY 2012-03-30 21:35:41 DEBUG [keystone.common.wsgi] {"error": {"message": "An unexpected error prevented the server from fulfilling your request. incomplete format", "code": 500, "title": "Internal Server Error"}}2012-03-30 21:35:41 DEBUG [eventlet.wsgi.server] 127.0.0.1 - - [30/Mar/2012 21:35:41] "POST /v2.0/tokens HTTP/1.1" 500 327 0.260567Yay, a traceback. However, it may be hinting that some kind of publicURLfield is not set somewhere. Does this looks familiar to anyone?BTW, authentication with token works, and produces this:[zaitcev@kvm-rei zaitcev]$ keystone --endpoint http://kvm-rei:35357/v2.0--token=758ce883df47 user-list+--+-+---+-+|id| enabled | email | name |+--+-+---+-+| 5c3c279d18f541aa859178869584ca40 | True | None | zaitcev || ed6aa912c28849c0913cb1106bb26b8c | True | None | admin |+--+-+---+-+So, the Keystone server kinda-sorta works, just not really.-- Pete___Mailing list: https://launchpad.net/~openstackPost to : openstack@lists.launchpad.netUnsubscribe : https://launchpad.net/~openstackMore help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp
Re: [Openstack] Code 500 when authenticating with password
On Sat, 31 Mar 2012 10:26:10 +0800 Yong Sheng Gong gong...@cn.ibm.com wrote: also you can see the request body from server log, just like this: 2012-03-31 10:16:44DEBUG [keystone.common.wsgi] REQUEST BODY 2012-03-31 10:16:44DEBUG [keystone.common.wsgi] {auth: {tenantName: admin, passwordCredentials: {username: admin, password: password}}} 2012-03-31 10:16:44DEBUG [keystone.common.wsgi] Indeed it's there in the log: 2012-03-30 21:35:41DEBUG [keystone.common.wsgi] REQUEST BODY 2012-03-30 21:35:41DEBUG [keystone.common.wsgi] {auth: {tenantName: admten, passwordCredentials: {username: admin, password: admpass}}} But how does this help? -- Pete ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp
Re: [Openstack] Code 500 when authenticating with password
On Sat, 31 Mar 2012 10:26:10 +0800 Yong Sheng Gong gong...@cn.ibm.com wrote: Second: you can use keystone --debug user-list to show what http message sent to server As it turned out, I omitted 's' after the format, because I redone my old Keystone population script, which did not have any of those. E.g. public_url was: http://kvm-rei.zaitcev.lan/v1/AUTH_$(tenant_id) but it should've been: http://kvm-rei.zaitcev.lan/v1/AUTH_$(tenant_id)s -- Pete ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp