Elixir/Erlang, Running OTP Observer Remotely
This post covers running the OTP’s observer on a node running on a remote machine. It is a step-by-step of this gist.
Software Versions
Instructions
On the remote host, start a node with known name and cookie values. iex or erl will be used for this example.
sh remotehost
From the localhost, ssh into the remote host and run epmd.
sh localhost
With the previously started node running, the output should look something like this.
sh localhost
Note the ports that empd and the node you want to debug are using. Reconnect to the remote host with these ports forwarded.
sh localhost
Start a hidden node running the observer app.
sh localhost
In observer, go to Nodes -> Connect Node and enter the name of the remote node.
If you are having trouble connecting, try to manually connect the nodes from the iex or erl prompt. If the nodes do not connect manually, solve that problem. After the nodes have been manually connected, go to Nodes -> Connect Node and enter the name of the remote node in observer.
iex localhost
iex remotehost
erl localhost
erl remotehost
Use the following to get a remote shell.
sh localhost
Note that :runtime_tools must be in the applications list to observe an app released with exrm.
mix.exs partial listing
References:
- Erlang, Using OTP’s observer (appmon replacement) remotely
- Erlang, epmd
- Erlang, Install erlang with wxwidgets (macports)
- Erlang R16 64Bit on OS X 10.9 with wxWidgets
- Erlang, Fixing erlang 15B Observer (from macports); fails to run
- Erlang, Connecting Erlang nodes when an internal and external IP address are at play
- Elixir, iex Command Line Options List
- Elixir, Observer is not available
- Elixir, Multiplayer Elixir
- UNIX, SSH tunneling error: “channel 1: open failed: administratively prohibited: open failed”