rabbitmq启动失败 Error: unable to perform an operation on node 'rabbit@localhost'.

新安装的rabbitmq启动失败,查看状态,如下提示:

[root@localhost ~]# rabbitmqctl status
Status of node rabbit@localhost ...
Error: unable to perform an operation on node 'rabbit@localhost'. Please see diagnostics information and suggestions below.

Most common reasons for this are:

 * Target node is unreachable (e.g. due to hostname resolution, TCP connection or firewall issues)
 * CLI tool fails to authenticate with the server (e.g. due to CLI tool's Erlang cookie not matching that of the server)
 * Target node is not running

In addition to the diagnostics info below:

 * See the CLI, clustering and networking guides on http://rabbitmq.com/documentation.html to learn more
 * Consult server logs on node rabbit@localhost

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

attempted to contact: [rabbit@localhost]

rabbit@localhost:
  * connected to epmd (port 4369) on localhost
  * epmd reports: node 'rabbit' not running at all
                  no other nodes on localhost
  * suggestion: start the node

Current node details:
 * node name: 'rabbitmqcli-3969-rabbit@localhost'
 * effective user's home directory: /var/lib/rabbitmq
 * Erlang cookie hash: 8d5k0JKKV+xMlxN+LtpGjg==

查看日志:/var/log/rabbitmq/log/crash.log

2019-01-25 23:19:00 =ERROR REPORT====
Failed to start Ranch listener {acceptor,{0,0,0,0,0,0,0,0},5672} in ranch_tcp:listen([{cacerts,'...'},{key,'...'},{cert,'...'},{port,5672},{ip,{0,0,0,0,0,0,0,0}},inet6,{backlog,128},{nodelay,true},{linger,{true,0}},{exit_on_close,false}]) for reason eaddrinuse (address already in use)
2019-01-25 23:19:00 =CRASH REPORT====
  crasher:
    initial call: supervisor:ranch_acceptors_sup/1
    pid: <0.350.0>
    registered_name: []
    exception exit: {{listen_error,{acceptor,{0,0,0,0,0,0,0,0},5672},eaddrinuse},[{ranch_acceptors_sup,listen_error,5,[{file,"src/ranch_acceptors_sup.erl"},{line,66}]},{ranch_acceptors_sup,init,1,[{file,"src/ranch_acceptors_sup.erl"},{line,44}]},{supervisor,init,1,[{file,"supervisor.erl"},{line,295}]},{gen_server,init_it,2,[{file,"gen_server.erl"},{line,374}]},{gen_server,init_it,6,[{file,"gen_server.erl"},{line,342}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,249}]}]}
    ancestors: [<0.348.0>,<0.347.0>,rabbit_sup,<0.256.0>]
    message_queue_len: 0
    messages: []
    links: [<0.348.0>]
    dictionary: [{logger,error_logger}]
    trap_exit: true
    status: running
    heap_size: 610
    stack_size: 27
    reductions: 1618
  neighbours:
2019-01-25 23:19:00 =SUPERVISOR REPORT====
     Supervisor: {<0.348.0>,ranch_listener_sup}
     Context:    start_error
     Reason:     {listen_error,{acceptor,{0,0,0,0,0,0,0,0},5672},eaddrinuse}
     Offender:   [{pid,undefined},{id,ranch_acceptors_sup},{mfargs,{ranch_acceptors_sup,start_link,[{acceptor,{0,0,0,0,0,0,0,0},5672},ranch_tcp]}},{restart_type,permanent},{shutdown,infinity},{child_type,supervisor}]

监听的5672端口被占用,百度参考文章:https://yq.aliyun.com/ziliao/490972
原来是我本机开了ActiveMQ,关闭之后再次启动RabbitMQ,成功!

