错误现象如下:
[root@node ~]# rabbitmqctl status Status of node 'rabbitmq@node1' ... Error: unable to connect to node 'rabbitmq@node1': nodedown DIAGNOSTICS =========== attempted to contact: ['rabbitmq@node1'] rabbitmq@node1: * connected to epmd (port 4369) on node1 * epmd reports: node 'rabbitmq' not running at all no other nodes on node1 * suggestion: start the node current node details: - node name: 'rabbitmq-cli-2723@node1' - home dir: /var/lib/rabbitmq - cookie hash: paC7ovvAFpvPV6YMwt1Qmw==
解决办法:
[root@node1 ~]# ps -ef | grep rabbitmq | grep -v grep | awk '{print $2}' | xargs kill -9 #将mq的进程杀掉 [root@node1 ~]# rabbitmq-server -detached #启动mq
如果是集群需要同时执行以上命令:
[root@node1 ~]# ps -ef | grep rabbitmq | grep -v grep | awk '{print $2}' | xargs kill -9 #将mq的进程杀掉 [root@node2 ~]# ps -ef | grep rabbitmq | grep -v grep | awk '{print $2}' | xargs kill -9 #将mq的进程杀掉 [root@node1 ~]# rabbitmq-server -detached #启动mq [root@node2 ~]# rabbitmq-server -detached #启动mq
查询mq的状态:
[root@node1 ~]# rabbitmqctl status Status of node 'rabbitmq@node1' ... [{pid,3541}, {running_applications, [{rabbitmq_stomp,"Embedded Rabbit Stomp Adapter","3.5.4"}, {rabbitmq_management,"RabbitMQ Management Console","3.5.4"}, {rabbitmq_management_agent,"RabbitMQ Management Agent","3.5.4"}, {rabbit,"RabbitMQ","3.5.4"}, {os_mon,"CPO CXC 138 46","2.2.7"}, {rabbitmq_web_dispatch,"RabbitMQ Web Dispatcher","3.5.4"}, {webmachine,"webmachine","1.10.3-rmq3.5.4-gite9359c7"}, {mochiweb,"MochiMedia Web Server","2.7.0-rmq3.5.4-git680dba8"}, {amqp_client,"RabbitMQ AMQP Client","3.5.4"}, {xmerl,"XML parser","1.2.10"}, {inets,"INETS CXC 138 49","5.7.1"}, {mnesia,"MNESIA CXC 138 12","4.5"}, {sasl,"SASL CXC 138 11","2.1.10"}, {stdlib,"ERTS CXC 138 10","1.17.5"}, {kernel,"ERTS CXC 138 10","2.14.5"}]}, {os,{unix,linux}}, {erlang_version, "Erlang R14B04 (erts-5.8.5) [source] [64-bit] [smp:48:32] [rq:48] [async-threads:64] [kernel-poll:true]\n"}, {memory, [{total,229565920}, {connection_readers,1907416}, {connection_writers,436688}, {connection_channels,986792}, {connection_other,2522808}, {queue_procs,18627568}, {queue_slave_procs,58605376}, {plugins,9414816}, {other_proc,2159864}, {mnesia,7245736}, {mgmt_db,16037984}, {msg_index,1422280}, {other_ets,4345800}, {binary,80049216}, {code,17619160}, {atom,1569041}, {other_system,6615375}]}, {alarms,[]}, {listeners,[{clustering,25672,"::"},{amqp,5672,"::"},{stomp,61613,"::"}]}, {vm_memory_high_watermark,0.4}, {vm_memory_limit,1717986918}, {disk_free_limit,50000000}, {disk_free,16978259968}, {file_descriptors, [{total_limit,924}, {total_used,411}, {sockets_limit,829}, {sockets_used,82}]}, {processes,[{limit,1048576},{used,4282}]}, {run_queue,0}, {uptime,19}]
如果还出现问题: 1、检查/etc/hosts 是否配置node1,
[root@node1 ~]# vim /etc/hosts 127.0.0.1 node1
2、hostname 是否设置
[root@node1 ~]# vim /etc/sysconfig/network HOSTNAME="node1"
或者
[root@node1 ~]# hostname node1 [root@node1 ~]# hostname node1
您可以选择一种方式赞助本站