当前位置:   article > 正文

MQ之RabbitMq启动报错,卸载RabbitMq低版本和升级版本号记录_no match for argument: rabbitmq-server.noarch no p

no match for argument: rabbitmq-server.noarch no packages marked for removal

第一个问题

安装的下面RabbitMq版本报错:

wget http://www.rabbitmq.com/releases/rabbitmq-server/v3.6.6/rabbitmq-server-3.6.6-1.el7.noarch.rpm

 

报错日志

  1. [root@localhost ~]# service rabbitmq-server start
  2. Redirecting to /bin/systemctl start rabbitmq-server.service
  3. 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.
  4. [root@localhost ~]# service rabbitmq-server status
  5. Redirecting to /bin/systemctl status rabbitmq-server.service
  6. ● rabbitmq-server.service - RabbitMQ broker
  7. Loaded: loaded (/usr/lib/systemd/system/rabbitmq-server.service; disabled; vendor preset: disabled)
  8. Active: failed (Result: exit-code) since 六 2020-03-28 14:39:44 CST; 53s ago
  9. Process: 50983 ExecStop=/usr/sbin/rabbitmqctl stop (code=exited, status=0/SUCCESS)
  10. Process: 50688 ExecStart=/usr/sbin/rabbitmq-server (code=exited, status=1/FAILURE)
  11. Main PID: 50688 (code=exited, status=1/FAILURE)
  12. 328 14:39:44 localhost.localdomain rabbitmqctl[50983]: * epmd reports: node 'rabbit' not running at all
  13. 328 14:39:44 localhost.localdomain rabbitmqctl[50983]: no other nodes on localhost
  14. 328 14:39:44 localhost.localdomain rabbitmqctl[50983]: * suggestion: start the node
  15. 328 14:39:44 localhost.localdomain rabbitmqctl[50983]: current node details:
  16. 328 14:39:44 localhost.localdomain rabbitmqctl[50983]: - node name: 'rabbitmq-cli-57@localhost'
  17. 328 14:39:44 localhost.localdomain rabbitmqctl[50983]: - home dir: .
  18. 328 14:39:44 localhost.localdomain rabbitmqctl[50983]: - cookie hash: haTxNRJDodrSFUMn450StA==
  19. 328 14:39:44 localhost.localdomain systemd[1]: Failed to start RabbitMQ broker.
  20. 328 14:39:44 localhost.localdomain systemd[1]: Unit rabbitmq-server.service entered failed state.
  21. 328 14:39:44 localhost.localdomain systemd[1]: rabbitmq-server.service failed.
  22. [root@localhost ~]# /bin/systemctl start rabbitmq-server.service
  23. 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.
  24. [root@localhost ~]# journalctl -xe
  25. 328 14:42:09 localhost.localdomain systemd[1]: rabbitmq-server.service failed.
  26. 328 14:44:14 localhost.localdomain dhclient[931]: DHCPREQUEST on ens33 to 192.168.239.254 port 67 (xid=0x3f62f0ca)
  27. 328 14:44:14 localhost.localdomain dhclient[931]: DHCPACK from 192.168.239.254 (xid=0x3f62f0ca)
  28. 328 14:44:14 localhost.localdomain NetworkManager[782]: <info> [1585377854.5903] dhcp4 (ens33): address 192.168.239.129
  29. 328 14:44:14 localhost.localdomain NetworkManager[782]: <info> [1585377854.5903] dhcp4 (ens33): plen 24 (255.255.255.0)
  30. 328 14:44:14 localhost.localdomain NetworkManager[782]: <info> [1585377854.5903] dhcp4 (ens33): gateway 192.168.239.2
  31. 328 14:44:14 localhost.localdomain NetworkManager[782]: <info> [1585377854.5903] dhcp4 (ens33): lease time 1800
  32. 328 14:44:14 localhost.localdomain NetworkManager[782]: <info> [1585377854.5903] dhcp4 (ens33): nameserver '192.168.239.2'
  33. 328 14:44:14 localhost.localdomain NetworkManager[782]: <info> [1585377854.5903] dhcp4 (ens33): domain name 'localdomain'
  34. 328 14:44:14 localhost.localdomain NetworkManager[782]: <info> [1585377854.5903] dhcp4 (ens33): state changed bound -> bound
  35. 328 14:44:14 localhost.localdomain dbus[715]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.
  36. 3月 28 14:44:14 localhost.localdomain systemd[1]: Starting Network Manager Script Dispatcher Service...
  37. -- Subject: Unit NetworkManager-dispatcher.service has begun start-up
  38. -- Defined-By: systemd
  39. -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
  40. --
  41. -- Unit NetworkManager-dispatcher.service has begun starting up.
  42. 3月 28 14:44:14 localhost.localdomain dhclient[931]: bound to 192.168.239.129 -- renewal in 868 seconds.
  43. 3月 28 14:44:14 localhost.localdomain dbus[715]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
  44. 3月 28 14:44:14 localhost.localdomain systemd[1]: Started Network Manager Script Dispatcher Service.
  45. -- Subject: Unit NetworkManager-dispatcher.service has finished start-up
  46. -- Defined-By: systemd
  47. -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
  48. --
  49. -- Unit NetworkManager-dispatcher.service has finished starting up.
  50. --
  51. -- 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

 

显示:

  1. rabbitmq-server.noarch 3.6.6-1.el7 @/rabbitmq-server-3.6.6-1.el7.noarch
  2. librabbitmq.i686 0.8.0-2.el7 base
  3. librabbitmq.x86_64 0.8.0-2.el7 base
  4. librabbitmq-devel.i686 0.8.0-2.el7 base
  5. librabbitmq-devel.x86_64 0.8.0-2.el7 base
  6. librabbitmq-examples.x86_64 0.8.0-2.el7 base
  7. opensips-event_rabbitmq.x86_64 1.10.5-4.el7 epel
  8. rabbitmq-java-client.noarch 3.6.0-1.el7 epel
  9. rabbitmq-java-client-doc.noarch 3.6.0-1.el7 epel
  10. rabbitmq-java-client-javadoc.noarch 3.6.0-1.el7 epel

 

依次执行

  1. yum -y remove rabbitmq-server.noarch
  2. yum -y remove rabbitmq-java-client.noarch
  3. yum -y remove rabbitmq-java-client-doc.noarch
  4. 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 目录下进行修改
 

  1. cd /usr/share/doc/rabbitmq-server-3.7.15/
  2. 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

 

 

第三个问题

访问:

http://192.168.239.129:15672/

 

页面出来了,但是用户只能通过本地主机登录

提示:

User can only log in via localhost

 

原因:rabbitmq从3.3.0开始禁止使用guest/guest权限通过除localhost外的访问

  1. 找到这个文件rabbit.app
  2. cd /usr/lib/rabbitmq/lib/rabbitmq_server-3.7.15/ebin/rabbit.app
  3. 将:{loopback_users, [<<”guest”>>]},
  4. 改为:{loopback_users, []},

 

  1. 将:{loopback_users, [<<”guest”>>]},
  2. 改为:{loopback_users, []},

 

重启服务:

 systemctl restart rabbitmq-server.service

 

终于成功了!!!

 

 

第三部分参考:

https://blog.csdn.net/shenhonglei1234/article/details/82745601

 

 

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

闽ICP备14008679号