1.启动RabbitMQ报错

[root@192 bin]# systemctl start rabbitmq-server.service
Job for rabbitmq-server.service failed because the control process exited with error code. See "systemctl status rabbitmq-server.service" and "journalctl -xe" for details.
[root@192 bin]# systemctl status rabbitmq-server.service
● rabbitmq-server.service - RabbitMQ broker
   Loaded: loaded (/usr/lib/systemd/system/rabbitmq-server.service; disabled; vendor preset: disabled)
   Active: activating (auto-restart) (Result: exit-code) since 二 2024-02-20 14:31:55 CST; 2s ago
  Process: 120826 ExecStop=/usr/sbin/rabbitmqctl shutdown (code=exited, status=69)
  Process: 120606 ExecStart=/usr/sbin/rabbitmq-server (code=exited, status=1/FAILURE)
 Main PID: 120606 (code=exited, status=1/FAILURE)

2月 20 14:31:55 192.168.6.137 systemd[1]: Failed to start RabbitMQ broker.
2月 20 14:31:55 192.168.6.137 systemd[1]: Unit rabbitmq-server.service entered failed state.
2月 20 14:31:55 192.168.6.137 systemd[1]: rabbitmq-server.service failed.

2.解决方案

2.1查看自己的ip

在这里插入图片描述

2.2查看主机名称并设置主句名称

[root@192 bin]# hostname
192.168.6.137
[root@192 bin]# hostnamectl set-hostname master
[root@192 bin]# hostname
master
[root@192 bin]# 

2.3在 /etc/hosts 添加一条ip地址与主机名的映射记录

[root@192 etc]# vim /etc/hosts
[root@192 etc]# 

2.4大功告成

在这里插入图片描述

Logo

开放原子开发者工作坊旨在鼓励更多人参与开源活动,与志同道合的开发者们相互交流开发经验、分享开发心得、获取前沿技术趋势。工作坊有多种形式的开发者活动,如meetup、训练营等,主打技术交流,干货满满,真诚地邀请各位开发者共同参与!

更多推荐