【已解决】Failed to discover available identity versions when contacting http://controller:5000/v3.

当尝试创建OpenStack域时遇到连接错误,可以通过检查35357端口状态,编辑wsgi-keystone.conf配置文件,重启httpd服务来解决。确保配置文件中包含监听35357端口的设置,并正确设置VirtualHost段。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

输入openstack domain create --description “An Example Domain” example命令后出现错误:

Failed to discover available identity versions when contacting
http://controller:5000/v3. Attempting to parse version from URL.
Unable to establish connection to
http://controller:5000/v3/auth/tokens:
HTTPConnectionPool(host=‘controller’, port=5000): Max retries exceeded
with url: /v3/auth/tokens (Caused by
NewConnectionError(’<requests.packages.urllib3.connection.HTTPConnection
object at 0x7f61db3410d0>: Failed to establish a new connection:
[Errno 111] \xe6\x8b\x92\xe7\xbb\x9d\xe8\xbf\x9e\xe6\x8e\xa5’,))

在这里插入图片描述

解决方法:

一、输入如下指令,确保35357端口开启

netstat -anpt | grep 35357

若没反应进行下面操作!

二、设置/etc/httpd/conf.d/wsgi-keystone.conf文件

使用下面指令进入vi编辑器进行编辑:

vim /etc/httpd/conf.d/wsgi-keystone.conf

复制下面内容进入文件,保存退出:

Listen 5000

Listen 35357

<VirtualHost *:5000>

WSGIDaemonProcess keystone-public processes=5 threads=1 user=keystone group=keystone display-name=%{GROUP}

WSGIProcessGroup keystone-public

WSGIScriptAlias / /usr/bin/keystone-wsgi-public

WSGIApplicationGroup %{GLOBAL}

WSGIPassAuthorization On

LimitRequestBody 114688

<IfVersion >= 2.4>

ErrorLogFormat "%{cu}t %M"

</IfVersion>

ErrorLog /var/log/httpd/keystone.log

CustomLog /var/log/httpd/keystone_access.log combined

<Directory /usr/bin>

<IfVersion >= 2.4>

Require all granted

</IfVersion>

<IfVersion < 2.4>

Order allow,deny

Allow from all

</IfVersion>

</Directory>

</VirtualHost>

<VirtualHost *:35357>

WSGIDaemonProcess keystone-admin processes=5 threads=1 user=keystone group=keystone display-name=%{GROUP}

WSGIProcessGroup keystone-admin

WSGIScriptAlias / /usr/bin/keystone-wsgi-admin

WSGIApplicationGroup %{GLOBAL}

WSGIPassAuthorization On

ErrorLogFormat "%{cu}t %M"

ErrorLog /var/log/httpd/keystone-error.log

CustomLog /var/log/httpd/keystone-access.log combined

<Directory /usr/bin>

Require all granted

</Directory>

</VirtualHost>

Alias /identity /usr/bin/keystone-wsgi-public

<Location /identity>

SetHandler wsgi-script

Options +ExecCGI

WSGIProcessGroup keystone-public

WSGIApplicationGroup %{GLOBAL}

WSGIPassAuthorization On

</Location>

注:vi编辑器保存退出方法
在修改完上述内容后,按Esc键,输入 :wq ,然后回车即可保存退出。

三、重启httpd服务

输入下面指令,重启httpd服务:

systemctl restart httpd

四、完结撒花(运行成功)

在这里插入图片描述

评论 17
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

21岁被迫秃头

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值