If the jabberd server dies for whatever reason (this has happened twice to me), it will not cleanup it's own pid files in /var/spool/jabber/jabber.pid. With the current gentoo startup/init scripts, this creates a situation where the init script 'claims' jabber started up A-ok, when in fact, it aborted [crashed] right on startup. This, in turn, causes the `jabberd stop` to report an errror (jabberd, no process killed). Under this setup, jabber doesn't seem to be creating any log files what-so-ever. It took some poking to find out that it's the old pid file that's creating the problem. Steps to reproduce: `echo 12345 > /var/spool/jabber/jabber.pid` `/etc/init.d/jabberd start` Proposed fix: Have the gentoo startup scripts check for dead pid files in the jabber spool directory, so us un-educated admins don't waste 20 minutes scratching our heads. :) Reproducible: Always Steps to Reproduce: 1. 2. 3.
What version are you running? I am taking a look at this is 1.4.3-r3 because i am fealling some problems with the way transports handle their pid files
Created attachment 33970 [details] jabber.rc6-r7 Please try this version. Attention that you need to add: JPIDFILE="/var/log/jabber/jabberd14.pid" to /etc/confd/jabber . Please report. I think that this is going to have to be done for all transports, because they have strange ways to handle pid files.
*** Bug 56089 has been marked as a duplicate of this bug. ***
Some of the transports don't use the pid file properly, jabberd 1.4 does. So we can relly on the if [ -z $(ps ax | grep `cat ${JPIDFILE}` | grep -v grep ) to see if it is running ok. Even with the error it should start because: if [ -z $(ps ax | grep `cat ${JPIDFILE}` | grep -v grep ) ] then rm -f ${JPIDFILE} fi jabberd -B -c /etc/jabber/multiple.xml >/dev/null 2>&1 It just uses the if to see if there is a dead jabberd with an open file, if there is no file it just gives that error and starts jabberd But than error message can be fixed. It is 3.30 am, tomorow I will send an updated version.
The only problem with this: if [ -z $(ps ax | grep `cat ${JPIDFILE}` | grep -v grep ) ] then rm -f ${JPIDFILE} fi Is that if ${JPIDFILE} doesn't exist already, the if statement spits out some shell errors because the script is interpreted as if [ -z $(ps ax | grep | grep -v grep ) ] which of course is not valid because grep needs arguments. Wrapping the if in an 'if [ -e ${JPIDFILE} ]; then ' or even just changing the line to if [ -e ${JPIDFILE} -a -z $(ps ax | grep `cat ${JPIDFILE}` | grep -v grep ) ] (add a check for ${JPIDFILE} existing AND it's running). I think that'd work anyway :)
Created attachment 34819 [details] jabber.rc6-r7 Well i think this wrapps it up for this. It would be nice to re-write the other inits BUT there needs to be cheked one by one if they really honor their pid file.
fixed in r3