在安装和配置keystone时出现了两个问题,好久才解决,发篇文章记录一下,省得以后忘记。

1、 No handlers could be found for logger "keystone client.client" Unable to authorize user 解决措施:Adjust the admin_token to the same as your script and your /etc/keystone.conf

2、No handlers could be found for logger "keystoneclient.client"Unable to communicate with identity service: [Errno 111] Connection refused. (HTTP 400)解决措施:首先检查配置文件中的设置,格式一定要正确,如public_port = 5000,在行首一定不要有空格。(我就是因为这个原因出错的)。然后就得检查keystone.conf中的catalog的配置。如果是用默认的数据库的话就把这两句加上。

 driver = keystone.catalog.backends.templated.TemplatedCatalog

 template_file = default_catalog.templates

如果是使用新建的数据库呢就得加上这一句:

driver = keystone.catalog.backends.sql.Catalog

另外最好使用 ps aux | grep keystone 去查看keystone的各项是否正常。

keystone 16914  0.0  0.0   3584  1476 ?        Ss   21:31   0:00 su -s /bin/sh -c exec keystone-all keystone
keystone 16921  2.0  0.3  30888 22032 ?        S    21:31   0:00 /usr/bin/python /usr/bin/keystone-all
root     16927  0.0  0.0   4384   840 pts/0    R+   21:32   0:00 grep --color=auto keystone
若如上就是正常的。
附注:最好把环境变量设置在/root/.bashrc中,然后source一下,这样子再重启或打开子进程也不用担心了。

以此记录keystone烦人的种种。