OpenStack-nova keystone 配置错误处理方法
11
2022-08-12
OpenStack-nova keystone 配置错误处理方法
错误:Missing value auth-url required for auth plugin password
[root@master01 ~]# openstack domain create --description "An Example Domain" example Missing value auth-url required for auth plugin password
报错,我这里是因为之前创建的keystone用户错误
keystone创建异常,将会导致,后续各个组件认证失败的异常,各个组件初始化创建失败
解决方案:在mysql中删除endpoint配置,重新配置
MariaDB [keystone]> use keystone MariaDB [keystone]> select * from endpoint; +----------------------------------+--------------------+-----------+----------------------------------+-----------------------------------+-------+---------+-----------+ | id | legacy_endpoint_id | interface | service_id | url | extra | enabled | region_id | +----------------------------------+--------------------+-----------+----------------------------------+-----------------------------------+-------+---------+-----------+ | 798392b1d21b40e6b9bc6686349bee39 | NULL | admin | dd7e0ec9ae214d10ba0311ae2eaf07b7 | http://jack20_controller:5000/v3/ | {} | 1 | RegionOne | | cc21ef568fb7438cb98fe6d3b329933e | NULL | public | dd7e0ec9ae214d10ba0311ae2eaf07b7 | http://jack20_controller:5000/v3/ | {} | 1 | RegionOne | | e1aebd61778c47ddb27ca3ed77e31544 | NULL | internal | dd7e0ec9ae214d10ba0311ae2eaf07b7 | http://jack20_controller:5000/v3/ | {} | 1 | RegionOne | +----------------------------------+--------------------+-----------+----------------------------------+-----------------------------------+-------+---------+-----------+ MariaDB [keystone]> delete from endpoint where url like '%jack%'; MariaDB [keystone]> commit;
检查
MariaDB [keystone]> select * from endpoint; Empty set (0.001 sec)
重新配置:
[root@master01 ~]# keystone-manage bootstrap --bootstrap-password 123456 \ > --bootstrap-admin-url http://master01:5000/v3/ \ > --bootstrap-internal-url http://master01:5000/v3/ \ > --bootstrap-public-url http://master01:5000/v3/ \ > --bootstrap-region-id RegionOne
错误:The request you have made requires authentication.
[root@master01 ~]# openstack domain create --description "An Example Domain" example The request you have made requires authentication. (HTTP 401) (Request-ID: req-ff2970fd-5f79-435e-9589-5c23fc8095fe)
解决方案:手动获取token
获取令牌
[root@master01 ~]# openssl rand -hex 10 a64258079b00789288a3
添加到keystone配置文件
vim /etc/keystone/keystone.conf #token =admin_token=a64258079b00789288a3
[root@master01 ~]# vim openrc export OS_PROJECT_DOMAIN_NAME=Default export OS_PROJECT_NAME=admin export OS_USER_DOMAIN_NAME=Default export OS_USERNAME=admin export OS_PASSWORD=123456export OS_AUTH_URL=http://master01:5000/v3 export OS_AUTH_URL=http://master01:5000/v3 export OS_IDENTITY_API_VERSION=3 export OS_TOKEN=a64258079b00789288a3 [root@master01 ~]# source openrc
再次尝试:
[root@master01 ~]# openstack domain create --description "An Example Domain" example __init__() got an unexpected keyword argument 'token'
错误:init() got an unexpected keyword argument 'token'
还是报错,把export OS_TOKEN置空
[root@master01 ~]# vim openrc export OS_PROJECT_DOMAIN_NAME=Default export OS_PROJECT_NAME=admin export OS_USER_DOMAIN_NAME=Default export OS_USERNAME=admin export OS_PASSWORD=123456 export OS_AUTH_URL=http://master01:5000/v3 export OS_AUTH_URL=http://master01:5000/v3 export OS_IDENTITY_API_VERSION=3 export OS_TOKEN=""
source之后再尝试:成功
[root@master01 ~]# source openrc [root@master01 ~]# openstack domain create --description "An Example Domain" example +-------------+----------------------------------+ | Field | Value | +-------------+----------------------------------+ | description | An Example Domain | | enabled | True | | id | 82137c5a2ab3437b946e9d4888d16194 | | name | example | | tags | [] | +-------------+----------------------------------+
- 0
-
分享