当前位置:   article > 正文

解决openstack-nova-compute.service无法启动问题_job for openstack-nova-compute.service failed beca

job for openstack-nova-compute.service failed because the control process ex

1.启动服务

  1. [root@computer ~]# systemctl restart openstack-nova-compute.service
  2. Job for openstack-nova-compute.service failed because the control process exited with error code.\
  3. See "systemctl status openstack-nova-compute.service" and "journalctl -xe" for details.

2.查看compute节点上的nova-compute.log日志文件,发现身份验证机制AMQPLAIN拒绝登录。

  1. [root@computer ~]# tail /var/log/nova/nova-compute.log
  2. 2020-05-15 16:50:45.750 3180 ERROR nova File "/usr/lib/python2.7/site-packages/amqp/method_framing.py", line 55, in on_frame
  3. 2020-05-15 16:50:45.750 3180 ERROR nova callback(channel, method_sig, buf, None)
  4. 2020-05-15 16:50:45.750 3180 ERROR nova File "/usr/lib/python2.7/site-packages/amqp/connection.py", line 510, in on_inbound_method
  5. 2020-05-15 16:50:45.750 3180 ERROR nova method_sig, payload, content,
  6. 2020-05-15 16:50:45.750 3180 ERROR nova File "/usr/lib/python2.7/site-packages/amqp/abstract_channel.py", line 126, in dispatch_method
  7. 2020-05-15 16:50:45.750 3180 ERROR nova listener(*args)
  8. 2020-05-15 16:50:45.750 3180 ERROR nova File "/usr/lib/python2.7/site-packages/amqp/connection.py", line 639, in _on_close
  9. 2020-05-15 16:50:45.750 3180 ERROR nova (class_id, method_id), ConnectionError)
  10. 2020-05-15 16:50:45.750 3180 ERROR nova AccessRefused: (0, 0): (403) ACCESS_REFUSED - Login was refused using authentication mechanism AMQPLAIN. For details see the broker logfile.
  11. 2020-05-15 16:50:45.750 3180 ERROR nova
  12. [root@computer ~]# tail /var/log/nova/nova-compute.log
  13. 2020-05-15 16:50:45.750 3180 ERROR nova File "/usr/lib/python2.7/site-packages/amqp/method_framing.py", line 55, in on_frame
  14. 2020-05-15 16:50:45.750 3180 ERROR nova callback(channel, method_sig, buf, None)
  15. 2020-05-15 16:50:45.750 3180 ERROR nova File "/usr/lib/python2.7/site-packages/amqp/connection.py", line 510, in on_inbound_method
  16. 2020-05-15 16:50:45.750 3180 ERROR nova method_sig, payload, content,
  17. 2020-05-15 16:50:45.750 3180 ERROR nova File "/usr/lib/python2.7/site-packages/amqp/abstract_channel.py", line 126, in dispatch_method
  18. 2020-05-15 16:50:45.750 3180 ERROR nova listener(*args)
  19. 2020-05-15 16:50:45.750 3180 ERROR nova File "/usr/lib/python2.7/site-packages/amqp/connection.py", line 639, in _on_close
  20. 2020-05-15 16:50:45.750 3180 ERROR nova (class_id, method_id), ConnectionError)
  21. 2020-05-15 16:50:45.750 3180 ERROR nova AccessRefused: (0, 0): (403) ACCESS_REFUSED - Login was refused using authentication mechanism AMQPLAIN. For details see the broker logfile.
  22. 2020-05-15 16:50:45.750 3180 ERROR nova

3.关闭防火墙

  1. [root@controller ~]# systemctl stop firewalld
  2. [root@controller ~]# systemctl disable firewalld

4.在compute节点上,重启libvirtd.service,openstack-nova-compute.service。发现libvirtd.service正常启动,openstack-nova-compute.service仍然无法启动。

  1. [root@computer ~]# systemctl start libvirtd.service
  2. [root@computer ~]# systemctl status libvirtd.service
  3. ● libvirtd.service - Virtualization daemon
  4. Loaded: loaded (/usr/lib/systemd/system/libvirtd.service; enabled; vendor preset: enabled)
  5. Active: active (running) since 五 2020-05-15 17:18:07 CST; 5s ago
  6. Docs: man:libvirtd(8)
  7. https://libvirt.org
  8. Main PID: 10976 (libvirtd)
  9. Tasks: 17 (limit: 32768)
  10. CGroup: /system.slice/libvirtd.service
  11. └─10976 /usr/sbin/libvirtd
  12. 515 17:18:07 computer systemd[1]: Starting Virtualization daemon...
  13. 515 17:18:07 computer systemd[1]: Started Virtualization daemon.
  14. [root@computer ~]# systemctl restart openstack-nova-compute.service
  15. Job for openstack-nova-compute.service failed because the control process exited with error code.\
  16. See "systemctl status openstack-nova-compute.service" and "journalctl -xe" for details.

