Attach the iex shell to the running elixir application

I have an elixir (mix) application running on heroku

I'm having trouble connecting a remote iex shell to this application

An application is launched using this command:

web: MIX_ENV=prod elixir --sname server -S mix run --no-halt 

I have no problem locally connecting the shell

 MIX_ENV=prod elixir --sname server -S mix run --no-halt iex --sname console --remsh server@mru2 

However, when you try on a hero, I have the following problem:

 heroku run "iex --sname console --remsh server@41959264-bef2-4d2e-b5de-6dcf618efa44 " Running `iex --sname console --remsh server@41959264-bef2-4d2e-b5de-6dcf618efa44 ` attached to terminal... up, run.4421 Erlang/OTP 17 [erts-6.4] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:10] [hipe] [kernel-poll:false] Could not contact remote node server@41959264-bef2-4d2e-b5de-6dcf618efa44 , reason: :nodedown. Aborting... 

It seems that the instance launched by heroku run cannot connect to the server where the server is running. I tried to use a regular cookie, but to no avail.

What am I missing?

+5
source share
1 answer

I am pretty sure that nodes running on Heroku speakers are not allowed to communicate with each other. But while the cookies are split between the two nodes, and you are connecting to the correct fully qualified name, the steps you took above are correct.

+6
source

All Articles