OpenStack Identity (Keystone)

I change catalog's backend to sql.But when I use devstack script ,keystone service can't launch!

Asked by shwinpiocess on 2012-03-30

In the keystone.conf file:
I change the catalog's backend to sql

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

when I use devstack script ,it shows that the keystone didn't start!

'screen -S stack -p key -X stuff 'cd /opt/stack/keystone && /opt/stack/keystone/bin/keystone-all --config-file /opt/stack/keystone/etc/keystone.conf -d --debug
+ echo 'Waiting for keystone to start...'
Waiting for keystone to start...
+ timeout 60 sh -c 'while ! http_proxy= wget -q -O- http://192.168.91.135:5000/v2.0/; do sleep 1; done'
+ echo 'keystone did not start'
keystone did not start
+ exit 1

Question information

Language:
English Edit question
Status:
Expired
For:
Keystone Edit question
Assignee:
No assignee Edit question
Last query:
2012-04-05
Last reply:
2012-04-20
yong sheng gong (gongysh) said : #1

You can try
cd /opt/stack/keystone && /opt/stack/keystone/bin/keystone-all --config-file /opt/stack/keystone/etc/keystone.conf -d --debug

to see what happened to the keystone-all

And then paste the output here.

shwinpiocess (shwinpiocess) said : #2

Here is the keystone.conf file:

[DEFAULT]
bind_host = 0.0.0.0
public_port = 5000
admin_port = 35357
admin_token = %SERVICE_TOKEN%
compute_port = 3000
verbose = True
debug = True
# commented out so devstack logs to stdout
log_file = %DEST%/log/keystone.log

# ================= 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 = %SQL_CONN%
idle_timeout = 30
min_pool_size = 5
max_pool_size = 10
pool_timeout = 200

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

[catalog]
#driver = keystone.catalog.backends.templated.TemplatedCatalog
#template_file = %KEYSTONE_DIR%/etc/default_catalog.templates
driver = keystone.catalog.backends.sql.Catalog
[token]
driver = keystone.token.backends.sql.Token

