机房断电导致服务器openstack集群报错

[root@controller controller]# openstack network list
Unable to establish connection to http://controller:9696/v2.0/networks: HTTPConnectionPool(host='controller', port=9696): Max retries exceeded with url: /v2.0/networks (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused',))
[root@controller controller]# openstack server list
Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.
<class 'keystoneauth1.exceptions.connection.ConnectFailure'> (HTTP 500) (Request-ID: req-2c4f4246-d3f3-49fe-8732-7814580f7630)

先是从服务入手排查状态,发现只有neutron-service的服务起不来

[root@controller controller]# systemctl status neutron-server.service 
● neutron-server.service - OpenStack Neutron Server
   Loaded: loaded (/usr/lib/systemd/system/neutron-server.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Fri 2022-11-18 22:27:35 CST; 11min ago
  Process: 12797 ExecStart=/usr/bin/neutron-server --config-file /usr/share/neutron/neutron-dist.conf --config-dir /usr/sha>
 Main PID: 12797 (code=exited, status=1/FAILURE)

Nov 18 22:27:35 controller systemd[1]: neutron-server.service: Service RestartSec=100ms expired, scheduling restart.
Nov 18 22:27:35 controller systemd[1]: neutron-server.service: Scheduled restart job, restart counter is at 40.
Nov 18 22:27:35 controller systemd[1]: Stopped OpenStack Neutron Server.
Nov 18 22:27:35 controller systemd[1]: neutron-server.service: Start request repeated too quickly.
Nov 18 22:27:35 controller systemd[1]: neutron-server.service: Failed with result 'exit-code'.
Nov 18 22:27:35 controller systemd[1]: Failed to start OpenStack Neutron Server.

之后再去排查数据库是否正常
最后检索到问题点为neutron的配置文件/etc/neutron/neutron.conf丢失
重新编写

cat > /etc/neutron/neutron.conf <<EOF
[DEFAULT]
core_plugin = ml2
service_plugins = router
allow_overlapping_ips = true
auth_strategy = keystone
notify_nova_on_port_status_changes = true
notify_nova_on_port_data_changes = true
transport_url = rabbit://openstack:${ALL_PASSWORD}@controller
[cors]
[database]
connection = mysql+pymysql://neutron:${ALL_PASSWORD}@controller/neutron
[keystone_authtoken]
www_authenticate_uri = http://controller:5000
auth_url = http://controller:5000
memcached_servers = controller:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = neutron
password = ${ALL_PASSWORD}
[nova]
auth_url = http://controller:5000
auth_type = password
project_domain_name = default
user_domain_name = default
region_name = RegionOne
project_name = service
username = nova
password = ${ALL_PASSWORD}
[oslo_concurrency]
lock_path = /var/lib/neutron/tmp
[oslo_messaging_amqp]
[oslo_messaging_kafka]
[oslo_messaging_notifications]
[oslo_messaging_rabbit]
[oslo_middleware]
[oslo_policy]
[privsep]
[ssl]
EOF
# 编写neutron.conf文件
[root@controller controller]# systemctl restart neutron-*
# 重启服务,一切正常

机房断电导致服务器openstack集群报错_第1张图片

你可能感兴趣的:(centos8,openstack,centos)