openstack Train 版本dashaboard 404问题

openstack Train 版按照官方文档安装后

1.访问/dashboard后跳转到/auth/login报404(操作下面2步可以解决dashboard访问404问题,请跳过此步骤)

解决方法如下:

cd /usr/share/openstack-dashboard
python manage.py make_web_conf --apache > /etc/httpd/conf.d/openstack-dashboard.conf

 

2.建立策略文件(policy.json)的软链接,否则登录到dashboard将出现权限错误

解决方法如下:

ln -s /etc/openstack-dashboard /usr/share/openstack-dashboard/openstack_dashboard/conf

 

3.身份管理里面的项目、用户、组和角色都无法打开,日志提示:

Daemon process called 'keystone-public' cannot be accessed by this WSGI application: /usr/bin/keystone-wsgi-public

解决方法如下:

编辑以下文件,找到WEBROOT = '/' 修改为WEBROOT = '/dashboard' (官方未提及坑点之一)
vim /usr/share/openstack-dashboard/openstack_dashboard/defaults.py
vim /usr/share/openstack-dashboard/openstack_dashboard/test/settings.py
vim /usr/share/openstack-dashboard/static/dashboard/js/9937cc9f2cae.js

 

 

=====================================================================================================================

20210708更新

安装victoria版本dashboard项目

1.

登陆Openstack dashboard ,页面出错,信息如下:
Something went wrong!
An unexpected error has occurred. Try refreshing the page. If that doesn't help, contact your local administrator.

 

查看httpd日志报如下错误信息:
tail /var/log/httpd/error_log -f

[Thu Jul 08 10:34:43.602238 2021] [wsgi:error] [pid 43360:tid 140630500005632] [remote 10.199.102.125:52676] "Unable to create a new session key. "
[Thu Jul 08 10:34:43.602242 2021] [wsgi:error] [pid 43360:tid 140630500005632] [remote 10.199.102.125:52676] RuntimeError: Unable to create a new session key. It is likely that the cache is unavailable.

解决方法:

将 /etc/openstack-dashboard/local_settings 里的

SESSION_ENGINE = 'django.contrib.sessions.backends.cache'

改成

SESSION_ENGINE = 'django.contrib.sessions.backends.file'
或者
SESSION_ENGINE = 'django.contrib.sessions.backends.signed_cookies'
#SESSION_ENGINE = 'django.contrib.sessions.backends.file'


重启httpd和memcached

成功进入Dashboard

 

2.

查看httpd日志报如下错误信息:
tail /var/log/httpd/error_log -f

[Thu Jul 08 10:44:55.289974 2021] [authz_core:error] [pid 44700:tid 140425917486848] [client 10.199.102.126:44924] AH01630: client denied by server configuration: /usr/bin/keystone-wsgi-public
[Thu Jul 08 10:44:55.290668 2021] [wsgi:error] [pid 44693:tid 140426236409600] [remote 10.199.102.125:59035] INFO openstack_auth.forms Login failed for user "admin" using domain "default", remote address 10.199.102.125.

解决方法:

UPDATE with SOLUTION from neal_utas:

The docs for horizon at docs.openstack.org (at least for ubuntu) are incorrect. When editing /etc/openstack-dashboard/local_settings.py, the online docs are missing port 5000. The correct entry for OPENSTACK_KEYSTONE_URL is:

OPENSTACK_KEYSTONE_URL = "http://%s:5000/identity/v3" % OPENSTACK_HOST
After making that change and then restarting (systemctl reload apache2.service) it works.

 

posted @ 2019-12-05 17:01  chili7  阅读(5159)  评论(0编辑  收藏  举报