0

在过去的几天里,我几乎尝试了所有方法来让 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]#

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

4

7 回答 7

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,不确定如何在像这样手动运行时真正让它记录到标准输出)。

于 2013-03-24T15:24:35.600 回答
0

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

1)删除梯形包: -

  apt-get remove  keystone 

2)重新启动系统

 reboot 

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

apt-get install keystone

4) 检查keystone服务状态

 service keystone status

它将显示启动/运行

5) 现在在 /etc/keystone/keystone.conf 中做你想做的必要的改变

更改 conf 文件后,请勿重新启动 KEYSTONE SERVICE

使用 stop 和 start 命令来产生重启的效果,但不要重启。

服务基石停止

服务基石启动

如需进一步帮助,请粘贴我的 CLI 转储:-

http://pastebin.com/sduuFCL7

于 2014-08-25T15:28:49.447 回答
0

icehouse文档和安装存在多个问题。packstack已损坏,因此开始的唯一方法是手动遵循您发行版的上游文档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使用新config_file值进行更新

  2. 文档关于连接是错误的mysql,它应该去[sql]而不是[database]这样:

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

    10.1.1.100  controller
    
  4. 确保取消注释log_filekeystone.conf了解正在发生的事情。

于 2015-01-02T00:05:19.143 回答
0

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

尝试运行:

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
于 2013-05-16T17:05:22.963 回答
0

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

于 2013-06-22T06:41:42.577 回答
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
于 2013-03-25T12:35:38.660 回答
0

我遇到了类似的问题。我按照下面提到的步骤操作并启动了 openstack-keystone 服务。

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

  1. 在 [DEFAULT] 部分

    [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
    

进行上述更改后,使用命令填充身份服务数据库

su -s /bin/sh -c "keystone-manage db_sync" keystone

使用以下命令启动 openstack-keystone 服务

systemctl start openstack-keystone
于 2016-03-19T14:56:06.317 回答