0

我正在尝试在 Mac OS X 1.9 中运行 Cowboy Web 服务器,并且正在获取堆栈跟踪。在 ubuntu 机器上一切运行良好,所以我相信如果有人遇到过这个问题,这一定很容易解决。

命令:

./_rel/bin/cowfarm command

The stack trace:

Exec: /Users/marcosvm/code/spikes/cowfarm/_rel/erts-5.10.2/bin/erlexec -boot /Users/marcosvm/code/spikes/cowfarm/_rel/releases/1/cowfarm -mode embedded -config /Users/marcosvm/code/spikes/cowfarm/_rel/releases/1/sys.config -args_file /Users/marcosvm/code/spikes/cowfarm/_rel/releases/1/vm.args -- console
Root: /Users/marcosvm/code/spikes/cowfarm/_rel
Erlang R16B01 (erts-5.10.2) [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false] [dtrace]


=INFO REPORT==== 26-Nov-2013::15:08:49 ===
    application: cowboy
    exited: {bad_return,
                {{cowboy_app,start,[normal,[]]},
                 {'EXIT',
                     {undef,
                         [{cowboy_app,start,[normal,[]],[]},
                          {application_master,start_it_old,4,
                              [{file,"application_master.erl"},
                               {line,269}]}]}}}}
    type: permanent
{"Kernel pid terminated",application_controller,"{application_start_failure,cowboy,{bad_return,{{cowboy_app,start,[normal,[]]},{'EXIT',{undef,[{cowboy_app,start,[normal,[]],[]},{application_master,start_it_old,4,[{file,\"application_master.erl\"},{line,269}]}]}}}}}"}

Crash dump was written to: erl_crash.dump
Kernel pid terminated (application_controller) ({application_start_failure,cowboy,{bad_return,{{cowboy_app,start,[normal,[]]},{'EXIT',{undef,[{cowboy_app,start,[normal,[]],[]},{application_master,st
4

1 回答 1

0

牛仔应用程序不在路径中:

...
{undef,
    [{cowboy_app,start,[normal,[]],[]},
...

也许你应该从另一个地方启动应用程序,或者添加牛仔应用程序的路径,在你调用 erlang vm 的地方添加“-pa path/to/cowboy/ebin”

于 2013-11-27T06:57:38.963 回答