Ask Your Question
0

keystone cannot use the command curl

asked 2012-04-06 06:31:33 -0500

zhonghuabaima0913 gravatar image

dear all:

i installed keystone using clone,when i use the command of

curl -d '{"auth": {"tenantName": "service", "passwordCredentials":{"username": "glance", "password": "mypasswd"}}}' -H "Content-type: application/json" http://192.168.77.105:35357/v2.0/tokens | python -mjson.tool

there is an error,{ "error": { "code": 500, "message": "An unexpected error prevented the server from fulfilling your request. unsupported format character 't' (0x74) at index 33", "title": "Internal Server Error" } } this is my keystone.conf [DEFAULT] #bind_host = 0.0.0.0 public_port = 5000 admin_port = 35357 admin_token = openstack 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

Facility to use. If unset defaults to LOG_USER.

syslog_log_facility = LOG_LOCAL0

[sql] connection = mysql://keystone:keystone@192.168.78.105/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]

dynamic, sql-based backend (supports API/CLI-based management commands)

driver = keystone.catalog.backends.sql.Catalog

static, file-based backend (does NOT support any management commands)

#driver = keystone.catalog.backends.templated.TemplatedCatalog #template_file = /etc/keystone/default_catalog.templates

[token] #driver = keystone.token.backends.kvs.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.kvs.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

Thanks.

edit retag flag offensive close merge delete

5 answers

Sort by ยป oldest newest most voted
0

answered 2012-04-06 06:32:36 -0500

zhonghuabaima0913 gravatar image

i can use the command keystone user-list,service-list,endpoint-list and so on

edit flag offensive delete link more
0

answered 2012-04-06 06:48:21 -0500

zhonghuabaima0913 gravatar image

hello,i used your command ,it also got same error,

"error": { "code": 500, "message": "An unexpected error prevented the server from fulfilling your request. unsupported format character 't' (0x74) at index 33", "title": "Internal Server Error" } }

edit flag offensive delete link more
0

answered 2012-04-06 06:37:47 -0500

s-rain gravatar image

curl -s -d '{"auth": {"tenantName": "service", "passwordCredentials": {"username": "glance", "password": "mypasswd"}}}' -H 'Content-type: application/json' http://192.168.77.105:5000/v2.0/tokens

try it!

Rain.

edit flag offensive delete link more
0

answered 2012-04-06 08:11:52 -0500

zhonghuabaima0913 gravatar image

hello, i droped the database,and it worked.

edit flag offensive delete link more
0

answered 2012-12-28 14:56:01 -0500

I came across this issue same with you yesterday when i edited the attribute "driver = keystone.token.backends.kvs.Token" with the new value "driver = keystone.token.backends.sql.Token". However, when i changed back to "....kvs...", the error disappeared. I do not know why for that right now. I assumed if i changed to ''...sql...' then the token info will be stored in DB.

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

Stats

Asked: 2012-04-06 06:31:33 -0500

Seen: 97 times

Last updated: Dec 28 '12