rabbitmq吧 关注:133贴子:342
  • 2回复贴,共1

rabbitmq在集群里加入节点

只看楼主收藏回复

定义,10.109.226.145为disc磁盘节点,10.109.226.147为ram内存节点。
首先,配置必要的插件
在145/147上分别执行
[root@localhost sbin]# ./rabbitmq-plugins enable rabbitmq_management --控制台
[root@localhost sbin]# ./rabbitmq-plugins enable rabbitmq_stomp --话务控件所需
其次,将145/147的rabbitmq都启动起来
在disc主机上
[root@localhost sbin]# cdmq
[root@localhost sbin]# ./rabbitmq-server &
然后在ram主机上
[root@localhost sbin]# cdmq
[root@localhost sbin]# ./rabbitmq-server &
然后将147作为内存节点加入145组成集群
[root@localhost sbin]# ./rabbitmqctl stop_app
[root@localhost sbin]# ./rabbitmqctl reset
[root@localhost sbin]# ./rabbitmqctl join_cluster --ram rabbit@server145
[root@localhost sbin]# ./rabbitmqctl start_app
[root@localhost sbin]#
这样集群就配置好了。


IP属地:四川1楼2014-01-19 11:38回复
    Error: unable to connect to nodes [rabbit@test1]: nodedown
    DIAGNOSTICS
    ===========
    attempted to contact: [rabbit@test1]
    rabbit@test1:
    * connected to epmd (port 4369) on test1
    * epmd reports node 'rabbit' running on port 25672
    * TCP connection succeeded but Erlang distribution failed
    * suggestion: hostname mismatch?
    * suggestion: is the cookie set correctly?
    current node details:
    - node name: 'rabbitmq-cli-3701@test2'
    - home dir: /var/lib/rabbitmq
    - cookie hash: 3oJVWHNk6dPKcraUJW3xcA==


    2楼2016-04-24 16:35
    回复
      2025-07-21 10:02:18
      广告
      如何删除集群里的节点呢?


      IP属地:浙江3楼2016-05-19 22:14
      回复