views:

139

answers:

1

I am trying to call ejabberdctl from a PHP file, but it is failing with the following error :

Failed RPC connection to the node ejabberd@localhost: nodedown

The node is running, i have checked this by logging into the server.

When the php script is run this is the error i see in /opt/ejabberd-2.1.2/logs/ejabberd.log shows :

=ERROR REPORT==== 2010-03-11 15:08:07 ===
** Connection attempt from disallowed node 'ejabberd-ctl@localhost' **

Server Details :

Ejabberd Version : 2.1.2
OS : Ubuntu 9.10 x64

A: 

This is likely to be a cookie problem. Check that the user running ejabberd and the user running php are both using the same cookie (cookie file is named .erlang.cookie).

ppolv
Yes it was a cookie problem. There were apparently two cookies, one in the www-data home directory and another in the /var . I got rid of the one in home and it started working as expected
Adil