keystone无法查看catalog并且用户无法申请令牌的解决方案

时间:2023-12-14 13:41:38

在运行openstack catalog list之后提示:

Only an authorized user may issue a new token. #只有授权用户才能申请token
openstack --os-auth-url http://controller:35357/v3 \
--os-identity-api-version \
--os-project-domain-name default \
--os-user-domain-name default \
--os-project-name admin \
--os-username admin \
token issue

也提示: Only an authorized user may issue a new token.

之前也遇到过这种情况,是环境变量冲突了。

使用env查看环境变量,unset和keystone有关的环境变量,并且重新设置

然后再openstack catalog list

[root@controller keystone]# openstack catalog list
+----------+----------+---------------------------------------------+
| Name | Type | Endpoints |
+----------+----------+---------------------------------------------+
| keystone | identity | RegionOne |
| | | public: http://controller:5000/v3/ |
| | | RegionOne |
| | | internal: http://controller:35357/v3/ |
| | | RegionOne |
| | | admin: http://controller:35357/v3/ |
| | | |
+----------+----------+---------------------------------------------+