App works great with Erlang 16, not so great with Erlang 15 #478

Closed
tarekz opened this Issue Mar 25, 2013 · 6 comments

Comments

Projects
None yet
2 participants

tarekz commented Mar 25, 2013

I have just successfully finished upgrading cowboy to 0.8.2, on a machine using Erlang 16.
When I tried to run the code using Elrang 15 (the version we support), the app crashed.

'''2013-03-25 08:38:29.199 [error] <0.1172.0> CRASH REPORT Process <0.1172.0> with 0 neighbours crashed with reason: bad argument in call to ets:insert_new(ranch_server, {{listener,listener1},<0.1172.0>,undefined}) in ranch_server:insert_listener/2 line 59
{"Kernel pid terminated",application_controller,"{application_start_failure,myapp,{bad_return,{{myapp,start,[normal,[]]},{'EXIT',{{badmatch,{error,{shutdown,{child,undefined,{ranch_listener_sup,listener1},{ranch_listener_sup,start_link,[listener1,10,ranch_tcp,[{port,8083}],cowboy_protocol,[{env,[{dispatch,[{'_',[],[{[<<104,97,110,100,111,118,101,114>>],[],listener2,[]},{[<<107,105,99,107,95,112,108,97,121,101,114>>],[],listener3,[]},{[<<110,111,116,105,102,105,99,97,116,105,111,110>>],[],listener5,[]},{[<<115,116,97,116,115>>],[],listener4,[]}]}]}]}]]},permanent,5000,supervisor,[ranch_listener_sup]}}}},[{myapp_server,start,0,[{file,[115,114,99,47,109,121,97,112,112,46,101,114,108]},{line,63}]},{myapp,start,2,[{file,[115,114,99,47,109,121,97,112,112,95,115,101,114,118,101,114,46,101,114,108]},{line,23}]},{application_master,start_it_old,4,[{file,[97,112,112,108,105,99,97,116,105,111,110,95,109,97,115,116,101,114,46,101,114,108]},{line,274}]}]}}}}}"}'''

Is this a known issue?

Owner

essen commented Mar 25, 2013

Did you recompile first? You can't use R16 beams with R15.

tarekz notifications@github.com wrote:

I have just successfully finished upgrading cowboy to 0.8.2, on a machine using Erlang 16.
When I tried to run the code using Elrang 15 (the version we support), the app crashed.

2013-03-25 08:38:29.199 [error] CRASH REPORT Process with 0 neighbours crashed with reason: bad argument in call to ets:insert_new(ranch_server, {{listener,listener1},,undefined}) in ranch_server:insert_listener/2 line 59
{"Kernel pid terminated",application_controller,"{application_start_failure,myapp,{bad_return,{{myapp,start,[normal,[]]},{'EXIT',{{badmatch,{error,{shutdown,{child,undefined,{ranch_listener_sup,listener1},{ranch_listener_sup,start_link,[listener1,10,ranch_tcp,[{port,8083}],cowboy_protocol,[{env,[{dispatch,[{'_',[],[{[<>],[],listener2,[]},{[<>],[],listener3,[]},{[<>],[],listener5,[]},{[<>],[],listener4,[]}]}]}]}]]},permanent,5000,supervisor,[ranch_listener_sup]}}}},[{myapp_server,start,0,[{file,[115,114,99,47,108,105,115,116,101,110,101,114,115,47,111,112,101,110,112,111,107,101,114,95,115,101,114,118,101,114,46,101,114,108]},{line,63}]},{myapp,start,2,[{file,[115,114,99,47,111,112,101,110,112,111,107,101,114,95,97,112,112,46,101,114,108]},{line,23}]},{application_master,start_it_old,4,[{file,[97,112,112,108,105,99,97,116,105,111,110,95,109,97,115,116,101,114,46,101,114,108]},{line,274}]}]}}}}}"}

Is this a known issue?


Reply to this email directly or view it on GitHub.

tarekz commented Mar 25, 2013

Yes, actually it is a different machine to which I downloaded the code.
Here is how I am starting the listeners
Dispatch = cowboy_router:compile([
{'_', [
{"/listener1", listener1, []},
{"/listener2", listener2, []},
{"/listener3", listener3, []},
{"/listener4", listener4, []}
]}]),
ListenerSpec = ranch:child_spec(
my_app_listeners,
10,
ranch_tcp, [{port, ListenerPort}],
cowboy_protocol, [{env,[{dispatch, Dispatch}]}]),
{ok, _} = supervisor:start_child(myapp_sup, ListenerSpec),

Owner

essen commented Mar 25, 2013

Can't really look until tomorrow or the day after. All I can say is that it works for me with R15B03.

tarekz commented Mar 25, 2013

Thanks, and for what it is worth, I am using Erlang R15B00.

Owner

essen commented Apr 11, 2013

I have no idea why you get a badarg here. Have you found a solution?

Owner

essen commented Apr 25, 2013

Hope you found the issue. Closing, thanks!

@essen essen closed this Apr 25, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment