Unusable Erlang runtime system while running dockerized application on aws

HI,
I am trying to deploy an Elixir/Phoenix application on Amazon ec2. The docker file builds and runs fine on my local machine. When I build it on AWS and then run it. I got the below error.

 args:     format:     label: 2023-04-26 19:19:17.524565 supervisor_report   2023-04-26 19:19:17.524604 
 crash_report        2023-04-26 19:19:17.525679 supervisor_report   2023-04-26 19:19:17.526329 
 crash_report        2023-04-26 19:19:17.527202 std_info            Kernel pid terminated 
(application_controller) ({application_start_failure,kernel,{{shutdown,{failed_to_start_child,net_sup, 
{shutdown,{failed_to_start_child,net_kernel,{'EXIT',nodistribution}}}}},{ker
  
Unusable Erlang runtime system! This is likely due to being compiled for another system than the host is 
  running

It doesn’t make any sense because I am building the image on the same instance, and its running fine locally on ubuntu.
I tried building the image locally and pushing it to ECR and then running that image but the same issue.
Any help would be much appreciated.
Thank you.

FYI

  1. distillery/erts.sh at master · bitwalker/distillery · GitHub

  2. Windows release with set include_erts: true fails with unusable runtime error · Issue #572 · bitwalker/distillery · GitHub

Advise to try Mix Releases & to pay attention to inclusion/exclusion of ERTS & architecture you are compiling for. Good luck!

1 Like