赞
踩
安装的下面RabbitMq版本报错:
wget http://www.rabbitmq.com/releases/rabbitmq-server/v3.6.6/rabbitmq-server-3.6.6-1.el7.noarch.rpm
报错日志
- [root@localhost ~]# service rabbitmq-server start
- Redirecting to /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@localhost ~]# service rabbitmq-server status
- Redirecting to /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: failed (Result: exit-code) since 六 2020-03-28 14:39:44 CST; 53s ago
- Process: 50983 ExecStop=/usr/sbin/rabbitmqctl stop (code=exited, status=0/SUCCESS)
- Process: 50688 ExecStart=/usr/sbin/rabbitmq-server (code=exited, status=1/FAILURE)
- Main PID: 50688 (code=exited, status=1/FAILURE)
-
- 3月 28 14:39:44 localhost.localdomain rabbitmqctl[50983]: * epmd reports: node 'rabbit' not running at all
- 3月 28 14:39:44 localhost.localdomain rabbitmqctl[50983]: no other nodes on localhost
- 3月 28 14:39:44 localhost.localdomain rabbitmqctl[50983]: * suggestion: start the node
- 3月 28 14:39:44 localhost.localdomain rabbitmqctl[50983]: current node details:
- 3月 28 14:39:44 localhost.localdomain rabbitmqctl[50983]: - node name: 'rabbitmq-cli-57@localhost'
- 3月 28 14:39:44 localhost.localdomain rabbitmqctl[50983]: - home dir: .
- 3月 28 14:39:44 localhost.localdomain rabbitmqctl[50983]: - cookie hash: haTxNRJDodrSFUMn450StA==
- 3月 28 14:39:44 localhost.localdomain systemd[1]: Failed to start RabbitMQ broker.
- 3月 28 14:39:44 localhost.localdomain systemd[1]: Unit rabbitmq-server.service entered failed state.
- 3月 28 14:39:44 localhost.localdomain systemd[1]: rabbitmq-server.service failed.
- [root@localhost ~]# /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@localhost ~]# journalctl -xe
- 3月 28 14:42:09 localhost.localdomain systemd[1]: rabbitmq-server.service failed.
- 3月 28 14:44:14 localhost.localdomain dhclient[931]: DHCPREQUEST on ens33 to 192.168.239.254 port 67 (xid=0x3f62f0ca)
- 3月 28 14:44:14 localhost.localdomain dhclient[931]: DHCPACK from 192.168.239.254 (xid=0x3f62f0ca)
- 3月 28 14:44:14 localhost.localdomain NetworkManager[782]: <info> [1585377854.5903] dhcp4 (ens33): address 192.168.239.129
- 3月 28 14:44:14 localhost.localdomain NetworkManager[782]: <info> [1585377854.5903] dhcp4 (ens33): plen 24 (255.255.255.0)
- 3月 28 14:44:14 localhost.localdomain NetworkManager[782]: <info> [1585377854.5903] dhcp4 (ens33): gateway 192.168.239.2
- 3月 28 14:44:14 localhost.localdomain NetworkManager[782]: <info> [1585377854.5903] dhcp4 (ens33): lease time 1800
- 3月 28 14:44:14 localhost.localdomain NetworkManager[782]: <info> [1585377854.5903] dhcp4 (ens33): nameserver '192.168.239.2'
- 3月 28 14:44:14 localhost.localdomain NetworkManager[782]: <info> [1585377854.5903] dhcp4 (ens33): domain name 'localdomain'
- 3月 28 14:44:14 localhost.localdomain NetworkManager[782]: <info> [1585377854.5903] dhcp4 (ens33): state changed bound -> bound
- 3月 28 14:44:14 localhost.localdomain dbus[715]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.
- 3月 28 14:44:14 localhost.localdomain systemd[1]: Starting Network Manager Script Dispatcher Service...
- -- Subject: Unit NetworkManager-dispatcher.service has begun start-up
- -- Defined-By: systemd
- -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
- --
- -- Unit NetworkManager-dispatcher.service has begun starting up.
- 3月 28 14:44:14 localhost.localdomain dhclient[931]: bound to 192.168.239.129 -- renewal in 868 seconds.
- 3月 28 14:44:14 localhost.localdomain dbus[715]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
- 3月 28 14:44:14 localhost.localdomain systemd[1]: Started Network Manager Script Dispatcher Service.
- -- Subject: Unit NetworkManager-dispatcher.service has finished start-up
- -- Defined-By: systemd
- -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
- --
- -- Unit NetworkManager-dispatcher.service has finished starting up.
- --
- -- The start-up result is done.
网上找原因,就是说版本低:
如果你安装的是rabbitmq-server-3.6.8-1.el7.noarch.rpm,那么什么都别想了,升级到rabbitmq-server-3.7.14-1.el7.noarch.rpm。
启动后失败
先卸载之前的低版本rabbitmq
第一步是卸载低版本rabbitmq:
yum list | grep rabbitmq
显示:
- rabbitmq-server.noarch 3.6.6-1.el7 @/rabbitmq-server-3.6.6-1.el7.noarch
- librabbitmq.i686 0.8.0-2.el7 base
- librabbitmq.x86_64 0.8.0-2.el7 base
- librabbitmq-devel.i686 0.8.0-2.el7 base
- librabbitmq-devel.x86_64 0.8.0-2.el7 base
- librabbitmq-examples.x86_64 0.8.0-2.el7 base
- opensips-event_rabbitmq.x86_64 1.10.5-4.el7 epel
- rabbitmq-java-client.noarch 3.6.0-1.el7 epel
- rabbitmq-java-client-doc.noarch 3.6.0-1.el7 epel
- rabbitmq-java-client-javadoc.noarch 3.6.0-1.el7 epel
依次执行
- yum -y remove rabbitmq-server.noarch
- yum -y remove rabbitmq-java-client.noarch
- yum -y remove rabbitmq-java-client-doc.noarch
- yum -y remove rabbitmq-java-client-javadoc.noarch
卸载完成
注意:有的文章说要卸载librabbitmq.i686到opensips-event_rabbitmq.x86_64 ,试了一下完全不用。
第二步是重新下载稍微高点的rabbitmq版本和安装:
先下载rpm包:
rabbitmq 发行版本官网链接:
https://www.rabbitmq.com/releases/rabbitmq-server/
git找rabbitmq 发行版本
https://www.rabbitmq.com/changelog.html
我安装 rabbitmq-server-3.7.14-1.el6.noarch.rpm版本
git链接
https://github.com/rabbitmq/rabbitmq-server/releases/tag/v3.7.14
版本链接找好后
开始在Linux上重新安装rabbitmq
执行下载:
wget https://github.com/rabbitmq/rabbitmq-server/releases/download/v3.7.15/rabbitmq-server-3.7.15-1.el7.noarch.rpm
安装:
rpm -ivh rabbitmq-server-3.7.15-1.el7.noarch.rpm
安装完成
启动rabbitmq
service rabbitmq-server start
JPS查看或者直接查看rabbitmq服务状态:
service rabbitmq-server status
上面参考:
https://blog.csdn.net/wyp_810618/article/details/89304209
发现 http://192.168.239.129:15672 还是访问不到,
防火墙端口也释放了。
开始的时候并没有任何配置文件。只好照着官方的介绍,到 /usr/share/doc/rabbitmq-server-3.7.15/ 目录下复制一份模板到 /etc/rabbitmq 目录下进行修改
- cd /usr/share/doc/rabbitmq-server-3.7.15/
- cp rabbitmq.config.example /etc/rabbitmq/rabbitmq.config
这里值得提一下,从3.7.0开始,rabbitmq的配置文件引入了一个新的配置文件 rabbitmq.conf(rabbitmq.conf配置模板),该文件使用 key= value的格式进行配置,使配置文件看起来更加简洁易懂。
当两个配置文件都存在的时候,rabbitmq只会读取旧版的配置文件。
开启管理后台
#启用插件
rabbitmq-plugins enable rabbitmq_management
重新启动
/bin/systemctl start rabbitmq-server.service
终于成功了!
第二部分问题参考:https://blog.csdn.net/yanggenxiang/article/details/90474358
访问:
页面出来了,但是用户只能通过本地主机登录
提示:
User can only log in via localhost
原因:rabbitmq从3.3.0开始禁止使用guest/guest权限通过除localhost外的访问
- 找到这个文件rabbit.app
- cd /usr/lib/rabbitmq/lib/rabbitmq_server-3.7.15/ebin/rabbit.app
-
- 将:{loopback_users, [<<”guest”>>]},
- 改为:{loopback_users, []},
- 将:{loopback_users, [<<”guest”>>]},
- 改为:{loopback_users, []},
重启服务:
systemctl restart rabbitmq-server.service
终于成功了!!!
第三部分参考:
https://blog.csdn.net/shenhonglei1234/article/details/82745601
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。