rabbitMq部署
https://blog.csdn.net/yi_qingjun/article/details/128259285
https://blog.csdn.net/yi_qingjun/article/details/128390877
一机-伪集群
报错
https://www.bilibili.com/read/cv4167462/
{"init terminating in do_boot",{error,{rabbitmq_mqtt,{{shutdown,{failed_to_start_child,'rabbit_mqtt_listener_sup_:::1883',{shutdown,{failed_to_start_child,{ranch_embedded_sup,{acceptor,{0,0,0,0,0,0,0,0},1883}},{shutdown,{failed_to_start_child,{ranch_listener_sup,{acceptor,{0,0,0,0,0,0,0,0},1883}},{shutdown,{failed_to_start_child,ranch_acceptors_sup,{listen_error,{acceptor,{0,0,0,0,0,0,0,0},1883},eaddrinuse}}}}}}}}},{rabbit_mqtt,start,[normal,[]]}}}}}
init terminating in do_boot ({error,{rabbitmq_mqtt,{{shutdown,{_}},{rabbit_mqtt,start,[_]}}}})
Crash dump is being written to: /usr/local/rabbitmq/var/log/rabbitmq/erl_crash.dump...done
RABBITMQ_NODE_PORT=5672 RABBITMQ_DIST_PORT=25672 RABBITMQ_SERVER_START_ARGS="-rabbitmq_management listener [{port,15672}] -rabbitmq_mqtt tcp_listeners [1883]" RABBITMQ_NODENAME=rabbitmq_1 rabbitmq-server start
RABBITMQ_NODE_PORT=5673 RABBITMQ_DIST_PORT=25673 RABBITMQ_SERVER_START_ARGS="-rabbitmq_management listener [{port,15673}] -rabbitmq_mqtt tcp_listeners [1884]" RABBITMQ_NODENAME=rabbitmq_2 rabbitmq-server start
RABBITMQ_NODE_PORT=5674 RABBITMQ_DIST_PORT=25674 RABBITMQ_SERVER_START_ARGS="-rabbitmq_management listener [{port,15674}] -rabbitmq_mqtt tcp_listeners [1885]" RABBITMQ_NODENAME=rabbitmq_3 rabbitmq-server start
#停止rabbitmq_1节点应用服务。
[root@node1 ~]# rabbitmqctl -n rabbitmq_1 stop_app
#将rabbitmq_1重置还原到最初状态,包括从原来所在的集群中删除此节点,从管理数据库中删除所有的配置数据、配置的用户、vhost 等,以及删除所有的持久化消息。
[root@node1 ~]# rabbitmqctl -n rabbitmq_1 reset
#启动rabbitmq_1节点应用服务。
[root@node1 ~]# rabbitmqctl -n rabbitmq_1 start_app
-------------------------------------------
#停止rabbitmq_2节点应用服务。
[root@node1 ~]# rabbitmqctl -n rabbitmq_2 stop_app
#将rabbitmq_2节点加入到主节点(rabbitmq_1),“node1”为服务器主机名。
[root@node1 ~]# rabbitmqctl -n rabbitmq_2 join_cluster rabbitmq_1@node1
#启动rabbitmq_2节点应用服务。
[root@node1 ~]# rabbitmqctl -n rabbitmq_2 start_app
#停止rabbitmq_3节点应用服务。
[root@node1 ~]# rabbitmqctl -n rabbitmq_3 stop_app
#将rabbitmq_3节点加入到主节点(rabbitmq_1),“node1”为服务器主机名。
[root@node1 ~]# rabbitmqctl -n rabbitmq_3 join_cluster rabbitmq_1@node1
#启动rabbitmq_3节点应用服务。
[root@node1 ~]# rabbitmqctl -n rabbitmq_3 start_app
-------------------------------------------------------------------
https://blog.csdn.net/zhongbeida_xue/article/details/117447892
rabbitmq-plugins enable rabbitmq_management
rabbitmqctl -n rabbitmq_1 add_user admin admin
rabbitmqctl -n rabbitmq_1 set_user_tags admin administrator
rabbitmqctl -n rabbitmq_1 set_permissions -p / admin ".*" ".*" ".*"
rabbitmqctl -n rabbitmq_2 add_user admin admin
rabbitmqctl -n rabbitmq_2 set_user_tags admin administrator
rabbitmqctl -n rabbitmq_2 set_permissions -p / admin ".*" ".*" ".*"
rabbitmqctl -n rabbitmq_3 add_user admin admin
rabbitmqctl -n rabbitmq_3 set_user_tags admin administrator
rabbitmqctl -n rabbitmq_3 set_permissions -p / admin ".*" ".*" ".*"
导入配置
导入配置后,登录失效
修改密码
rabbitmqctl -n rabbitmq_1 change_password admin 'myadmin'
参考 https://blog.csdn.net/yi_qingjun/article/details/128390877