首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Openstack-Keystone启动失败

Openstack-Keystone启动失败
EN

Stack Overflow用户
提问于 2013-03-24 16:01:02
回答 7查看 20.7K关注 0票数 0

在过去的几天里,我尝试了几乎所有的方法来运行keystone,但都没有效果。

设置都在同一台主机上,虚拟化、openstack和keystone都在同一台主机上,所以我尝试使用127.0.0.1和localhost以及主机的IP来设置keystone,但没有成功

代码语言:javascript
复制
[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

我已经在logging.conf文件中启用了日志记录,并将级别设置为DEBUG和INFO,但是日志文件中没有任何内容。

代码语言:javascript
复制
[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]#

任何想法都会给你带来极大的appreciated.Thank

EN

回答 7

Stack Overflow用户

回答已采纳

发布于 2013-03-24 23:24:36

正如我在评论中提到的,我从未见过配置文件的节标题与config选项位于同一行:

代码语言:javascript
复制
[DEFAULT] log_file = /var/log/keystone/keystone.log 

我也看到它是这样的:

代码语言:javascript
复制
[DEFAULT]
log_file = /var/log/keystone/keystone.log 

但是,我不知道这是否与您的问题有关。

要启用调试级日志记录,请确保在/etc/keystone/logging.conf中设置以下内容:

代码语言:javascript
复制
[logger_root]
level=DEBUG

然后尝试手动运行keystone,而不是作为服务:

代码语言:javascript
复制
$ sudo -u keystone bash
$ HOME=/var/lib/keystone keystone-all --debug

希望您能在标准输出中看到相关的错误消息。

(我相信它仍然会将日志发送到/var/ log /keystone/keystone.log,不确定像这样手动运行时如何让它真正登录到标准输出)。

票数 4
EN

Stack Overflow用户

发布于 2013-03-25 20:35:39

  1. 为admin_token添加有效的令牌。它不应该是“*”。本地主机检查以下行: sql connection =mysql://keystone:*@

/keystone它应该是这样的: connection = mysql://keystone:keystone@localhost/keystone

  1. Refer to this url for a example keystone.conf file keystone.conf
票数 0
EN

Stack Overflow用户

发布于 2013-05-17 01:05:23

我也遇到了这个问题。我在Ubuntu 12.04LTS上运行。我发现/etc/init/keystone.conf中的服务启动命令正在使用启动-停止-守护进程来运行服务。它是为比我盒子上的版本更新的版本编写的。不接受--chdir变量作为输入。一旦我删除了这行代码,keystone就启动了。

尝试运行:

代码语言:javascript
复制
start-stop-daemon --start --chuid keystone --name keystone --exec /usr/bin/keystone-all

/etc/init/keystone.conf  after

description "Keystone API server"
author "Soren Hansen <soren@linux2go.dk>"

start on runlevel [2345]
stop on runlevel [!2345]

respawn

exec start-stop-daemon --start --chuid keystone \
            --name keystone \
            --exec /usr/bin/keystone-all
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/15596370

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档