【问题标题】:Exception when running Erlang Cowboy web server in Mac OS X在 Mac OS X 中运行 Erlang Cowboy Web 服务器时出现异常
【发布时间】:2013-11-26 23:11:53
【问题描述】:

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

【问题讨论】:

    标签: macos erlang cowboy


    【解决方案1】:

    牛仔应用不在路径中:

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

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

    【讨论】:

    • 看起来他正在使用钢筋,他可能只是没有安装依赖项。我认为这应该可行:rebar get-deps && rebar compile
    • deps 已安装。到目前为止,我发现了一个不同之处,在 linux Erlang 上是 R15B01,在我的 Mac 上是 R1601。
    猜你喜欢
    • 2014-10-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-10-22
    • 2012-03-01
    • 2016-03-09
    • 2016-02-09
    • 1970-01-01
    相关资源
    最近更新 更多