openstack打开dashboard界面登陆的时候显示认证错误,已确定域账户密码都是对的

openstack登陆dashboard界面认证错误_第1张图片

解决方案:

先查看日志文件:

首先查看keystone的日志

2019-04-03 13:51:36.969 11355 INFO keystone.token.providers.fernet.utils [req-76bb2d23-6fb6-4386-a573-9649962bbbdf - - - - -] Loaded 2 encryption keys (max_active_keys=3) from: /etc/keystone/fernet-keys/
2019-04-03 13:51:37.062 11355 INFO keystone.common.wsgi [req-76bb2d23-6fb6-4386-a573-9649962bbbdf be235c07312e4c6cb2f249d5be1e75e1 04dcdbb843d844b382ccd3a9a5fbfe8c - 2438074ed17149cd8ed6c92f6bb498aa 2438074ed17149cd8ed6c92f6bb498aa] GET http://controller:35357/v3/services/0403cb770436464bac0daef4e04dfac8
2019-04-03 13:51:37.075 11354 INFO keystone.token.providers.fernet.utils [req-5b7aa6c0-f8ea-4085-bc2d-f086b14c4843 - - - - -] Loaded 2 encryption keys (max_active_keys=3) from: /etc/keystone/fernet-keys/
2019-04-03 13:51:37.170 11354 INFO keystone.common.wsgi [req-5b7aa6c0-f8ea-4085-bc2d-f086b14c4843 be235c07312e4c6cb2f249d5be1e75e1 04dcdbb843d844b382ccd3a9a5fbfe8c - 2438074ed17149cd8ed6c92f6bb498aa 2438074ed17149cd8ed6c92f6bb498aa] GET http://controller:35357/v3/services/3ccf98ef09414516acda0f4fb4738071

keystone认证一切正常

再去看下http的报错日志

[Wed Apr 03 13:54:47.543826 2019] [core:notice] [pid 12469] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
[Wed Apr 03 17:55:26.923891 2019] [:error] [pid 12471] Could not process panel theme_preview: Dashboard with slug "developer" is not registered.
[Wed Apr 03 17:55:27.732959 2019] [:error] [pid 12471] Logging out user "".
[Wed Apr 03 17:55:34.724240 2019] [:error] [pid 12471] Login failed for user "admin".

看来是dashboard配置文件出错了导致dashboard无法认证用户登录

检查/etc/openstack-dashboard/local_settings 配置文件

openstack登陆dashboard界面认证错误
OPENSTACK_HOST字段未填写

OPENSTACK_HOST = "controller"

保存退出并重启http服务和缓存服务

systemctl restart httpd.service memcached.service

刷新页面重新登录

openstack登陆dashboard界面认证错误_第2张图片

成功登陆。