5.返回到controller节点,核查rabbitmq服务是否开启,5672端口是否打开,结果显示都是正常打开。

  1. [root@controller ~]# ps -ef|grep rabbitmq
  2. rabbitmq 12372 1 1 17:01 ? 00:00:19 /usr/lib64/erlang/erts-8.3.5.3/bin/beam.smp -W w -A 64 -P 1048576 -t 5000000 -stbt db -zdbbl 128000 -K true -- -root /usr/lib64/erlang -progname erl -- -home /var/lib/rabbitmq -- -pa /usr/lib/rabbitmq/lib/rabbitmq_server-3.6.16/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/plugins:/usr/lib/rabbitmq/lib/rabbitmq_server-3.6.16/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
  3. rabbitmq 12583 12372 0 17:01 ? 00:00:00 erl_child_setup 1024
  4. rabbitmq 12605 12583 0 17:01 ? 00:00:00 inet_gethost 4
  5. rabbitmq 12606 12605 0 17:01 ? 00:00:00 inet_gethost 4
  6. root 13718 13360 0 17:21 pts/1 00:00:00 grep --color=auto rabbitmq
  7. [root@controller ~]# netstat -na|grep 5672
  8. tcp 0 0 0.0.0.0:25672 0.0.0.0:* LISTEN
  9. tcp6 0 0 :::5672 :::* LISTEN

6.查看rabbitmq日志(/var/log/rabbitmq/rabbit@controller.log ),结果显示用户openstack拥有无效凭证,如下:

  1. =ERROR REPORT==== 15-May-2020::16:59:17 ===
  2. Error on AMQP connection <0.17344.0> (10.0.0.20:52414 -> 10.0.0.20:5672, state: starting):
  3. AMQPLAIN login refused: user 'openstack' - invalid credentials

解决

  1. [root@controller rabbitmq]# rabbitmqctl list_users
  2. Listing users
  3. openstack []
  4. guest [administrator]
  5. [root@controller rabbitmq]# rabbitmqctl -q delete_user openstack
  6. [root@controller rabbitmq]# rabbitmqctl list_users
  7. Listing users
  8. guest [administrator]
  9. [root@controller ~]# rabbitmqctl add_user openstack Com.123
  10. [root@controller rabbitmq]# rabbitmqctl set_permissions -p / openstack '.*' '.*' '.*'
  11. Setting permissions for user "openstack" in vhost "/" ...
  12. [root@controller ~]# rabbitmqctl list_users
  13. Listing users
  14. openstack []
  15. [root@controller rabbitmq]# systemctl restart rabbitmq-server.service
  16. [root@controller rabbitmq]# cat rabbit@controller.log
  17. =INFO REPORT==== 15-May-2020::17:01:28 ===
  18. accepting AMQP connection <0.436.0> (10.0.0.20:52722 -> 10.0.0.20:5672)
  19. =INFO REPORT==== 15-May-2020::17:01:28 ===
  20. Connection <0.436.0> (10.0.0.20:52722 -> 10.0.0.20:5672) has a client-provided name: nova-scheduler:11913:87613471-ab6b-470a-a964-d7f530c8bf32
  21. =INFO REPORT==== 15-May-2020::17:01:28 ===
  22. connection <0.436.0> (10.0.0.20:52722 -> 10.0.0.20:5672 - nova-scheduler:11913:87613471-ab6b-470a-a964-d7f530c8bf32): user 'openstack' authenticated and granted access to vhost '/'

启动服务测试

[root@computer ~]# systemctl restart openstack-nova-compute.service

 转载地址:Openstack部署compute计算节点时,openstack-nova-compute无法启动 - 知乎 (zhihu.com)

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小丑西瓜9/article/detail/342986
推荐阅读
相关标签
  

闽ICP备14008679号