I duplicated an EC2 image (created an image from the EBS, then created an AMI and started a new instance from that AMI). The EC2 image is running debian.
On old the machine there was an instance of ejabberd running. On the new machine ejabberd has problems to start. When I ask
ejabberctl show
it gives
RPC failed on the node ejabberd@localhost: node down
I tried to change the ERLANG_NODE variable with localhost, dns name and ip, but always get the same error.
I tried to reinstall both erlang-base and ejabberd, but does not change.
The odd is that after some tests on the new machine, the old machine has problems and if I stop the old machine, the new machine seems to run correctly.
It looks like the two copies belongs to the same cluster and disturb each other.
Any idea of what’s going on?
UPDATE:
I searched for the .erlang.cookie file in the filesystem, but cannot find it. However, I tried to create an empty one in home, but it did not work.
I tried to remove the package and purge the conf files (apt-get remove –purge) and reinstall them. Now it seems it is working. It looks like when I created the AMI, I also copied some information that made jabber connecting to the old cluster, or something like that.
Clean up your ejabberd deployment.
Mnesia leftovers in lib hold host info.
Inspect log files and check why it is failing (if still it cannot start)
Check with ps -ef | grep ejabberd if process is running.
Telnet to pre-configured ejabberd port.