服务器初始化RabbitMQ失败

时间:2014-05-03 16:22:57

标签: erlang rabbitmq

我试图在我的电脑上运行rabbitmq(3.3.1)服务器(win 7 professional),我使用的是erlang 6.0(OTP 17.0)。服务器拒绝开始提供这样的输出(控制台):

    {"init terminating in do_boot",
    {badarg,[{io,format,[<0.29.0>,"~n~nBOOT FAILED~n===========~n~n
    Error description:~n   ~p~n~n
    Log files (may contain more information):~n   ~s~n   ~s~n~n",
    [{could_not_start,rabbit,badarg},
    [67,58,47,85,115,101,114,115,47,80,105,111,116,114,32,82,97,99,104,119,97,322,47,65,112,112,68,97,116,97,47,82,111,97,109,105,110,103,47,82,97,98,98,105,116,77,81,47,108,111,103,47,114,97,98,98,105,116,64,73,53,45,51,53,55,48,75,46,108,111,103],
    [67,58,47,85,115,101,114,115,47,80,105,111,116,114,32,82,97,99,104,119,97,322,47,65,112,112,68,97,116,97,47,82,111,97,109,105,110,103,47,82,97,98,98,105,116,77,81,47,108,111,103,47,114,97,98,98,105,116,64,73,53,45,51,53,55,48,75,45,115,97,115,108,46,108,111,103]]],
    []},
    {rabbit,basic_boot_error,3,[]},
    {rabbit,start_it,1,[]},
    {init,start_it,1,[{file,"init.erl"},{line,1057}]},
    {init,start_em,1,[{file,"init.erl"},{line,1037}]}]
    }}
    init terminating in do_boot ()

在服务器日志文件中,我找到了消息:

=CRASH REPORT==== 3-May-2014::18:04:35 ===
crasher:
    initial call: application_master:init/4
    pid: <0.70.0>
    registered_name: []
    exception exit: {bad_return,
                        {{rabbit,start,[normal,[]]},
                         {'EXIT',
                             {badarg,
                                 [{io,format,
                                      [<0.70.0>,
                                       "~n              ~s ~s. ~s~n  ##  ##...",
                                       ["RabbitMQ","3.3.1",
                                        "Copyright (C) 2007-2014 GoP...",
                                        "Licensed under the MPL.  S...",
                                        [67,58,47,85,115,101,114,115,47,80,
                                         105,111,116,114,32,82,97,99,104,119,
                                         97,322,47,65,112,112,68,97,'...'],
                                        [67,58,47,85,115,101,114,115,47,80,
                                         105,111,116,114,32,82,97,99,104,119,
                                         97,322,47,65,112,112,68,'...']]],
                                      []},
                                  {rabbit,start,2,[]},
                                  {application_master,start_it_old,4,
                                      [{file,"application_master.erl"},
                                       {line,272}]}]}}}}
      in function  application_master:init/4 (application_master.erl, line 133)
    ancestors: [<0.69.0>]
    messages: [{'EXIT',<0.71.0>,normal}]
    links: [<0.69.0>,<0.7.0>]
    dictionary: []
    trap_exit: true
    status: running
    heap_size: 2586
    stack_size: 27
    reductions: 306
  neighbours:

我使用默认服务器配置。提前谢谢。

2 个答案:

答案 0 :(得分:0)

你应该检查函数io:format中的参数。

对于日志,有{badarg, [{io,format,。这是错误的原因。

答案 1 :(得分:0)

您应该在启动Rabbit服务器(应用程序:start(sasl))之前尝试启动sasl以获取更多信息。我已经检查了github上rabbitmq-server的rabbit模块中函数start(normal,[])的代码,我没有看到直接调用io:format / 2。更详细的报告可能有所帮助。

你可以看到io:格式失败,由于badarg原因,格式和参数在显示中被截断,所以不可能确定错误,但可能的原因是参数列表不适合格式定义。