报错信息:
[root@controller keystone]# openstack user show admin
Discovering versions from the identity service failed when creating the password plugin. Attempting to determine version from URL.
Unable to establish connection to http://controller:35357/v3/auth/tokens
原因:
怀疑就是httpd服务没有开启的问题 但是不确定。
查看日志:
[root@controller /]# tail -f /var/log/keystone/keystone.log
2019-08-21 10:09:53.001 16136 INFO keystone.token.providers.fernet.utils [req-5d931edc-04a6-42d5-92a2-4fc795daa4d0 6f4983e7d94747788b2d13a58213c2d0 84f046f1e1f446a693693ccaba3b2296 - b38751d4c34c4f9383f77d42bc59298a b38751d4c34c4f9383f77d42bc59298a] Loaded 2 encryption keys (max_active_keys=3) from: /etc/keystone/fernet-keys/
2019-08-21 10:09:53.087 16136 INFO keystone.token.providers.fernet.utils [req-5d931edc-04a6-42d5-92a2-4fc795daa4d0 6f4983e7d94747788b2d13a58213c2d0 84f046f1e1f446a693693ccaba3b2296 - b38751d4c34c4f9383f77d42bc59298a b38751d4c34c4f9383f77d42bc59298a] Loaded 2 encryption keys (max_active_keys=3) from: /etc/keystone/fernet-keys/
2019-08-21 10:13:53.885 16138 INFO keystone.common.wsgi [req-eeb98f09-0c22-4c95-9f4e-d55822355ba4 - - - - -] GET http://controller:35357/v3/
2019-08-21 10:13:53.901 16136 INFO keystone.common.wsgi [req-398f11e3-4f4c-4dfd-a1e5-ae00bdf64f68 - - - - -] POST http://controller:35357/v3/auth/tokens
2019-08-21 10:13:54.048 16136 INFO keystone.token.providers.fernet.utils [req-398f11e3-4f4c-4dfd-a1e5-ae00bdf64f68 - - - - -] Loaded 2 encryption keys (max_active_keys=3) from: /etc/keystone/fernet-keys/
2019-08-21 10:13:54.057 16140 INFO keystone.common.wsgi [req-481e65e8-cce3-4c2f-b6eb-6100f90ee3be - - - - -] POST http://controller:35357/v3/auth/tokens
2019-08-21 10:13:54.202 16140 INFO keystone.token.providers.fernet.utils [req-481e65e8-cce3-4c2f-b6eb-6100f90ee3be - - - - -] Loaded 2 encryption keys (max_active_keys=3) from: /etc/keystone/fernet-keys/
2019-08-21 10:13:54.208 16136 INFO keystone.token.providers.fernet.utils [req-37d0836b-b305-4386-b80a-81c2b3a61268 - - - - -] Loaded 2 encryption keys (max_active_keys=3) from: /etc/keystone/fernet-keys/
2019-08-21 10:13:54.302 16136 INFO keystone.common.wsgi [req-37d0836b-b305-4386-b80a-81c2b3a61268 62405ea67c354fad93d842afd9721a07 46b8f2fa4fe54cccb3de4ade06c5f1af - b38751d4c34c4f9383f77d42bc59298a b38751d4c34c4f9383f77d42bc59298a] GET http://controller:35357/v3/services
2019-08-22 00:32:27.822 15864 INFO keystone.token.providers.fernet.utils [-] Key repository is already initialized; aborting.
好吧 看不懂。。。。。
解决办法:
[root@controller /]# source /etc/keystone/admin-openrc.sh
[root@controller ~]# systemctl restart httpd
成功:
[root@controller /]# openstack user show admin
+-----------+----------------------------------+
| Field | Value |
+-----------+----------------------------------+
| domain_id | b38751d4c34c4f9383f77d42bc59298a |
| enabled | True |
| id | 62405ea67c354fad93d842afd9721a07 |
| name | admin |
+-----------+----------------------------------+