title: Attach an iex shell to a running elixir application
body: <p>I have an elixir (mix) application running on heroku</p>
  
  <p>I'm having issues attaching a remote iex shell to this application</p>
  
  <p>The application is launched via this command : </p>
  
  <pre><code>web: MIX_ENV=prod elixir --sname server -S mix run --no-halt
  </code></pre>
  
  <p>I have no trouble attaching a shell locally</p>
  
  <pre><code>MIX_ENV=prod elixir --sname server -S mix run --no-halt
  iex --sname console --remsh server@mru2
  </code></pre>
  
  <p>However, when trying it on heroku I'm having the following issue :</p>
  
  <pre><code>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...
  </code></pre>
  
  <p>It seems like the instance launched by <code>heroku run</code> cannot connect to the one running the server. I tried enforcing a common cookie, but to no avail.</p>
  
  <p>What am I missing?</p>