# [solved] ejabberdctl: "Failed RPC connection"

## dr.nil

I installed ejabberd 2.1.8 quite some time ago and use it on a daily basis (i.e. users can connect and chat etc.). Restarting the service, however does not work, I get

 *Quote:*   

> * ejabberd is already stopped (manually?).

 

This seems to be an issue not only with the init script. Running ejabberdctl as root I get the infamous Failed RPC connection to the node error message. I double checked that the node name in /etc/jabber/ejabberdctl.cfg is correct with the name I'm seeing in the process list.

Any clues what could be wrong?

-dirkLast edited by dr.nil on Fri Nov 18, 2011 4:16 am; edited 1 time in total

----------

## grimm26

I've been banging my head against the wall on this one, too.  I just found a fix.  What you need to do is add the hostname of your jabber server to your hosts file on the localhost line like so :

```

127.0.0.1       localhost jabber.mydomain.com

```

I'm guessing that you could also add something to your /etc/jabber/inetrc to take care of this, too.  You just need to have your node hostname point to the loopback (127.0.0.1).   The /etc/hosts tweak does the trick, though.

----------

## dr.nil

 *grimm26 wrote:*   

> I'm guessing that you could also add something to your /etc/jabber/inetrc to take care of this, too. 

 

I tried both, the /etc/hosts tweak and putting the host name into /etc/jabber/inetrc and both do the trick. I went with /etc/jabber/inetrc in the end because I think that's cleaner.

Thanks for your feedback.

----------

## grimm26

 *dr.nil wrote:*   

> 
> 
> I tried both, the /etc/hosts tweak and putting the host name into /etc/jabber/inetrc and both do the trick. I went with /etc/jabber/inetrc in the end because I think that's cleaner.
> 
> Thanks for your feedback.

 

What's the line from your inetrc for posterity's sake?  :Smile: 

----------

## dr.nil

it looks like this:

```
{host,{127,0,0,1}, ["localhost","quad64"]}.
```

Where quad64 is the name of the host.

----------

