Openstack-Keystone无法启动

时间:2013-03-24 08:01:02

标签: openstack keystone

在过去的几天里,我几乎尝试了一切,以便让梯形失效无法使用。

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

[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,但日志文件中没有任何内容。

[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]#

任何想法都将不胜感激。谢谢你

7 个答案:

答案 0 :(得分:4)

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

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

我也看到过这样的话:

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

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

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

[logger_root]
level=DEBUG

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

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

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

(我相信它仍然会将日志记录发送到/var/log/keystone/keystone.log,不知道如何在这样手动运行时实际登录到标准输出。)

答案 1 :(得分:0)

  1. 为admin_token添加有效令牌。它不应该是" * "。

  2. 检查以下行: [sql] connection = mysql:// keystone: * @ localhost / keystone 它应该是这样的: connection = mysql:// keystone:keystone @ localhost / keystone

  3. 请参阅此URL以获取示例keystone.conf文件 http://docs.openstack.org/trunk/openstack-compute/install/yum/content/keystone-conf-file.html

答案 2 :(得分:0)

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

尝试跑步:

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

答案 3 :(得分:0)

检查您的IP地址是否等于localrc中的HOST_IP=...

答案 4 :(得分:0)

这可能是由于 keystone 无法正常启动,因此端口35357未处于侦听模式。 这似乎是服务keystone的异常行为。 我在Ubuntu 12.04内核版本3.2.0-67-generic上提到了我的哈瓦那安装系统的步骤。围绕这个问题经过一天的头痛。请尝试以下步骤,最好以相同的顺序。

1)删除keystone包: -

  apt-get remove  keystone 

2)重新启动系统

 reboot 

3)重新启动后重新安装KEYSTONE。

apt-get install keystone

4)检查梯形失真服务的状态

 service keystone status

它将显示开始/正在运行

5)现在在/etc/keystone/keystone.conf中进行必要的更改

在conf文件中进行更改不要重新启动KEYSTONE SERVICE

使用stop and start命令生成重启效果但不重启。

服务keystone stop

服务keystone start

要获得进一步的帮助,请粘贴我的CLI转储: -

http://pastebin.com/sduuFCL7

答案 5 :(得分:0)

icehouse文档和安装存在多个问题。 packstack已被破解,因此开始使用的唯一方法是手动关注upstream docs for your distro。在继续之前,keystone非常重要,因为其他服务依赖于它。

  1. 应将粘贴文件/usr/share/keystone/keystone-dist-paste.ini复制到/etc/,以便配置脚本可以访问,如下所示:

    cp /usr/share/keystone/keystone-dist-paste.ini /etc/keystone/
    chown keystone:keystone /etc/keystone/*
    

    确保使用新的keystone.conf

  2. 更新config_file
  3. 关于mysql连接的文档有误,应该转到[sql]而不是[database],所以:

    openstack-config --set /etc/keystone/keystone.conf    sql connection mysql://keystone:PASSWD@controller/keystone
    
  4. 名称controller应解析为mysql绑定的任何内容,如果/etc/hosts [mysqld]/bind-address,我会将其添加到/etc/my.cnf10.1.1.100

    10.1.1.100  controller
    
  5. 请务必取消注释log_file中的keystone.conf以了解正在发生的事情。

答案 6 :(得分:0)

我遇到了类似的问题。我按照下面提到的步骤和openstack-keystone服务开始了。

编辑/etc/keystone/keystone.conf文件并完成以下操作:

  1. 在[默认]部分

    [DEFAULT]
    
    admin_token = ADMIN_TOKEN
    
  2. 在[数据库]部分

    [database]
    connection = mysql://keystone:KEYSTONE_DBPASS@controller/keystone
    
  3. 在[token]部分中,配置UUID令牌提供程序和SQL驱动程序

    [token]
    provider = keystone.token.providers.uuid.Provider
    driver = keystone.token.persistence.backends.sql.Token
    
  4. 在[撤销]部分

    [revoke]
    driver = keystone.contrib.revoke.backends.sql.Revoke
    
  5. 进行上述更改后,使用命令

    填充Identity Service数据库
    su -s /bin/sh -c "keystone-manage db_sync" keystone
    

    使用以下命令

    启动openstack-keystone服务
    systemctl start openstack-keystone