openstack yoga版本 dashboard 404问题求助

m0_63241910 2023-05-14 15:21:46

虚拟机是centos8 stream,按照官方文档进行安装后,浏览器访问10.0.0.11/dashboard会报错404

 

查看/var/log/httpd/error日志显示OpenStack  Dashboard的WSGI脚本无法找到或无法读取的错误

[Sun May 14 15:11:32.935809 2023] [wsgi:error] [pid 3313:tid 140181323626240] [client 10.0.0.1:57323] Target WSGI script not found or unable to stat: /usr/share/openstack-dashboard/openstack_dashboard/wsgi
[Sun May 14 15:11:33.269890 2023] [wsgi:error] [pid 3313:tid 140181306840832] [client 10.0.0.1:57323] Target WSGI script not found or unable to stat: /usr/share/openstack-dashboard/openstack_dashboard/wsgi
[Sun May 14 15:11:33.572512 2023] [wsgi:error] [pid 3313:tid 140181290055424] [client 10.0.0.1:57323] Target WSGI script not found or unable to stat: /usr/share/openstack-dashboard/openstack_dashboard/wsgi
[Sun May 14 15:11:33.793648 2023] [wsgi:error] [pid 3313:tid 140181273270016] [client 10.0.0.1:57323] Target WSGI script not found or unable to stat: /usr/share/openstack-dashboard/openstack_dashboard/wsgi
[Sun May 14 15:11:33.993826 2023] [wsgi:error] [pid 3313:tid 140181315233536] [client 10.0.0.1:57323] Target WSGI script not found or unable to stat: /usr/share/openstack-dashboard/openstack_dashboard/wsgi
[Sun May 14 15:11:35.289143 2023] [wsgi:error] [pid 3313:tid 140181332018944] [client 10.0.0.1:57323] Target WSGI script not found or unable to stat: /usr/share/openstack-dashboard/openstack_dashboard/wsgi
[Sun May 14 15:11:35.463633 2023] [wsgi:error] [pid 3313:tid 140181281662720] [client 10.0.0.1:57323] Target WSGI script not found or unable to stat: /usr/share/openstack-dashboard/openstack_dashboard/wsgi

这是/etc/openstack-dashboard/路径下的local_settings文件的主要配置部分

ALLOWED_HOSTS = ['*', ]
WEBROOT = '/dashboard'
CACHES = {
    'default': {
        'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
        'LOCATION': 'controller:11211',
    },
}

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

EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'

OPENSTACK_HOST = "controller"
OPENSTACK_KEYSTONE_URL = "http://%s:5000/v3" % OPENSTACK_HOST
OPENSTACK_KEYSTONE_DEFAULT_ROLE = "user"
OPENSTACK_KEYSTONE_DEFAULT_DOMAIN = "Default"
OPENSTACK_KEYSTONE_MULTIDOMAIN_SUPPORT = True
OPENSTACK_API_VERSIONS = {
    "identity": 3,
    "image": 2,
    "volume": 3,
}
OPENSTACK_NEUTRON_NETWORK = {
    'enable_router': False,
    'enable_quotas': False,
    'enable_distributed_router': False,
    'enable_ha_router': False,
    'enable_fip_topology_check': False,
}

TIME_ZONE = "Asia/Shanghai"

这是/etc/httpd/conf.d/openstack-dashboard.conf文件的全部配置

WSGIDaemonProcess dashboard
WSGIProcessGroup dashboard
WSGISocketPrefix run/wsgi
#WSGIApplicationGroup %{GLOBAL}
WSGIScriptAlias / /usr/share/openstack-dashboard/openstack_dashboard/wsgi/django.wsgi
Alias /static /usr/share/openstack-dashboard/static

<Directory /usr/share/openstack-dashboard/openstack_dashboard/wsgi>
  Options All
  AllowOverride All
  Require all granted
</Directory>

<Directory /usr/share/openstack-dashboard/static>
  Options All
  AllowOverride All
  Require all granted
</Directory>

有大佬能帮我解决下这个问题吗

...全文
655 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
共由sh 2023-08-01
  • 打赏
  • 举报
回复

这个错误表明Apache正在尝试访问的WSGI脚本无法找到或者无法获取状态。这可能是由于Apache配置文件中指定的文件路径不正确或者文件不存在。
你提供的错误信息中,Apache尝试访问的WSGI脚本路径为:/usr/share/openstack-dashboard/openstack_dashboard/wsgi。
首先,你需要检查一下这个路径下的文件是否存在。你可以通过以下命令进行检查:

ls -l /usr/share/openstack-dashboard/openstack_dashboard/wsgi

如果该文件不存在,你可能需要重新安装或者修复你的OpenStack Dashboard (Horizon)安装。
如果该文件存在,那么可能是Apache配置中的问题。你需要检查你的Apache配置(通常位于 /etc/httpd/conf.d/ 或者 /etc/apache2/sites-available/ 目录下,具体取决于你的操作系统和Apache安装方式),找到对应的WSGIScriptAlias或者WSGIDaemonProcess条目,并确保其路径正确。

m0_63241910 2023-05-15
  • 打赏
  • 举报
回复
有大佬能帮我解决一下这个问题吗

1,011

社区成员

发帖
与我相关
我的任务
社区描述
OpenStack
社区管理员
  • OpenStack社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