title: Erlang. Connecting to local node: *** ERROR: Shell process terminated
body: <p>i have been struggling to connect to erlang node and with no luck.
  The situation is following:</p>
  
  <p>1) I have "-detached" erlang node running on local host with <code>-sname n1</code></p>
  
  <p>2)</p>
  
  <pre><code>$ epmd -names
  epmd: up and running on port 4369 with data:
  name n1 at port 53653
  </code></pre>
  
  <p>3) Trying to connect</p>
  
  <pre><code>$ erl -sname test -remsh n1
  ...
  ERROR: Shell process terminated! (^G to start new job)
  
  
  $ erl -sname test -setcookie *COOKIE* -remsh n1
  ...
  ERROR: Shell process terminated! (^G to start new job)
  
  
  $ erl -sname test -setcookie *COOKIE* -remsh n1@localhost
  ...
  ERROR: Shell process terminated! (^G to start new job)
  </code></pre>
  
  <p>What else should i try ?</p>
  
  <p><strong>UPD:</strong></p>
  
  <p>Following @Odobenus Rosmarus advice:</p>
  
  <pre><code>$ hostname
  server.domain.com
  $ erl -sname test -setcookie *COOKIE* -remsh n1@server.domain.com
  ** System NOT running to use fully qualified hostnames **
  ** Hostname server.domain.com is illegal **
  ** ERROR: Shell process terminated! (^G to start new job) **
  </code></pre>
  
  <p>another blind try (throw away part of fqdn):</p>
  
  <pre><code>$ erl -sname test -setcookie *COOKIE* -remsh n1@server
  Eshell V5.8.5  (abort with ^G)
  (ipspy@server)1&gt;
  </code></pre>
  
  <p>Ok, in 5 tries we are there, cool.</p>