rabbitmq node join cluster
According to this instruction
- 需求:A是集群主节点,B的是新节点或者挂掉的节点,需要加进去
- 在B节点准备凭据
- 进入/var/lib/rabbitmq,设置chmod 777 .erlang.cookie
- 拷贝A的/var/lib/rabbitmq/.erlang.cookie的内容过来(可以有换行)
- mq需要cookie是只读,所以再次chmod 400 .erlang.cookie
- 清理进程:执行netstat -alptno,看有无mq端口,有的统统干掉,包括
- 5672,服务端口
- 4369,管理端口
- 15672,erlang端口
- 启动并加入集群
- service rabbitmq-server start -detached
- rabbitmqctl stop_app
- rabbitmqctl join_cluster rabbit@A的主机名,也可以从A机器的/var/log/rabbitmq/rabbit@xxx.log里看=INFO REPORT,里面有node
- rabbitmqctl start_app
- rabbitmqctl cluster_status
sort of, I have some experience in the domain of database(MySQL/mongo), java, python, front-end, etc. I'll willing to give and accept bits of help from others.
now base in Singapore.