[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

[filter:s3_extension]
paste.filter_factory = keystone.contrib.s3:S3Extension.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 s3_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

When I use the command cd /opt/stack/keystone && /opt/stack/keystone/bin/keystone-all --config-file /opt/stack/keystone/etc/keystone.conf -d --debug

Outputs as below:

2012-04-05 09:26:59 DEBUG [keystone-all] ********************************************************************************
2012-04-05 09:26:59 DEBUG [keystone-all] Configuration options gathered from:
2012-04-05 09:26:59 DEBUG [keystone-all] command line args: ['/usr/local/bin/keystone-all', '--config-file', '/opt/stack/keystone/etc/keystone.conf', '-d', '--debug']
2012-04-05 09:26:59 DEBUG [keystone-all] config files: ['/opt/stack/keystone/etc/keystone.conf']
2012-04-05 09:26:59 DEBUG [keystone-all] ================================================================================
2012-04-05 09:26:59 DEBUG [keystone-all] admin_port = 35357
2012-04-05 09:26:59 DEBUG [keystone-all] admin_token = passw0rd
2012-04-05 09:26:59 DEBUG [keystone-all] bind_host = 0.0.0.0
2012-04-05 09:26:59 DEBUG [keystone-all] compute_port = 3000
2012-04-05 09:26:59 DEBUG [keystone-all] config_file = ['/opt/stack/keystone/etc/keystone.conf']
2012-04-05 09:26:59 DEBUG [keystone-all] crypt_strength = 40000
2012-04-05 09:26:59 DEBUG [keystone-all] debug = True
2012-04-05 09:26:59 DEBUG [keystone-all] log_config = None
2012-04-05 09:26:59 DEBUG [keystone-all] log_date_format = %Y-%m-%d %H:%M:%S
2012-04-05 09:26:59 DEBUG [keystone-all] log_dir = None
2012-04-05 09:26:59 DEBUG [keystone-all] log_file = /opt/stack/log/keystone.log
2012-04-05 09:26:59 DEBUG [keystone-all] log_format = %(asctime)s %(levelname)8s [%(name)s] %(message)s
2012-04-05 09:26:59 DEBUG [keystone-all] public_port = 5000
2012-04-05 09:26:59 DEBUG [keystone-all] syslog_log_facility = LOG_USER
2012-04-05 09:26:59 DEBUG [keystone-all] use_syslog = False
2012-04-05 09:26:59 DEBUG [keystone-all] verbose = True
2012-04-05 09:26:59 DEBUG [keystone-all] ldap.password = None
2012-04-05 09:26:59 DEBUG [keystone-all] ldap.role_id_attribute = None
2012-04-05 09:26:59 DEBUG [keystone-all] ldap.role_member_attribute = None
2012-04-05 09:26:59 DEBUG [keystone-all] ldap.role_objectclass = None
2012-04-05 09:26:59 DEBUG [keystone-all] ldap.role_tree_dn = None
2012-04-05 09:26:59 DEBUG [keystone-all] ldap.suffix = None
2012-04-05 09:26:59 DEBUG [keystone-all] ldap.tenant_id_attribute = None
2012-04-05 09:26:59 DEBUG [keystone-all] ldap.tenant_member_attribute = None
2012-04-05 09:26:59 DEBUG [keystone-all] ldap.tenant_objectclass = None
2012-04-05 09:26:59 DEBUG [keystone-all] ldap.tenant_tree_dn = None
2012-04-05 09:26:59 DEBUG [keystone-all] ldap.url = None
2012-04-05 09:26:59 DEBUG [keystone-all] ldap.use_dumb_member = None
2012-04-05 09:26:59 DEBUG [keystone-all] ldap.user = None
2012-04-05 09:26:59 DEBUG [keystone-all] ldap.user_id_attribute = None
2012-04-05 09:26:59 DEBUG [keystone-all] ldap.user_objectclass = None
2012-04-05 09:26:59 DEBUG [keystone-all] ldap.user_tree_dn = None
2012-04-05 09:26:59 DEBUG [keystone-all] token.driver = keystone.token.backends.sql.Token
2012-04-05 09:26:59 DEBUG [keystone-all] catalog.driver = keystone.catalog.backends.sql.Catalog
2012-04-05 09:26:59 DEBUG [keystone-all] ec2.driver = keystone.contrib.ec2.backends.sql.Ec2
2012-04-05 09:26:59 DEBUG [keystone-all] sql.connection = mysql://root:mysql@localhost/keystone
2012-04-05 09:26:59 DEBUG [keystone-all] sql.idle_timeout = 30
2012-04-05 09:26:59 DEBUG [keystone-all] policy.driver = keystone.policy.backends.rules.Policy
2012-04-05 09:26:59 DEBUG [keystone-all] identity.driver = keystone.identity.backends.sql.Identity
2012-04-05 09:26:59 DEBUG [keystone-all] ********************************************************************************
2012-04-05 09:27:00 DEBUG [routes.middleware] Initialized with method overriding = True, and path info altering = True
2012-04-05 09:27:00 DEBUG [routes.middleware] Initialized with method overriding = True, and path info altering = True
2012-04-05 09:27:00 DEBUG [routes.middleware] Initialized with method overriding = True, and path info altering = True
2012-04-05 09:27:00 DEBUG [routes.middleware] Initialized with method overriding = True, and path info altering = True
2012-04-05 09:27:00 DEBUG [routes.middleware] Initialized with method overriding = True, and path info altering = True
2012-04-05 09:27:00 DEBUG [routes.middleware] Initialized with method overriding = True, and path info altering = True
2012-04-05 09:27:00 DEBUG [routes.middleware] Initialized with method overriding = True, and path info altering = True
2012-04-05 09:27:00 DEBUG [routes.middleware] Initialized with method overriding = True, and path info altering = True
2012-04-05 09:27:00 DEBUG [routes.middleware] Initialized with method overriding = True, and path info altering = True
2012-04-05 09:27:00 DEBUG [routes.middleware] Initialized with method overriding = True, and path info altering = True
2012-04-05 09:27:00 DEBUG [root] starting server {(None, '/v2.0'): <keystone.middleware.core.TokenAuthMiddleware object at 0x8f2f48c>, (None, ''): <keystone.middleware.core.XmlBodyMiddleware object at 0x8f2ff6c>} on port 35357
2012-04-05 09:27:00 DEBUG [keystone.common.wsgi] Starting /usr/local/bin/keystone-all on 0.0.0.0:35357
2012-04-05 09:27:00 DEBUG [root] starting server {(None, '/v2.0'): <keystone.middleware.core.TokenAuthMiddleware object at 0x8f7276c>, (None, ''): <keystone.middleware.core.XmlBodyMiddleware object at 0x8f7344c>} on port 5000
2012-04-05 09:27:00 DEBUG [keystone.common.wsgi] Starting /usr/local/bin/keystone-all on 0.0.0.0:5000
2012-04-05 09:27:00 DEBUG [eventlet.wsgi.server] (1626) wsgi starting up on http://0.0.0.0:35357/

2012-04-05 09:27:00 DEBUG [eventlet.wsgi.server] (1626) wsgi starting up on http://0.0.0.0:5000/

yong sheng gong (gongysh) said : #3

can you run the below shell script:

 if ! timeout 60 sh -c "while ! http_proxy= wget -q -O- http://localhost:5000/v2.0/; do sleep 1; done"; then
      echo "keystone did not start"
   exit 1
  fi

shwinpiocess (shwinpiocess) said : #4

2012-04-05

shwinpiocess

发件人:yong sheng gong
发送时间:2012-04-05 09:55
主题:Re: [Question #192113]: I change catalog's backend to sql.But when I use devstack script , keystone service can't launch!
收件人:"shwinpiocess"<email address hidden>
抄送:

Your question #192113 on Keystone changed:
https://answers.launchpad.net/keystone/+question/192113

    Status: Open => Needs information

yong sheng gong requested more information:
can you run the below shell script:
Here are the results:
root@key:/opt/stack/keystone# if ! timeout 60 sh -c "while ! http_proxy= wget -q -O- http://localhost:5000/v2.0/; do sleep 1; done"; then
> echo "keystone did not start"
> exit 1
> fi
{"version": {"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://192.168.91.135: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"}]}}

