1

I'm running the erlang release of my elixir app via systemd on EC2 ubuntu. When I tried to run remote_console of my app via ssh, it works weird.

# Good way. Connect to EC2 and run remote_console

$ ssh ubuntu@<ip>
$ sudo myapp remote_console
iex(myapp@127.0.0.1)> Application.started_applications()
... # All of my applications. OK.


# Bad way. Run remote_console via ssh command

$ ssh ubuntu@<ip> sudo myapp remote_console
iex(remshce50beca-myapp@127.0.0.1)> Application.started_applications()
[{:logger, 'logger', '1.4.1'}, {:iex, 'iex', '1.4.1'},
 {:elixir, 'elixir', '1.4.1'}, {:compiler, 'ERTS  CXC 138 10', '7.0.4'},
 {:stdlib, 'ERTS  CXC 138 10', '3.3'}, {:kernel, 'ERTS  CXC 138 10', '5.2'}]
# Weird node name remshce50beca-myapp and only 3 applications are started.

I don't understand why those are different.

mayTree
  • 727
  • 2
  • 9
  • 22

0 Answers0