【问题标题】:RabbitMQ on WindowsServer 2012 R2 crashes on startWindows Server 2012 R2 上的 RabbitMQ 在启动时崩溃
【发布时间】:2015-04-28 18:36:23
【问题描述】:

我正在尝试在 Windows Server 2012 R2 机器上运行 RabbitMQ,但它一直在崩溃。这是我在运行“rabbitmqctl status”时看到的:

C:\Program Files (x86)\RabbitMQ Server\rabbitmq_server-3.5.1\sbin>rabbitmqctl status
Status of node 'rabbit@MYMACHINENAME' ...
Error: unable to connect to node 'rabbit@MYMACHINENAME': nodedown

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

attempted to contact: ['rabbit@MYMACHINENAME']

rabbit@MYMACHINENAME:
  * unable to connect to epmd (port 4369) on MYMACHINENAME: address (cannot connect to host/port)


current node details:
- node name: 'rabbitmq-cli-6880@MYMACHINENAME'
- home dir: C:\Users\myname
- cookie hash: L9D52tPzwbCgggPY6qPS3g==


C:\Program Files (x86)\RabbitMQ Server\rabbitmq_server-3.5.1\sbin>

这是我在日志中看到的(经过一长串明显成功的“进度报告”条目之后):

=CRASH REPORT==== 22-Apr-2015::11:57:24 ===
  crasher:
    initial call: rabbit_epmd_monitor:init/1
    pid: <0.165.0>
    registered_name: []
    exception exit: {{badmatch,noport},
                     [{rabbit_epmd_monitor,init,1,[]},
                      {gen_server,init_it,6,
                                  [{file,"gen_server.erl"},{line,306}]},
                      {proc_lib,init_p_do_apply,3,
                                [{file,"proc_lib.erl"},{line,237}]}]}
      in function  gen_server:init_it/6 (gen_server.erl, line 330)
    ancestors: [rabbit_epmd_monitor_sup,rabbit_sup,<0.140.0>]
    messages: []
    links: [<0.164.0>]
    dictionary: []
    trap_exit: false
    status: running
    heap_size: 376
    stack_size: 27
    reductions: 463
  neighbours:

=SUPERVISOR REPORT==== 22-Apr-2015::11:57:24 ===
     Supervisor: {local,rabbit_epmd_monitor_sup}
     Context:    start_error
     Reason:     {{badmatch,noport},
                  [{rabbit_epmd_monitor,init,1,[]},
                   {gen_server,init_it,6,[{file,"gen_server.erl"},{line,306}]},
                   {proc_lib,init_p_do_apply,3,
                             [{file,"proc_lib.erl"},{line,237}]}]}
     Offender:   [{pid,undefined},
                  {name,rabbit_epmd_monitor},
                  {mfargs,{rabbit_epmd_monitor,start_link,[]}},
                  {restart_type,transient},
                  {shutdown,4294967295},
                  {child_type,worker}]


=CRASH REPORT==== 22-Apr-2015::11:57:24 ===
  crasher:
    initial call: application_master:init/4
    pid: <0.139.0>
    registered_name: []
    exception exit: {bad_return,
                     {{rabbit,start,[normal,[]]},
                      {'EXIT',
                       {error,
                        {{shutdown,
                          {failed_to_start_child,rabbit_epmd_monitor,
                           {{badmatch,noport},
                            [{rabbit_epmd_monitor,init,1,[]},
                             {gen_server,init_it,6,
                              [{file,"gen_server.erl"},{line,306}]},
                             {proc_lib,init_p_do_apply,3,
                              [{file,"proc_lib.erl"},{line,237}]}]}}},
                         {child,undefined,rabbit_epmd_monitor_sup,
                          {rabbit_restartable_sup,start_link,
                           [rabbit_epmd_monitor_sup,
                            {rabbit_epmd_monitor,start_link,[]},
                            false]},
                          transient,infinity,supervisor,
                          [rabbit_restartable_sup]}}}}}}
      in function  application_master:init/4 (application_master.erl, line 133)
    ancestors: [<0.138.0>]
    messages: [{'EXIT',<0.140.0>,normal}]
    links: [<0.138.0>,<0.7.0>]
    dictionary: []
    trap_exit: true
    status: running
    heap_size: 1598
    stack_size: 27
    reductions: 212
  neighbours:

我在 Windows 防火墙中启用了端口 4369,并且此端口似乎正在“侦听”:

netstat -an

Proto  Local Address          Foreign Address        State           PID
TCP    0.0.0.0:4369           0.0.0.0:0              LISTENING       6496

进程 6469:

C:\Program Files (x86)\RabbitMQ Server\rabbitmq_server-3.5.1\sbin>tasklist /svc /FI "PID eq 6496"

Image Name                     PID Services
========================= ======== ============================================
epmd.exe                      6496 N/A

我可以追求的其他途径/配置/故障排除的任何想法?

【问题讨论】:

    标签: windows rabbitmq


    【解决方案1】:

    这最终似乎是由于我连接到了 VPN。不在 VPN 上时,我可以查看管理控制台、命令行查看状态等。

    【讨论】:

      【解决方案2】:

      错误 {badmatch,noport} 表明 RabbitMQ 可能无法访问 EPMD 的端口。

      如果您仍想通过 RabbitMQ 使用 VPN,请确保打开 RabbitMQ 所需的端口。

      查看What ports does RabbitMQ use? 并在此处阅读inet_dist_listen_{min,max}:http://www.rabbitmq.com/configure.html

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2018-01-25
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多