I’m attempting to deploy a release using distillery. I am able to create the release on my server, but when I try to start the release on the server, I throw the following error:
$ _build/prod/rel/scandimension/bin/scandimension start
14:35:21.871 [info] Application scandimension exited: Scandimension.Application.start(:normal, []) returned an error: shutdown: failed to start child: ScandimensionWeb.Endpoint
** (EXIT) an exception was raised:
** (FunctionClauseError) no function clause matching in System.get_env/2
(elixir) lib/system.ex:466: System.get_env(13974, nil)
(phoenix) lib/phoenix/endpoint/supervisor.ex:357: Phoenix.Endpoint.Supervisor.port_to_integer/1
(phoenix) lib/phoenix/endpoint/supervisor.ex:107: anonymous fn/6 in Phoenix.Endpoint.Supervisor.server_children/4
(elixir) lib/enum.ex:1948: Enum."-reduce/3-lists^foldl/2-0-"/3
(phoenix) lib/phoenix/endpoint/supervisor.ex:99: Phoenix.Endpoint.Supervisor.server_children/4
(phoenix) lib/phoenix/endpoint/supervisor.ex:59: Phoenix.Endpoint.Supervisor.init/1
(stdlib) supervisor.erl:295: :supervisor.init/1
(stdlib) gen_server.erl:374: :gen_server.init_it/2
{"Kernel pid terminated",application_controller,"{application_start_failure,scandimension,{{shutdown,{failed_to_start_child,'Elixir.ScandimensionWeb.Endpoint',{function_clause,[{'Elixir.System',get_env,[13974,nil],[{file,\"lib/system.ex\"},{line,466}]},{'Elixir.Phoenix.Endpoint.Supervisor',port_to_integer,1,[{file,\"lib/phoenix/endpoint/supervisor.ex\"},{line,357}]},{'Elixir.Phoenix.Endpoint.Supervisor','-server_children/4-fun-0-',6,[{file,\"lib/phoenix/endpoint/supervisor.ex\"},{line,107}]},{'Elixir.Enum','-reduce/3-lists^foldl/2-0-',3,[{file,\"lib/enum.ex\"},{line,1948}]},{'Elixir.Phoenix.Endpoint.Supervisor',server_children,4,[{file,\"lib/phoenix/endpoint/supervisor.ex\"},{line,99}]},{'Elixir.Phoenix.Endpoint.Supervisor',init,1,[{file,\"lib/phoenix/endpoint/supervisor.ex\"},{line,59}]},{supervisor,init,1,[{file,\"supervisor.erl\"},{line,295}]},{gen_server,init_it,2,[{file,\"gen_server.erl\"},{line,374}]}]}}},{'Elixir.Scandimension.Application',start,[normal,[]]}}}"}
Kernel pid terminated (application_controller) ({application_start_failure,scandimension,{{shutdown,{failed_to_start_child,'Elixir.ScandimensionWeb.Endpoint',{function_clause,[{'Elixir.System',get_env
Crash dump is being written to: erl_crash.dump...done
Based on the documentation for System.get_env, there is no such function for System.get_env/2, so I’m not sure what my next steps should be.
Any suggestions or guidance appreciated.