Port eacces error with Phoenix release

I’m trying to get a Phoenix app to deploy on Render. I’ve followed the docs as much as possible and although they’re out of date, I now have this error:

May 3 01:55:51 PM  12:55:51.123 [error] Failed to start Ranch listener CastWeb.Endpoint.HTTP in :ranch_tcp:listen([cacerts: :..., key: :..., cert: :..., ip: {0, 0, 0, 0, 0, 0, 0, 0}, port: 80]) for reason :eacces (permission denied)
May 3 01:55:51 PM  
May 3 01:55:51 PM  12:55:51.125 [notice] Application cast exited: Cast.Application.start(:normal, []) returned an error: shutdown: failed to start child: CastWeb.Endpoint
May 3 01:55:51 PM      ** (EXIT) shutdown: failed to start child: {:ranch_listener_sup, CastWeb.Endpoint.HTTP}
May 3 01:55:51 PM          ** (EXIT) shutdown: failed to start child: :ranch_acceptors_sup
May 3 01:55:51 PM              ** (EXIT) {:listen_error, CastWeb.Endpoint.HTTP, :eacces}
May 3 01:55:53 PM  {"Kernel pid terminated",application_controller,"{application_start_failure,cast,{{shutdown,{failed_to_start_child,'Elixir.CastWeb.Endpoint',{shutdown,{failed_to_start_child,{ranch_listener_sup,'Elixir.CastWeb.Endpoint.HTTP'},{shutdown,{failed_to_start_child,ranch_acceptors_sup,{listen_error,'Elixir.CastWeb.Endpoint.HTTP',eacces}}}}}}},{'Elixir.Cast.Application',start,[normal,[]]}}}"}

The relevant files are here: build.sh · GitHub

Hi Tommy,

Thanks for reaching out and sorry for the delay getting back to you.

I’m not overly familiar with Elixir/Phoenix, but it seems the error above shows IPv6 syntax (tuple of 6 0 values), where as IPv4 expects only 4 values. (looking at these docs, from the link in the gist. Render doesn’t currently support IPv6. Could that be the issue?

Kind regards

Alan