本文前一部分爲本人解決問題的過程,但最終沒有解決;無奈在網上找方法時,看到有網友評論說:修改controller上的guest帳號密碼,再重啓openstack-nova-compute.service就可正常重啓,結果一試,問題解決,感謝大神。html
1. 在compute節點上開啓服務openstack-nova-compute.service時,沒法啓動,命令一直卡着不動,以下:node
2.查看日誌,在/var/log/nova-compute.log中看到在controller上的5672端口不可達:python
3. 在controller節點上放通防火牆5672端口:shell
[root@controller ~]# firewall-cmd --zone=public --add-port=5672/tcp --permanent //放通5672端口
Warning: ALREADY_ENABLED: 5672:tcp
successpython2.7
[root@controller ~]# systemctl restart firewalld //重啓防火牆
[root@controller ~]# firewall-cmd --zone=public --query-port=5672/tcp //查看5672端口是否放通
yestcp
4. 在compute節點上,重啓libvirtd.service,openstack-nova-compute.service。發現libvirtd.service正常啓動,openstack-nova-compute.service仍然沒法啓動。spa
[root@compute1 ~]# systemctl start libvirtd.service
[root@compute1 ~]# systemctl start openstack-nova-compute.service
Job for openstack-nova-compute.service failed because the control process exited with error code. See "systemctl status openstack-nova-compute.service" and "journalctl -xe" for details.rest
5. 查看journalctl -xe報錯,僅僅只能看到服務啓動失敗,仍然沒有有效信息。日誌
6. 同時,查看compute節點上的nova-compute.log日誌文件,發現身份驗證機制AMQPLAIN拒絕登陸。code
7. 返回到controller節點,覈查rabbitmq服務是否開啓,5672端口是否打開,結果顯示都是正常打開。
[root@controller ~]# ps -ef|grep rabbitmq
rabbitmq 1345 1 0 02:14 ? 00:00:25 /usr/lib64/erlang/erts-7.3.1.2/bin/beam -W w -A 64 -P 1048576 -t 5000000 -stbt db -K true -- -root /usr/lib64/erlang -progname erl -- -home /var/lib/rabbitmq -- -pa /usr/lib/rabbitmq/lib/rabbitmq_server-3.6.5/ebin -noshell -noinput -s rabbit boot -sname rabbit@controller -boot start_sasl -config /etc/rabbitmq/rabbitmq -kernel inet_default_connect_options [{nodelay,true}] -sasl errlog_type error -sasl sasl_error_logger false -rabbit error_logger {file,"/var/log/rabbitmq/rabbit@controller.log"} -rabbit sasl_error_logger {file,"/var/log/rabbitmq/rabbit@controller-sasl.log"} -rabbit enabled_plugins_file "/etc/rabbitmq/enabled_plugins" -rabbit plugins_dir "/usr/lib/rabbitmq/lib/rabbitmq_server-3.6.5/plugins" -rabbit plugins_expand_dir "/var/lib/rabbitmq/mnesia/rabbit@controller-plugins-expand" -os_mon start_cpu_sup false -os_mon start_disksup false -os_mon start_memsup false -mnesia dir "/var/lib/rabbitmq/mnesia/rabbit@controller" -kernel inet_dist_listen_min 25672 -kernel inet_dist_listen_max 25672
rabbitmq 2254 1345 0 02:14 ? 00:00:00 inet_gethost 4
rabbitmq 2255 2254 0 02:14 ? 00:00:00 inet_gethost 4
root 25827 15202 0 10:40 pts/3 00:00:00 grep --color=auto mq
You have mail in /var/spool/mail/root
[root@controller ~]# netstat -na|grep 5672
tcp 0 0 0.0.0.0:25672 0.0.0.0:* LISTEN
tcp6 0 0 :::5672 :::* LISTEN
8. 因而又看了下rabbitmq日誌(/var/log/rabbitmq/rabbit\@controller.log-20190725),結果顯示用戶openstack擁有無效憑證,以下:
9. 心想從新給用戶openstack賦予權限試下:
[root@controller rabbitmq]# rabbitmqctl list_users
Listing users ...
openstack []
guest [administrator]
[root@controller rabbitmq]# rabbitmqctl set_permissions -p / openstack '.*' '.*' '.*'
Setting permissions for user "openstack" in vhost "/" ...
[root@controller rabbitmq]# systemctl restart rabbitmq_server.service
10. 結果仍然提示相同的錯誤,因而在網上查看網友的解決方法,就看到一個網友說本身修改了用戶guest的密碼後,恢復正常;嘗試後故障恢復。
[root@controller rabbitmq]# rabbitmqctl change_password guest shroot123
Changing password for user "guest" ...
[root@controller rabbitmq]# systemctl restart rabbit_server.service //修改完後重啓會有如下報錯,等會再重啓就能夠正常
Failed to restart rabbit_server.service: Unit not found.
[root@controller rabbitmq]# systemctl restart rabbitmq-server.service
[root@controller rabbitmq]# systemctl status rabbitmq-server.service
● rabbitmq-server.service - RabbitMQ broker
Loaded: loaded (/usr/lib/systemd/system/rabbitmq-server.service; enabled; vendor preset: disabl
Active: active (running) since Thu 2019-07-25 11:24:37 CST; 5s ago
Process: 31959 ExecStop=/usr/lib/rabbitmq/bin/rabbitmqctl stop (code=exited, status=0/SUCCESS)
Main PID: 32075 (beam)
Status: "Initialized"
CGroup: /system.slice/rabbitmq-server.service
├─32075 /usr/lib64/erlang/erts-7.3.1.2/bin/beam -W w -A 64 -P 1048576 -t 5000000 -stbt
├─32271 inet_gethost 4
└─32272 inet_gethost 4
Jul 25 11:24:35 controller systemd[1]: Starting RabbitMQ broker...
Jul 25 11:24:36 controller rabbitmq-server[32075]: RabbitMQ 3.6.5. Copyright (C) 2007-2016 Pivotal
Jul 25 11:24:36 controller rabbitmq-server[32075]: ## ## Licensed under the MPL. See http:/
Jul 25 11:24:36 controller rabbitmq-server[32075]: ## ##
Jul 25 11:24:36 controller rabbitmq-server[32075]: ########## Logs: /var/log/rabbitmq/rabbit@cont
Jul 25 11:24:36 controller rabbitmq-server[32075]: ###### ## /var/log/rabbitmq/rabbit@cont
Jul 25 11:24:36 controller rabbitmq-server[32075]: ##########
Jul 25 11:24:36 controller rabbitmq-server[32075]: Starting broker...
Jul 25 11:24:37 controller systemd[1]: Started RabbitMQ broker.
Jul 25 11:24:37 controller rabbitmq-server[32075]: completed with 0 plugins.
再返回compute節點重啓openstack-nova-compute.service,正常。
[root@compute1 ~]# systemctl restart openstack-nova-compute.service
[root@compute1 ~]# systemctl status openstack-nova-compute.service
● openstack-nova-compute.service - OpenStack Nova Compute Server
Loaded: loaded (/usr/lib/systemd/system/openstack-nova-compute.service; enabled; vendor preset: disabled)
Active: active (running) since Thu 2019-07-25 12:18:40 CST; 6s ago
Main PID: 12552 (nova-compute)
Tasks: 22
CGroup: /system.slice/openstack-nova-compute.service
└─12552 /usr/bin/python2 /usr/bin/nova-compute
Jul 25 12:18:34 compute1 systemd[1]: Stopped OpenStack Nova Compute Server.
Jul 25 12:18:34 compute1 systemd[1]: Starting OpenStack Nova Compute Server...
Jul 25 12:18:40 compute1 systemd[1]: Started OpenStack Nova Compute Server.
Jul 25 12:18:40 compute1 nova-compute[12552]: /usr/lib/python2.7/site-packages/oslo_messaging/...
Jul 25 12:18:40 compute1 nova-compute[12552]: access_policy)
Hint: Some lines were ellipsized, use -l to show in full.
雖然問題解決了,但仍然一頭霧水,不明緣由,不過問題解決也挺開心,所以也將本身解決的這個過程分享出來,但願對你們有幫助,也但願有哪位網友分析出緣由,請在評論區回覆,謝謝。
原文出處:https://www.cnblogs.com/hardy46/p/11243540.html