报错摘要:

rabbitmqctl status
Status of node 'rabbit@VM_0_11_centos' ...
Error: unable to connect to node 'rabbit@VM_0_11_centos': nodedown

DIAGNOSTICS
===========

attempted to contact: ['rabbit@VM_0_11_centos']

rabbit@VM_0_11_centos:
  * connected to epmd (port 4369) on VM_0_11_centos
  * epmd reports node 'rabbit' running on port 25672
  * TCP connection succeeded but Erlang distribution failed
  * suggestion: hostname mismatch?
  * suggestion: is the cookie set correctly?

报错原因是Erlang新版本的cookie位置换了!
解决办法:
把正确的cookie替换到正确的位置
两个cookie的位置如下,但是root下的才是正确的。

[root@VM_0_11_centos ~]# find / -name '.erlang.cookie'
/var/lib/rabbitmq/.erlang.cookie
/root/.erlang.cookie

把正确的cookie替换到正确的位置

[root@VM_0_11_centos ~]# cp /root/.erlang.cookie /var/lib/rabbitmq/.erlang.cookie

查看状态,ok,正常了

[root@VM_0_11_centos bin]# rabbitmqctl status
Status of node rabbit@VM_0_11_centos ...
[{pid,16836},
 {running_applications,
     [{rabbitmq_management,"RabbitMQ Management Console","3.3.5"},
      {rabbitmq_web_dispatch,"RabbitMQ Web Dispatcher","3.3.5"},
      {webmachine,"webmachine","1.10.3-rmq3.3.5-gite9359c7"},
      {mochiweb,"MochiMedia Web Server","2.7.0-rmq3.3.5-git680dba8"},
      {rabbitmq_management_agent,"RabbitMQ Management Agent","3.3.5"},
      {rabbit,"RabbitMQ","3.3.5"},
      {mnesia,"MNESIA  CXC 138 12","4.11"},
      {os_mon,"CPO  CXC 138 46","2.2.14"},
      {inets,"INETS  CXC 138 49","5.9.8"},
      {amqp_client,"RabbitMQ AMQP Client","3.3.5"},
      {xmerl,"XML parser","1.3.6"},
      {sasl,"SASL  CXC 138 11","2.3.4"},
      {stdlib,"ERTS  CXC 138 10","1.19.4"},
      {kernel,"ERTS  CXC 138 10","2.16.4"}]},
 {os,{unix,linux}},
 {erlang_version,
     "Erlang R16B03-1 (erts-5.10.4) [source] [64-bit] [async-threads:30] [hipe] [kernel-poll:true]\n"},
 {memory,
     [{total,46989136},
      {connection_procs,5440},
      {queue_procs,5440},
      {plugins,253144},
      {other_proc,13426608},
      {mnesia,58480},
      {mgmt_db,56536},
      {msg_index,33936},
      {other_ets,1080248},
      {binary,13824},
      {code,19757707},
      {atom,703377},
      {other_system,11594396}]},
 {alarms,[]},
 {listeners,[{clustering,25672,"::"},{amqp,5672,"::"}]},
 {vm_memory_high_watermark,0.4},
 {vm_memory_limit,771176857},
 {disk_free_limit,50000000},
 {disk_free,38262145024},
 {file_descriptors,
     [{total_limit,99901},
      {total_used,3},
      {sockets_limit,89908},
      {sockets_used,1}]},
 {processes,[{limit,1048576},{used,177}]},
 {run_queue,0},
 {uptime,1337}]
...done.
Logo

鸿蒙生态一站式服务平台。

更多推荐