[Elixir][Erlang]connect to remote node

Connecting to remote production node is very useful to debug or observe production.

  • target node
$ elixir --name [your application name]@[your host] --cookie 123 --erl "-kernel inet_dist_listen_min 9001 inet_dist_listen_m 9001" -S mix phoenix.server
  • local node
$ iex --name debug@127.0.0.1 --cookie 123 --remsh [your application name]@[your host]

Sometimes, you should set port forwarding up to connect to target node via a particular node.

References

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s