Build, release failed

Hello guys,
I hope you all good , I have build project using this command

 MIX_ENV=prod mix release

Build was successful , but the application service has failed to start ,
Any Ideas or solution

Hey, can you share:

  1. The plain text of the error you’re getting, or terminal output when it fails to start.
  2. Which command you’re using to start the release.

I see service running ,

[communications]# netstat -apn |egrep 4001
tcp        0      0 0.0.0.0:4001            0.0.0.0:*               LISTEN      17735/beam.smp      
[communications]# ps -ef |egrep communication
root     17733     1  0 15:24 ?        00:00:00 communications/_build/prod/rel/communications/releases/0.1.0/../../erts-10.4/bin/run_erl -daemon communications/_build/prod/rel/communications/tmp/pipe/ communications/_build/prod/rel/communications/tmp/log/  communications/_build/prod/relcommunications/releases/0\.1\.0/\.\./\.\./erts\-10\.4/bin/erl \-elixir ansi_enabled true \-noshell \-s elixir start_cli \-mode embedded \-setcookie 6CR3GW6VFMLBCUXCQCAGDE3WILQM4CZC2BRGZ3OISUOOVUBZZBAQ\=\=\=\= \-sname communications \-config communications/_build/prod/rel/communications/releases/0\.1\.0/sys \-boot communications/_build/prod/rel/communications/releases/0\.1\.0/start \-boot_var RELEASE_LIB communications/_build/prod/rel/communications/lib \-args_file communications/_build/prod/rel/communications/releases/0\.1\.0/vm\.args \-extra \-\-no\-halt
root     17735 17733  0 15:24 pts/2    00:00:01 communications/_build/prod/rel/communications/erts-10.4/bin/beam.smp -- -root communications/_build/prod/rel/communications -progname erl -- -home /root -- -elixir ansi_enabled true -noshell -s elixir start_cli -mode embedded -setcookie 6CR3GW6VFMLBCUXCQCAGDE3WILQM4CZC2BRGZ3OISUOOVUBZZBAQ==== -sname communications -config communications/_build/prod/rel/communications/releases/0.1.0/sys -boot communications/_build/prod/rel/communications/releases/0.1.0/start -boot_var RELEASE_LIB communications/_build/prod/rel/communications/lib -extra --no-halt
root     32614 13500  0 16:18 pts/1    00:00:00 grep -E --color=auto communication
[communications]# 

```But no page is service on the web , may be its network issues

Can you provide the server logs? Did you remember to add server: true to your endpoint config?

1 Like

If the app is running on port 4001 as shown in the netstat output up there, then I believe server is set to true.

I agree with @benwilson512 logs would really help, if it’s a Phoenix app it could be missing some config, or asset compilation, or if it relies on a database, Ecto could be stuck in a database connection failed loop etc etc.

If the server isn’t logging any errors, it could be a firewall routing issue.

Are you able to paste some of the application logs? It seems like you’re starting in daemon mode which means I would expect to find the logs in communications/_build/prod/rel/communications/tmp/log unless you’ve specifically told them to write somewhere else.

Also, it sounds like you’re trying to access it from the web, does curling the service from a local console work?

That directory is not created

How are you starting the service?