Start and stop Amazonaws servers with ejabberd installed

Dear all,

My amazonaws server has ejabberd installed. It works well. Then I stopped the server and then started the server again. All my ejabberd files are in the server. However, the host DNS name is changed, e.g. from ec2-111-11-111-111.compute-1.amazonaws.com to ec2-222-22-222-222.compute-1.amazonaws.com. Now my ejabberd server does not work. I am not able to connect to ejabberd with my app. What should I do in this situation? Thank you very much.

Mnesia internal database

Mnesia internal database embeds the erlang node name. You need to be sure that the erlang node name for ejabberd is set in a way that it does not change (DNS or /etc/hosts name).

To recover, you need to remove Mnesia database and restart setup.

The Amazon AWS machine DNS

The Amazon AWS machine DNS changes every time it starts or stops. Can I set my host name to a fixed name, such as ejabberd.server.com? If yes, do you have a quick tutorial for that? Thank you very much for your help.

I got it. Thank you. How can

I got it. Thank you. How can I delete the Mnesia database? Do you have a step-by-step guide for that? Thank you very much.

You can just delete the

You can just delete the Mnesia directory. It will be created on start.

Of course, you need to backup the directory before deletion as a safety measure, just in case.

The Amazon name change

The Amazon name change because it is their own DNS. You need to use your own DNS / fixed IP for that. Anyway, for production you need to do that if you want to have a fixed point your user can connect to.

Moreover, you can define custom local name using /etc/hosts file.

I do not have a tutorial as it is standard Linux server management and has nothing to do with XMPP. I am sure by using Google and learning a bit around it, you will find you way.

Thank you. I found that they

Thank you. I found that they have elastic IP option which basically allows me to keep a fixed IP address whether I start or stop the server. I will be able to keep a fixed DNS name that I can put in the client.

I got a free subdomain from

I got a free subdomain from freedns.afraid.org, pointed it to our Amazon server, and set it as the hostname in Ejabberd. It's working well. That's probably the best solution (or better yet, buy your own domain name).

Syndicate content