2013-03-24 700 views
0

在过去的几天里,我已经尝试了几乎所有的东西来获得keystone运行无效。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,但日志文件中没有任何内容。

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

任何想法将大大appreciated.Thank你

+0

我一直都看到像[DEFAULT]这样的部分标签在他们自己的路线上。 – 2013-03-24 15:16:51

回答

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 

然后尝试运行梯形手工而不是作为一项服务:

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

希望你会在标准输出中看到相关的错误信息。 (我相信它仍然会将日志记录发送到/var/log/keystone/keystone.log,不知道如何在像这样手动运行时实际将它记录到标准输出)。

+0

你好,林琳,谢谢你的回复。我创建帖子时格式已关闭,这就是为什么它是这样的。所以我设法按照你的建议启动它并且它正在工作,但是我不明白为什么它不是作为服务启动的,也许我会检查启动它或者修改它们的脚本,但是这不是一个好的开始它就是这样。再次感谢您的帮助 – Bogdan 2013-03-25 18:12:20

+0

我可以按照您建议的方式(如用户keystone)运行,也是这样的:'runuser -s/bin/sh keystone -c“/ usr/bin/keystone-all --debug”但它无法作为服务运行! – dashesy 2015-01-01 22:25:55

+0

不知何故,它现在在以服务运行时在日志文件中显示错误:'keystone ConfigFileNotFound'。这是在F21顺便说一句。 – dashesy 2015-01-01 22:39:16

0
  1. 为admin_token添加一个有效标记。它不应该是“*”。

  2. 检查以下线: [SQL]连接= MySQL的://梯形:* @本地/梯形 它应该是这样的: 连接= MySQL的://梯形:梯形@本地/梯形

  3. 请前往以下网址为例keystone.conf文件 http://docs.openstack.org/trunk/openstack-compute/install/yum/content/keystone-conf-file.html
+0

嗨Vigay,我在发布问题时编辑了所有敏感信息。根据我以前的回复,似乎我已经运行了,唯一剩下的就是能够将它作为服务运行 – Bogdan 2013-03-26 07:56:58

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 <[email protected]>" 

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

respawn 

exec start-stop-daemon --start --chuid keystone \ 
      --name keystone \ 
      --exec /usr/bin/keystone-all 
0

检查您的IP ADRESS是localrc等于HOST_IP=...

0

这可能是由于梯形没有得到正常启动,因此端口35357是不是在听模式。 这似乎是服务重点的异常行为。 我提到在Ubuntu 12.04内核版本3.2.0-67-generic上在我的系统上运行havana installtion的步骤。经过一天的头痛周围这个问题。尝试这些步骤,最好以相同的顺序。重启后

apt-get remove keystone 

2)重新启动系统

reboot 

3)重新安装KEYSTONE - :

1)拆下梯形包。

apt-get install keystone 

4)检查重点服务的状态

service keystone status 

它会显示开始/运行

5)现在,你要在/ etc /梯形/梯形做必要的改变。 conf

在conf文件中进行更改后请勿重启KEYSTONE服务

使用停止和启动命令可以产生重新启动的效果,但不会重新启动。

服务梯形停止

服务梯形启动

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

http://pastebin.com/sduuFCL7

0

没有与icehouse单证多个问题和安装。 packstack已损坏,因此要开始的唯一方法是手动执行upstream docs for your distrokeystone在继续之前正确设置非常重要,因为其他服务依赖于它。

  1. 粘贴文件/usr/share/keystone/keystone-dist-paste.ini应该被复制到/etc/要到配置脚本,这样访问:

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

    确保新config_file

  2. 文档更新keystone.conf关于mysql连接是错误的,它应该去[sql]而不是[database]所以:

    openstack-config --set /etc/keystone/keystone.conf sql connection mysql://keystone:[email protected]/keystone 
    
  3. 名称controller应该解决到什么mysql结合了,我将它添加到/etc/hosts这样如果[mysqld]/bind-address/etc/my.cnf10.1.1.100

    10.1.1.100 controller 
    
  4. 确保在keystone.conf以取消log_file得到正在发生的事情。

0

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

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

  1. 在[DEFAULT]部分

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

    [database] 
    connection = mysql://keystone:[email protected]/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 
    

使上述变化后填充使用Identity服务数据库命令

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

启动开栈-梯形服务

systemctl start opennstack-keystone