赞
踩
参考链接
报错信息如下:
[root@rabbitmq3 rabbitmq]# rabbitmqctl stop_app Stopping node rabbit@rabbitmq3 ... Error: unable to connect to node rabbit@rabbitmq3: nodedown DIAGNOSTICS =========== attempted to contact: [rabbit@rabbitmq3] rabbit@rabbitmq3: * connected to epmd (port 4369) on rabbitmq3 * 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: rabbitmqctl1704@rabbitmq3 - home dir: /var/lib/rabbitmq - cookie hash: t+Or9UGpg+M4TGJbQMie7w==
解决步骤:
step1 查询mq的进程
ps -ef | grep rabbitmq
step2 杀掉mq进程
ps -ef | grep rabbitmq | grep -v grep | awk ‘{print $2}’ | xargs kill -9
step3 启动mq
rabbitmq-server -detached
step4 在查询mq的状态
rabbitmqctl status
[root@rabbitmq2 rabbitmq]# ps -ef | grep rabbitmq ——查询mq的进程 root 1303 1273 0 01:02 pts/0 00:00:00 ping rabbitmq1 root 1304 1273 0 01:02 pts/0 00:00:00 ping rabbitmq3 rabbitmq 1408 1 1 01:16 ? 00:00:18 /usr/lib64/erlang/erts-5.10.4/bin/beam -W w -K true -A30 -P 1048576 -- -root /usr/lib64/erlang -progname erl -- -home /var/lib/rabbitmq -- -pa /usr/lib/rabbitmq/lib/rabbitmq_server-3.3.5/sbin/../ebin -noshell -noinput -s rabbit boot -sname rabbit@rabbitmq2 -boot start_sasl -config /etc/rabbitmq/rabbitmq -kernel inet_default_connect_options [{nodelay,true}] -sasl errlog_type error -sasl sasl_error_logger false -rabbit error_logger {file,"/var/log/rabbitmq/rabbit@rabbitmq2.log"} -rabbit sasl_error_logger {file,"/var/log/rabbitmq/rabbit@rabbitmq2-sasl.log"} -rabbit enabled_plugins_file "/etc/rabbitmq/enabled_plugins" -rabbit plugins_dir "/usr/lib/rabbitmq/lib/rabbitmq_server-3.3.5/sbin/../plugins" -rabbit plugins_expand_dir "/var/lib/rabbitmq/mnesia/rabbit@rabbitmq2-plugins-expand" -os_mon start_cpu_sup false -os_mon start_disksup false -os_mon start_memsup false -mnesia dir "/var/lib/rabbitmq/mnesia/rabbit@rabbitmq2" -kernel inet_dist_listen_min 25672 -kernel inet_dist_listen_max 25672 rabbitmq 1423 1 0 01:16 ? 00:00:00 /usr/lib64/erlang/erts-5.10.4/bin/epmd -daemon rabbitmq 1480 1408 0 01:16 ? 00:00:00 inet_gethost 4 rabbitmq 1481 1480 0 01:16 ? 00:00:00 inet_gethost 4 root 11655 1273 0 01:45 pts/0 00:00:00 grep --color=auto rabbitmq [root@rabbitmq2 rabbitmq]# ps -ef | grep rabbitmq | grep -v grep | awk '{print $2}' | xargs kill -9 ——杀掉mq进程 [1]- Killed ping rabbitmq1 (wd: ~) (wd now: /var/lib/rabbitmq) [2]+ Killed ping rabbitmq3 (wd: ~) (wd now: /var/lib/rabbitmq) [root@rabbitmq2 rabbitmq]# rabbitmq-server -detached ——启动mq Warning: PID file not written; -detached was passed. [root@rabbitmq2 rabbitmq]# rabbitmqctl status ——查询mq的状态 Status of node rabbit@rabbitmq2 ... [{pid,11738}, {running_applications,[{os_mon,"CPO CXC 138 46","2.2.14"}, {xmerl,"XML parser","1.3.6"}, {mnesia,"MNESIA CXC 138 12","4.11"}, {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,39108744}, {connection_procs,0}, {queue_procs,0}, {plugins,0}, {other_proc,16463696}, {mnesia,55032}, {mgmt_db,0}, {msg_index,0}, {other_ets,720656}, {binary,1090360}, {code,16704494}, {atom,602729}, {other_system,3471777}]}, {alarms,[]}, {listeners,[]}, {vm_memory_high_watermark,0.4}, {vm_memory_limit,771307929}, {disk_free_limit,50000000}, {disk_free,20360318976}, {file_descriptors,[{total_limit,924}, {total_used,0}, {sockets_limit,829}, {sockets_used,0}]}, {processes,[{limit,1048576},{used,86}]}, {run_queue,1}, {uptime,12}] ...done. [root@rabbitmq2 rabbitmq]# rabbitmqctl stop_app Stopping node rabbit@rabbitmq2 ... ...done. [root@rabbitmq2 rabbitmq]# [root@rabbitmq3 ~]# rabbitmqctl stop_app ——执行成功 Stopping node rabbit@rabbitmq3 ... ...done. [root@rabbitmq3 ~]# [root@rabbitmq3 ~]# rabbitmqctl join_cluster --ram rabbit@rabbitmq1 Clustering node rabbit@rabbitmq3 with rabbit@rabbitmq1 ... ...done. [root@rabbitmq3 ~]# rabbitmqctl start_app Starting node rabbit@rabbitmq3 ... ...done. [root@rabbitmq3 ~]#
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。