0

I'm trying to run a Cowboy web server in Mac OS X 1.9 and I'm getting a stack trace. On a ubuntu box everything runs fine, so I believe this must be something simple to fix if anybody has experienced the problem.

The command:

./_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
Marcos Oliveira
  • 1,697
  • 1
  • 14
  • 13

1 Answers1

0

The cowboy application is not in the path:

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

maybe you should start the application from another place, or add the path to the cowboy application adding "-pa path/to/cowboy/ebin" where you are calling the erlang vm

Pascal
  • 13,977
  • 2
  • 24
  • 32
  • It looks like he is using rebar, he probably just hasn't installed the dependancies. I think this should work: `rebar get-deps && rebar compile` – Daniel Nov 27 '13 at 17:17
  • The deps are installed. I found a difference so far, on linux Erlang is R15B01 and on my mac it's R1601. – Marcos Oliveira Nov 29 '13 at 00:20