标签:没有 head 计算 type emctl 根据 Opens 并且 错误日志
在创建实例时,实例状态显示“错误”
故障代码为500,提示为No valid host was found
需要更多的日志信息来定位具体的问题
/var/log/nova/nova-compute.log日志:
Failed to contact the endpoint at http://controller:8778 for discovery.
8778是placement服务的端口。
/var/log/placement/placement-api.log出现如下错误日志:
AH01630: client denied by server configuration: /usr/bin/placement-api
/var/log/nova/nova-conductor.log出现如下错误日志:
Got 403: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>403 Forbidden</title> </head><body> <h1>Forbidden</h1> <p>You don‘t have permission to access /allocation_candidates on this server.</p> </body></html>
/var/log/nova/nova-conductor.log出现如下错误日志:
NoValidHost: No valid host was found.
: NoValidHost_Remote: No valid host was found.
根据多个服务的日志信息,可以看出问题出在placement服务,并且是目录权限问题。
placement服务是基于http服务,使用了wsgi插件,于是检查placement的wsgi配置文件/etc/httpd/conf.d/00-placement-api.conf,经过和其他服务的配置文件比较,发现没有对目录进行授权。
环境说明:centos 7.6,apache版本2.4
编辑placement的配置文件:/etc/httpd/conf.d/00-placement-api.conf
<VirtualHost *:8778> #在该节点增加以下部分,对目录授权 <Directory /usr/bin> <IfVersion >= 2.4> Require all granted </IfVersion> <IfVersion < 2.4> Order allow,deny Allow from all </IfVersion> </Directory> </VirtualHost>
重启httpd服务:
# systemctl restart httpd
在控制节点中运行以下命令检查服务状态:
# curl http://controller:8778/
返回如下结果:
{"versions": [{"status": "CURRENT", "min_version": "1.0", "max_version": "1.36", "id": "v1.0", "links": [{"href": "", "rel": "self"}]}]}
openstack错误-创建实例失败-No valid host was found
标签:没有 head 计算 type emctl 根据 Opens 并且 错误日志
原文地址:https://www.cnblogs.com/learn2teach/p/12455149.html