Why Does Ejabberd Start Fail?

Posted by Andrew on Ask Ubuntu See other posts from Ask Ubuntu or by Andrew
Published on 2012-10-15T17:42:44Z Indexed on 2012/10/15 23:21 UTC
Read the original article Hit count: 252

Filed under:

I am trying to install ejabberd 2.1.10-2 on my Ubuntu 12.04.1 server. This is a fresh install, and ejabberd is never successfully installed.

The Install

Every time, apt-get hangs on this:

Setting up ejabberd (2.1.10-2ubuntu1) ...
Generating SSL certificate /etc/ejabberd/ejabberd.pem...

Creating config file /etc/ejabberd/ejabberd.cfg with new version
Starting jabber server: ejabberd............................................................ failed.

The dots just go forever until it times out or I 'killall' beam, beam.smp, epmd, and ejabberd processes. I've turned off all firewall restrictions.

Here's the output of epmd -names while the install is hung:

epmd: up and running on port 4369 with data:
name ejabberdctl at port 42108
name ejabberd at port 39621

And after it fails:

epmd: up and running on port 4369 with data:
name ejabberd at port 39621

At the same time (during and after), the output of both netstat -atnp | grep 5222 and netstat -atnp | grep 5280 is empty.

The Crash File

A crash dump file is create at /var/log/ejabber/erl_crash.dump. The slogan (i.e. reason for the crash) is:

Slogan: Kernel pid terminated (application_controller) ({application_start_failure,kernel,{shutdown,{kernel,start,[normal,[]]}}})

It's alive?

Whenever I try to relaunch ejabberd with service ejabberd start, the same thing happens - even if I've killed all processes before doing so.

However, when I killall the processes listed above again, and run su - ejabberd -c /usr/sbin/ejabberd, this is the output I get:

Erlang R14B04 (erts-5.8.5) [source] [64-bit] [rq:1] [async-threads:0] [kernel-poll:false]

Eshell V5.8.5  (abort with ^G)
([email protected])1> 
=INFO REPORT==== 15-Oct-2012::12:26:13 ===
I(<0.478.0>:ejabberd_listener:166) : Reusing listening port for 5222

=INFO REPORT==== 15-Oct-2012::12:26:13 ===
I(<0.479.0>:ejabberd_listener:166) : Reusing listening port for 5269

=INFO REPORT==== 15-Oct-2012::12:26:13 ===
I(<0.480.0>:ejabberd_listener:166) : Reusing listening port for 5280

=INFO REPORT==== 15-Oct-2012::12:26:13 ===
I(<0.40.0>:ejabberd_app:72) : ejabberd 2.1.10 is started in the node [email protected]

Then, the server appears to be running. I get a login prompt when I access http://mydomain.com:5280/admin/. Of course I can't login unless I create an account.

At this time, the output of netstat -atnp | grep 5222 and netstat -atnp | grep 5280 is as follows:

tcp        0      0  *               LISTEN      19347/beam      
tcp        0      0  *               LISTEN      19347/beam      


Even when it appears ejabberd is running, trying to do anything with ejabberdctl fails. For example: trying to register a user:

[email protected]:~# ejabberdctl register myusername mydomain.com mypassword
Failed RPC connection to the node [email protected]: nodedown

I have no idea what I'm doing wrong. This happens on two different servers I have with identical software installed (really not much of anything). Please help. Thanks.

© Ask Ubuntu or respective owner

Related posts about installation

Related posts about crash