title: rabbitmq-server fails to start after hostname has changed for first time
body: <p>I am using django-celery for my django project. Last day I have changed my computer's hostname (I am using Ubuntu 12.04, edited file '/etc/hostname'), and after next restart django-celery was failing with error </p>
  
  <pre><code>Consumer: Connection Error: [Errno 111] Connection refused. Trying again in 4 seconds...
  </code></pre>
  
  <p>After some research on this error I could find that, changing my host name caused this error from <a href="https://bugs.launchpad.net/ubuntu/+source/rabbitmq-server/+bug/653405">here</a>. My rabbitmq startup log shows</p>
  
  <p>file: /var/log/rabbitmq/startup_log</p>
  
  <pre><code>Activating RabbitMQ plugins ...
  
  ********************************************************************************
  ********************************************************************************
  
  0 plugins activated:
  
  ERROR: epmd error for host "jinesh": nxdomain (non-existing domain)
  </code></pre>
  
  <p>My startup_err file is empty. </p>
  
  <p>when I run </p>
  
  <pre><code>root@jinesh:/home/jinesh# rabbitmqctl list_users
  Listing users ...
  Error: unable to connect to node rabbit@jinesh: nodedown
  
  DIAGNOSTICS
  ===========
  
  nodes in question: [rabbit@jinesh]
  
  hosts, their running nodes and ports:
  - unable to connect to epmd on jinesh: nxdomain
  
  current node details:
  - node name: rabbitmqctl4956@jinesh
  - home dir: /var/lib/rabbitmq
  - cookie hash: RGhmB2JR1LbZ57j7xWWTxg==
  </code></pre>
  
  <p>I hope changing the nodename may fix this issue. But I couldn't found a way to do this. Anyone have idea about how solve this issue?</p>
  
  <p><strong>update</strong></p>
  
  <p>while changing hostname you have to change both <code>/etc/hostname</code> and <code>/etc/hosts</code> files.</p>
  
  <p>I reinstalled rabbitmq and solved this issue, Will answer this question.</p>