Deployment of a Phoenix app fails because `init terminating in do_boot`

Hi there,

I have an app running in production that I want to deploy in a new environment.

I renamed my app in the existing fly.toml file and launched fly deploy. I got the following error:

==> Release command
Command: /app/bin/migrate
	 Starting instance
	 Configuring virtual machine
	 Pulling container image
	 Unpacking image
	 Preparing kernel init
	 Starting init (commit: c86b3dc)...
	 Setting up swapspace version 1, size = 536866816 bytes
	 Preparing to run: `/app/bin/migrate` as nobody
	 2022/07/26 15:29:46 listening on [fdaa:0:33f5:a7b:aec1:6ce1:9707:2]:22 (DNS: [fdaa::3]:53)
	     (stdlib 3.17.2) erl_eval.erl:446: :erl_eval.expr/5
	     (stdlib 3.17.2) erl_eval.erl:123: :erl_eval.exprs/5
	     (elixir 1.13.4) src/elixir.erl:274: :elixir.eval_forms/3
	     (elixir 1.13.4) lib/code.ex:404: Code.validated_eval_string/3
	     (elixir 1.13.4) lib/config.ex:260: Config.__eval__!/3
	 {"init terminating in do_boot",{#{'__exception__'=>true,'__struct__'=>'Elixir.RuntimeError',message=><<101,110,118,105,114,111,110,109,101,110,116,32,118,97,114,105,97,98,108,101,32,68,65,84,65,66,65,83,69,95,85,82,76,32,105,115init terminating in do_boot ({,[{erl_eval,do_apply,6,[{_},{_},{_}]},{erl_eval,expr,5,[{_},{_}]},{erl_eval,exprs,5,[{_},{_}]},{elixir,recur_eval,3,[{_},{_}]},{elixir,eval_forms,3,[{_},{_}]},{Elixir.Code,validated_eval_string,3,[{_},{_}]},{Elixir.Config,__eval__!,3,[{_},{_}]},{Elixir.Config.Reader,read!,2,[{_},{_}]}]})
	 Reaped child process with pid: 569 and signal: SIGUSR1, core dumped? false
	 Starting clean up.
Error Release command failed, deployment aborted

Any idea of what could be wrong here?

Taking a look at the error message’s stack trace, I’d guess that the app’s release command is failing to run, possibly because it’s having difficulty setting up its configs. If you haven’t already, you might try explicitly creating your new app with fly apps create and then retrying the deploy?

Otherwise, it might be worth looking at the app’s fly.toml to see if there’s something else there that might cause issues with a deployment to a new app.

1 Like

Thanks for your reply, it works :slight_smile: It was actually a missing env variable that caused the error.