keystone时使用openstack命令创建时报错Discovering versions from the identity service failed when creating the p

[root@controller ~]# openstack service create   --name keystone --description "OpenStack Identity" identity
Discovering versions from the identity service failed when creating the password plugin. Attempting to determine version from URL.
The request you have made requires authentication. (HTTP 401) (Request-ID: req-f11f469e-f177-45e4-8f5d-c8021524e6bf)

Discovering versions from the identity service failed when creating the password plugin. Attempting to determine version from URL.

The request you have made requires authentication. (HTTP 401) (Request-ID: req-f11f469e-f177-45e4-8f5d-c8021524e6bf)

在创建密码插件时,从标识服务中发现版本失败。尝试从URL中确定版本。

您所做的请求需要身份验证。(HTTP 401)


发现ksystone数据库有数据,token与环境变量也没有错

MariaDB [(none)]> use keystone ;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
MariaDB [keystone]> show tables;
+------------------------+
| Tables_in_keystone     |
+------------------------+
| access_token           |
| assignment             |
| config_register        |
| consumer               |
| credential             |
| domain                 |
| endpoint               |
| endpoint_group         |
| federated_user         |
| federation_protocol    |
| group                  |

查看kystone错误日志报错如下

[root@controller ~]# tail -f /var/log/keystone/keystone.log 
2017-11-16 09:03:09.126 12591 ERROR keystone.auth.controllers     created = self.creator()
2017-11-16 09:03:09.126 12591 ERROR keystone.auth.controllers   File "/usr/lib/python2.7/site-packages/dogpile/cache/region.py", line 625, in gen_value
2017-11-16 09:03:09.126 12591 ERROR keystone.auth.controllers     created_value = creator()
2017-11-16 09:03:09.126 12591 ERROR keystone.auth.controllers   File "/usr/lib/python2.7/site-packages/dogpile/cache/region.py", line 1049, in creator
2017-11-16 09:03:09.126 12591 ERROR keystone.auth.controllers     return fn(*arg, **kw)
2017-11-16 09:03:09.126 12591 ERROR keystone.auth.controllers   File "/usr/lib/python2.7/site-packages/keystone/resource/core.py", line 716, in get_domain_by_name
2017-11-16 09:03:09.126 12591 ERROR keystone.auth.controllers     raise exception.DomainNotFound(domain_id=domain_name)
2017-11-16 09:03:09.126 12591 ERROR keystone.auth.controllers DomainNotFound: Could not find domain: default
2017-11-16 09:03:09.126 12591 ERROR keystone.auth.controllers 
2017-11-16 09:03:09.128 12591 WARNING keystone.common.wsgi [req-f11f469e-f177-45e4-8f5d-c8021524e6bf - - - - -] Authorization failed. The request you have made requires authentication. from 192.168.100.10

原因fernet keys却没有正确初始化

解决方法重新初始化fernet

keystone-manage fernet_setup --keystone-user keystone --keystone-group keystone

如果初始化后还报错401或者500如

[root@controller ~]# keystone-manage fernet_setup --keystone-user keystone --keystone-group keystone
[root@controller ~]# openstack service create   --name keystone --description "OpenStack Identity" identity
The request you have made requires authentication. (HTTP 401) (Request-ID: req-5a38834a-b194-4303-8a69-3833927b8508)


[root@controller ~]# keystone-manage fernet_setup --keystone-user keystone --keystone-group keystone
[root@controller ~]# openstack service create   --name keystone --description "OpenStack Identity" identity
Internal Server Error (HTTP 500)

检查配置文件中[token]是否配置错误,如果错误是无法成功初始化fernet的

如果始终给你报401就删掉数据库重新来吧,如果还是有毛病看我这篇文章

http://blog.csdn.net/controllerha/article/details/78701936

把些个环境配置重新来一篇

你可能感兴趣的:(OpenStack错误整理)