当前位置:   article > 正文

【Rabbitmq报错及解决办法】Error: unable to connect to node rabbit@rabbitmq3: nodedown_node: unable to connect to node, try setting highe

node: unable to connect to node, try setting higher timeout in --request-tim

参考链接
报错信息如下:

[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==
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20

解决步骤:
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 ~]# 
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/不正经/article/detail/559734
推荐阅读
相关标签
  

闽ICP备14008679号