Openstack-Keystone failing to start

Bogdan picture Bogdan · Mar 24, 2013 · Viewed 20.3k times · Source

I've tried almost everything in the past couple of days to get keystone running to no avail.

The setup is all on the same host, the virtualization and openstack and keystone are all on the same host, so I've tried setting up keystone with 127.0.0.1 and localhost and the IP of the host with no luck

[DEFAULT] log_file = /var/log/keystone/keystone.log 
admin_token = *** 
bind_host = 192.168.33.11 
public_port = 5000 
admin_port = 35357 
compute_port = 8774

# === Logging Options ===
# Print debugging output verbose = True

# Print more verbose output
# (includes plaintext request logging, potentially including passwords)
# debug = False

# Name of log file to output to. If not set, logging will go to stdout. log_file = keystone.log

# The directory to keep log files in (will be prepended to --logfile) log_dir = /var/log/keystone

# Use syslog for logging.
# use_syslog = False

# syslog facility to receive log lines
# syslog_log_facility = LOG_USER

# If this option is specified, the logging configuration file specified is
# used and overrides any other logging options specified. Please see the
# Python logging module documentation for details on logging configuration
# files. log_config = logging.conf

# A logging.Formatter log message format string which may use any of the
# available logging.LogRecord attributes.
# log_format = %(asctime)s %(levelname)8s [%(name)s] %(message)s

# Format string for %(asctime)s in log records.
# log_date_format = %Y-%m-%d %H:%M:%S

# onready allows you to send a notification when the process is ready to serve
# For example, to have it notify using systemd, one could set shell command:
# onready = systemd-notify --ready
# or a module with notify() method:
# onready = keystone.common.systemd

[sql] connection = mysql://keystone:***@localhost/keystone
# idle_timeout = 200

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

[catalog] template_file = /etc/keystone/default_catalog.templates driver = keystone.catalog.backends.sql.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 = default_catalog.templates

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

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

I've enabled logging in the logging.conf file and set the level to DEBUG and INFO, however nothing in log files.

[root@* keystone]# service openstack-keystone restart
Stopping keystone:                                         [FAILED]
Starting keystone:                                         [  OK  ]
[root@* keystone]# service openstack-keystone restart
Stopping keystone:                                         [FAILED]
Starting keystone:                                         [  OK  ]
[root@* keystone]# ps aux | grep keystone
root     25580  0.0  0.0 103236   880 pts/1    S+   09:41   0:00 grep keystone
[root@* keystone]#

Any ideas will be greatly appreciated.Thank you

Answer

Lorin Hochstein picture Lorin Hochstein · Mar 24, 2013

As I mentioned in the comment, I've never seen a config file with the section headings on the same line as config option:

[DEFAULT] log_file = /var/log/keystone/keystone.log 

I've also seen it like this instead:

[DEFAULT]
log_file = /var/log/keystone/keystone.log 

However, I have no idea if this is related to your issue.

To enable debug-level logging, make sure you set the following in /etc/keystone/logging.conf:

[logger_root]
level=DEBUG

Then try running keystone manually instead of as a service:

$ sudo -u keystone bash
$ HOME=/var/lib/keystone keystone-all --debug

Hopefully you'll see a relevant error message on standard out.

(I believe it will still send the logging to /var/log/keystone/keystone.log, not sure how to actually get it to log to standard out when running manually like this).