在Mac OS X中运行Erlang Cowboy Web服务器时出现异常

时间:2013-11-26 23:11:53

标签: macos erlang cowboy

我正在尝试在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

1 个答案:

答案 0 :(得分:0)

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

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

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