[root@localhost log]# rabbitmq-server start

  ##  ##
  ##  ##      RabbitMQ 3.7.10. Copyright (C) 2007-2018 Pivotal Software, Inc.
  ##########  Licensed under the MPL.  See http://www.rabbitmq.com/
  ######  ##
  ##########  Logs: /var/log/rabbitmq/rabbit@localhost.log
                    /var/log/rabbitmq/rabbit@localhost_upgrade.log

              Starting broker...
 completed with 3 plugins.

查看状态:

[root@localhost ~]# rabbitmqctl status
Status of node rabbit@localhost ...
[{pid,5828},
 {running_applications,
     [{rabbitmq_management,"RabbitMQ Management Console","3.7.10"},
      {rabbitmq_management_agent,"RabbitMQ Management Agent","3.7.10"},
      {rabbitmq_web_dispatch,"RabbitMQ Web Dispatcher","3.7.10"},
      {rabbit,"RabbitMQ","3.7.10"},
      {os_mon,"CPO  CXC 138 46","2.4.7"},
      {amqp_client,"RabbitMQ AMQP Client","3.7.10"},
      {rabbit_common,
          "Modules shared by rabbitmq-server and rabbitmq-erlang-client",
          "3.7.10"},
      {cowboy,"Small, fast, modern HTTP server.","2.6.1"},
      {ranch,"Socket acceptor pool for TCP protocols.","1.7.1"},
      {ssl,"Erlang/OTP SSL application","9.1.2"},
      {public_key,"Public key infrastructure","1.6.4"},
      {asn1,"The Erlang ASN1 compiler version 5.0.8","5.0.8"},
      {inets,"INETS  CXC 138 49","7.0.4"},
      {recon,"Diagnostic tools for production use","2.3.6"},
      {mnesia,"MNESIA  CXC 138 12","4.15.5"},
      {jsx,"a streaming, evented json parsing toolkit","2.9.0"},
      {cowlib,"Support library for manipulating Web protocols.","2.7.0"},
      {crypto,"CRYPTO","4.4"},
      {xmerl,"XML parser","1.3.19"},
      {lager,"Erlang logging framework","3.6.5"},
      {goldrush,"Erlang event stream processor","0.1.9"},
      {compiler,"ERTS  CXC 138 10","7.3.1"},
      {syntax_tools,"Syntax tools","2.1.6"},
      {sasl,"SASL  CXC 138 11","3.3"},
      {stdlib,"ERTS  CXC 138 10","3.7"},
      {kernel,"ERTS  CXC 138 10","6.2"}]},
 {os,{unix,linux}},
 {erlang_version,
     "Erlang/OTP 21 [erts-10.2.3] [source] [64-bit] [smp:1:1] [ds:1:1:10] [async-threads:64] [hipe]\n"},
 {memory,
     [{connection_readers,0},
      {connection_writers,0},
      {connection_channels,0},
      {connection_other,2820},
      {queue_procs,0},
      {queue_slave_procs,0},
      {plugins,835316},
      {other_proc,25064708},
      {metrics,205316},
      {mgmt_db,153240},
      {mnesia,72864},
      {other_ets,2749152},
      {binary,158536},
      {msg_index,28912},
      {code,23353730},
      {atom,1172689},
      {other_system,9888797},
      {allocated_unused,8186432},
      {reserved_unallocated,1372160},
      {strategy,rss},
      {total,[{erlang,63686080},{rss,73244672},{allocated,71872512}]}]},
 {alarms,[]},
 {listeners,[{clustering,25672,"::"},{amqp,5672,"::"},{http,15672,"::"}]},
 {vm_memory_calculation_strategy,rss},
 {vm_memory_high_watermark,0.4},
 {vm_memory_limit,416348569},
 {disk_free_limit,50000000},
 {disk_free,24810864640},
 {file_descriptors,
     [{total_limit,924},{total_used,2},{sockets_limit,829},{sockets_used,0}]},
 {processes,[{limit,1048576},{used,373}]},
 {run_queue,1},
 {uptime,52},
 {kernel,{net_ticktime,60}}]
  • 2
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值