Hi, folks.
I've been using linux for the last 5 years or so, and I've just made the decision to migrate my home server from Ubuntu 10.04 to Arch Linux, so I'm setting up things that I've previously setup on Ubuntu (and other distros) on Arch.
I've configured ejabberd similarly to how I had it running on Ubuntu, and everything works great when I start ejabberd (as root) via "ejabberdctl live". Chat works great and ps shows that processes are running:
[user@brpc ~]$ ps aux | grep -i jabber
ejabberd 349 0.0 0.0 7348 312 ? S 18:00 0:00 /usr/lib/erlang/erts-5.10.1/bin/epmd -daemon
root 738 0.0 0.0 11788 1592 pts/0 S+ 18:16 0:00 /bin/sh /usr/sbin/ejabberdctl live
root 764 12.0 1.1 292424 40012 pts/0 Sl+ 18:16 0:01 /usr/lib/erlang/erts-5.10.1/bin/beam -K true -P 250000 -- -root /usr/lib/erlang -progname erl -- -home /var/lib/ejabberd -- -sname ejabberd@localhost -pa /usr/lib/ejabberd/ebin -mnesia dir "/var/lib/ejabberd" -kernel inet_dist_use_interface {127,0,0,1} -s ejabberd -smp auto live
So, thinking that everything was grand since live mode worked, I ran "systemctl enable ejabberd" and rebooted the machine to test the service, but when it came back up, chat was not working, /var/log/ejabberd/ was devoid of new log output, and I didn't see the "beam" process running. Ejabberd is not being started for some reason, although the empd process is running:
[root@brpc etc]# ps aux | grep -i jabber
ejabberd 349 0.0 0.0 7348 312 ? S 18:00 0:00 /usr/lib/erlang/erts-5.10.1/bin/epmd -daemon
Does anyone have any idea why the service is not being fired-up upon boot? I configured ejabberd with the info from this guide
My best guess would be that there's a permissions issue, since everything works well when spawned as root, but I'm not sure what the permissions problem is, due to there being no ejabberd logs.
These are the permissions of /etc/ejabberd:
drwxr-x--- 2 root ejabberd 4096 May 22 17:51 ejabberd
Running "systemctl start ejabberd" does not produce any output, but it does start this process:
ejabberd 490 0.0 0.0 7348 316 ? S 18:38 0:00 /usr/lib/erlang/erts-5.10.1/bin/epmd -daemon
and then "systemctl status ejabberd" shows:
ejabberd.service - A distributed, fault-tolerant Jabber/XMPP server
Loaded: loaded (/usr/lib/systemd/system/ejabberd.service; disabled)
Active: active (running) since Wed 2013-05-22 18:38:14 UTC; 45s ago
Process: 482 ExecStart=/usr/bin/erl -pa /usr/lib/ejabberd/ebin -sname ejabberd -s ejabberd -ejabberd config "/etc/ejabberd/ejabberd.cfg" log_path "/var/log/ejabberd/ejabberd.log" -sasl sasl_error_logger \{file,"/var/log/ejabberd/sasl.log"\} -mnesia dir "/var/lib/ejabberd" -detached -kernel inetrc "/etc/ejabberd/inetrc" (code=exited, status=0/SUCCESS)
CGroup: name=systemd:/system/ejabberd.service
└─490 /usr/lib/erlang/erts-5.10.1/bin/epmd -daemon
May 22 18:38:14 brpc systemd[1]: Started A distributed, fault-tolerant Jabber/XMPP server.
But no TCP ports are opened on the machine. If I run "ejabberdctl live", everything works as expected.
I've been troubleshooting this for a few hours, and I'm stumped. I'd be happy to provide more information if anyone has any ideas.