执行OpenStack命令报错HTTP 401 Unauthorized或Service Unavailable (HTTP 503)
问题现象描述
执行openstack image create命令报错如下:
1
|
HTTP 401 Unauthorized: This server could not verify that you are authorized to access the document you requested. Either you supplied the wrong credentials (e.g., bad password), or your browser does not understand how to supply the credentials required. |
1
|
503 Service Unavailable: The server is currently unavailable. Please try again at a later time. (HTTP 503) |
执行openstack image list命令报错如下:
1
|
Unauthorized (HTTP 401) |
1
|
Service Unavailable (HTTP 503) |
关键过程、根本原因分析
HTTP 401的报错说明鉴权错误,需要检查配置文件中openstack相关用户的密码是否配置正确,角色权限配置是否正确。openstack其他组件也会出现类似问题。
结论、解决方案及效果
- 检查各个配置文件中密码是否正确。
- 检查是否将管理员角色添加到组件用户。
以glance为例
1
openstack role assignment list --project service --user glance --names
如果没有输出或者Role不是admin,则执行如下命令将管理员角色添加到组件用户中。
1
openstack role add --project service --user glance admin
父主题: OpenStack