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

在使用OpenStack命令创建资源时遇到'Discovering versions from the identity service failed'错误和HTTP 401身份验证失败的问题。文章提到,即使Keystone数据库有数据且环境变量正确,仍可能出现此错误。解决方案包括检查配置文件中的[token]部分,确保没有配置错误,或者在问题持续存在时删除数据库并重新初始化fernet。若所有尝试都无效,建议删除数据库彻底重试,并参考提供的博客文章链接进行详细排查。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

[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.youkuaiyun.com/controllerha/article/details/78701936

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值