shwinpiocess (shwinpiocess) said : #5

2012-04-05

shwinpiocess

发件人:yong sheng gong
发送时间:2012-04-05 09:55
主题:Re: [Question #192113]: I change catalog's backend to sql.But when I use devstack script , keystone service can't launch!
收件人:"shwinpiocess"<email address hidden>
抄送:

Your question #192113 on Keystone changed:
https://answers.launchpad.net/keystone/+question/192113

    Status: Open => Needs information

yong sheng gong requested more information:
can you run the below shell script:

 if ! timeout 60 sh -c "while ! http_proxy= wget -q -O- http://localhost:5000/v2.0/; do sleep 1; done"; then
      echo "keystone did not start"
   exit 1
  fi

--
I'm very very sorry!The results is wrong!I did not change keystone.conf!
Here are the results after I changed the keystone.conf :

root@key:~# if ! timeout 60 sh -c "while ! http_proxy= wget -q -O- http://localhost:5000/v2.0/; do sleep 1; done"; then
> echo "keystone did not start"
> exit 1
> fi

After a few moment,the shell script excute the "exit 1" command!

shwinpiocess (shwinpiocess) said : #6

root@key:~# if ! timeout 60 sh -c "while ! http_proxy= wget -q -O- http://localhost:5000/v2.0/; do sleep 1; done"; then
 > echo "keystone did not start"
 > exit 1
 > fi

After a few moment,the shell script excute the "exit 1" command!

Launchpad Janitor (janitor) said : #7

This question was expired because it remained in the 'Open' state without activity for the last 15 days.