Remote Observer fails on Elixir 1.9

Hi, recently I switched from distillery to use Mix releases and I noticed I cannot do remote profiling using observer over SSH tunneling anymore. Basically when I am on distillery, what I will do is:

  1. run epmd -names on the remote server to get the port number, referred as PORT below
  2. on a local terminal, setup ssh tunneling ssh -N -L PORT:localhost:PORT -L 4369:localhost:4369 ec2-user@server
  3. on another local terminal, erl -name debug@127.0.0.1 -setcookie 'cookie_here' -run observer
  4. The observer pops up and I would press Node -> Connect and input myapp@127.0.0.1 and it would work.

Now when I am on Elixir 1.9 I followed the same steps but I kept getting a pang, Connect Failed error on the observer window. I did some digging and I thought it might have something to do with RELEASE_DISTRIBUTION env var so I added the following code before running mix release

export RELEASE_DISTRIBUTION="name"
export RELEASE_NAME="myapp"
export RELEASE_NODE="myapp@127.0.0.1"
export RELEASE_COOKIE="COOKIE_HERE"

But still, same error. Any ideas how I can debug this?

2 Likes

See my answer here. It is for IEx and Elixir, but that should not make any difference.

As a side note, observer prints error message in shell when something happens. If there is, what is it?

1 Like

Can confirm that @vfsoraki’s suggestion worked for me!