Why Does Ejabberd Start Fail?
I had this problem one time when the daemon could not determine the ip address of the hostname I gave in the ejabber config file. My solution was to edit /etc/hosts file and make sure that there was a hostname entry for my public ip address and the domain I wanted ejabber to respond to.
0.0.0.0 hostname.domain.com hostname
1.1.1.1 ns1.yahoo.com ns1
Well, you get the picture. Hope that helps.
Related videos on Youtube
Andrew Ensley
With continuous experience beginning in 2004, I am a seasoned software developer, system administrator, database administrator, DevOps engineer, and team leader. My favorite areas of focus in development are performance, optimization, and security. I have experience with: Git, Java, C#, Python, TypeScript, Node.js, React.js, SQL, PHP, Linux, Windows, MacOS, Infrastructure-as-Code, Configuration-as-Code Azure, ADO, Jenkins, GitHub, Nexus RM/IQ, JFrog Artifactory, SonarQube, Docker, Kubernetes, Cloud Foundry, TAS, TKGi, DigitalOcean, Ansible, AWS Visual Studio Code, IntelliJ IDEA, Eclipse, PyCharm, Android Studio I love automation and open-source software.
Updated on September 18, 2022Comments
-
Andrew Ensley almost 2 years
I am trying to install
ejabberd 2.1.10-2
on myUbuntu 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
, andejabberd
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
andnetstat -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) (ejabberd@ns1)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 ejabberd@ns1
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
andnetstat -atnp | grep 5280
is as follows:tcp 0 0 0.0.0.0:5222 0.0.0.0:* LISTEN 19347/beam tcp 0 0 0.0.0.0:5280 0.0.0.0:* LISTEN 19347/beam
ejabberdctl
Even when it appears ejabberd is running, trying to do anything with ejabberdctl fails. For example: trying to register a user:
root@ns1:~# ejabberdctl register myusername mydomain.com mypassword Failed RPC connection to the node ejabberd@ns1: 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.
-
Admin over 11 yearsJust a guess, have you tried either acquiring a binary/package from the developer web site or building from source? Also, have you tested installing it in a VM (or actual install) of 12.10?
-
-
Andrew Ensley over 11 yearsI checked, and I already have an entry in my /etc/hosts file with my domain name and public IP. However, I think you're on the right track with this. I just noticed the error message says "Failed RPC connection to the node ejabberd@ns1". ns1 is the machine's name but it is not the domain name. Should that show the domain name there?
-
StuckAt7 over 11 yearsyeah for sure.. You should at least add ns1 to the hosts file as well. like 0.0.0.0 <FQDN> <hostname>
-
Andrew Ensley over 11 yearsHoly... I don't even... Adding ns1 to my /etc/hosts file worked. Good grief.
-
StuckAt7 over 11 yearsGlad to hear you got it taken care of. Good luck and may the force be with you. :-)