RabbitMQ节点

时间:2016-11-30 12:52:57

标签: erlang rabbitmq

我在设置的RabbitMQ 3.6.5群集中遇到了一些奇怪的行为。

我有4个节点,每个节点都经历过多个网络分区。从阅读文档中我可以看到,只要两个节点之间的连接丢失,就会触发网络分区,同时它们都会继续运行。我想这发生了,因为机器每30分钟试图睡一觉。我还没有接受测试。

我目前的问题是有些节点拒绝停止。

  • rabbitmqctl stoprabbitmqctl reset上cmd冻结/挂起无限期,直到我取消批处理命令。
  • on rabbitmqctl start_app我收到了erlang错误error:stop。我还没弄清楚这意味着什么。
  • on rabbitmq-plugin enable rabbitmq_management我收到了erlang错误error:noproc,这似乎是因为我无法停止节点,因此没有实际的进程运行。

当我运行rabbitmqctl status时,我得到以下输出:

 C:\Program Files\RabbitMQ Server\rabbitmq_server-3.6.5\sbin>rabbitmqctl status
Status of node 'rabbit@nc-mso-test04' ...
[{pid,8416},
 {running_applications,[{compiler,"ERTS  CXC 138 10","7.0.2"},
                        {os_mon,"CPO  CXC 138 46","2.4.1"},
                        {amqp_client,"RabbitMQ AMQP Client","3.6.5"},
                        {inets,"INETS  CXC 138 49","6.3.3"},
                        {syntax_tools,"Syntax tools","2.1"},
                        {asn1,"The Erlang ASN1 compiler version 4.0.4",
                              "4.0.4"},
                        {rabbit_common,[],"3.6.5"},
                        {mnesia,"MNESIA  CXC 138 12","4.14.1"},
                        {xmerl,"XML parser","1.3.12"},
                        {ranch,"Socket acceptor pool for TCP protocols.",
                               "1.2.1"},
                        {sasl,"SASL  CXC 138 11","3.0.1"},
                        {stdlib,"ERTS  CXC 138 10","3.1"},
                        {kernel,"ERTS  CXC 138 10","5.1"}]},
 {os,{win32,nt}},
 {erlang_version,"Erlang/OTP 19 [erts-8.1] [64-bit] [smp:4:4] [async-threads:64]\n"},
 {memory,[{total,63018240},
          {connection_readers,0},
          {connection_writers,0},
          {connection_channels,0},
          {connection_other,2736},
          {queue_procs,0},
          {queue_slave_procs,0},
          {plugins,0},
          {other_proc,25970040},
          {mnesia,72168},
          {mgmt_db,0},
          {msg_index,0},
          {other_ets,1522608},
          {binary,92080},
          {code,24836283},
          {atom,1033401},
          {other_system,9488924}]},
 {alarms,[]},
 {listeners,[]},
 {vm_memory_high_watermark,0.4},
 {vm_memory_limit,3401855795},
 {disk_free_limit,50000000},
 {disk_free,281661607936},
 {file_descriptors,[{total_limit,8092},
                    {total_used,0},
                    {sockets_limit,7280},
                    {sockets_used,0}]},
 {processes,[{limit,1048576},{used,107}]},
 {run_queue,0},
 {uptime,771157},
 {kernel,{net_ticktime,60}}]

当我做rabbitmqctl cluster_status时,我得到了:

C:\Program Files\RabbitMQ Server\rabbitmq_server-3.6.5\sbin>rabbitmqctl cluster_status
Cluster status of node 'rabbit@nc-mso-test04' ...
[{nodes,[{disc,['rabbit@iol-laptop','rabbit@nc-mso-test01',
                'rabbit@nc-mso-test02','rabbit@nc-mso-test03',
                'rabbit@nc-mso-test04']}]},
 {running_nodes,['rabbit@nc-mso-test01','rabbit@nc-mso-test04']},
 {cluster_name,<<"rabbit@nc-mso-test04.novicell.dk">>},
 {partitions,[]},
 {alarms,[{'rabbit@nc-mso-test01',[]},{'rabbit@nc-mso-test04',[]}]}]

我试图强制停止该过程,删除了Mnesia数据库,但没有帮助。

有什么建议吗?

1 个答案:

答案 0 :(得分:0)

在玩了rabbitmq群集之后,我遇到了同样的情况,以下步骤帮助了我:

  • 停止rabbitmq-service
  • 从文件系统中物理删除卡住节点的文件(在Windows上的当前用户文件夹中 - %HOMEDRIVE%\%HOMEPATH%\程序数据\漫游\的RabbitMQ)
  • 运行rabbitmq-service
  • 安装必要的插件并重新配置节点(用户,虚拟主机等)
  • 运行rabbitmqctl start_app