Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 241472 - net-im/jabberd2: Stopping service kills all running transports
Summary: net-im/jabberd2: Stopping service kills all running transports
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All All
: High minor (vote)
Assignee: Julian Ospald
URL:
Whiteboard:
Keywords:
: 269010 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-10-11 22:23 UTC by Milko Krachounov
Modified: 2013-11-16 08:45 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Milko Krachounov 2008-10-11 22:23:25 UTC
The init script for jabberd2 kills all running transports, pyicq-t, pyaim-t, pymsn-t. It doesn't stop their servers, it just kills their processes. I'm unsure what's the reason for this, because the transports tend to reconnect to the jabber router as soon as it is started again. It is a nuisance, because it makes the restart of the jabber server troublesome. After you restart it, you should manually zap and then start three other services.


Reproducible: Always

Steps to Reproduce:
1. /etc/init.d/jabberd2 restart
2.
3.
Comment 1 Milko Krachounov 2008-10-11 22:33:54 UTC
Oops, I'm sorry, I just noticed that this is due to (mis)configuration on my part. I'd made the decision to put the pid files of each transport in /var/run/jabber. If the behaviour of killing all services having pids in there is considered correct, my bug report seems to be invalid. :)

Comment 2 Thomas Anderson (tanderson) (RETIRED) gentoo-dev 2008-10-14 16:30:24 UTC
Yes, this is intended behaviour. Quoting from the init script:

stopJabberServices() {

    eindent
    for pidfile in /var/run/jabber/*.pid; do
        if [ -f "${pidfile}" ]; then
            service=$(basename ${pidfile} .pid)
            ebegin "Stopping ${service}"
            start-stop-daemon \
                --stop \
                --pidfile ${pidfile}
            eend $?
        fi
    done
    eoutdent

}
Comment 3 Milko Krachounov 2009-12-27 17:10:24 UTC
This isn't invalid.

net-im/pymsn-t that is in portage puts its pid in /var/run/jabber (and so do most other transports), so the jabberd init script breaks them, resulting in what I described. Also killing all pids in the /var/run/jabber directory (regardless of where did they come from) is wrong behaviour. Putting the pid of a jabber related service in /var/run/jabber shouldn't be an error, and shouldn't cause problems like this.
Comment 4 Marcel Pennewiß 2011-01-03 06:10:10 UTC
(In reply to comment #3)
> net-im/pymsn-t that is in portage puts its pid in /var/run/jabber (and so do
> most other transports), so the jabberd init script breaks them, resulting in
> what I described. Also killing all pids in the /var/run/jabber directory
> (regardless of where did they come from) is wrong behaviour. Putting the pid of
> a jabber related service in /var/run/jabber shouldn't be an error, and
> shouldn't cause problems like this.

IMHO there are 2 possibilities to solve the problem:
- prefix all jabberd2-pid-files (e.g. jabberd2-c2s.pid)
- check if there is a valid config-file for pid-file

Problem: The last one did not stop jabberd2 services if they will be removed from the config file.

Any other suggestions?
Comment 5 Pacho Ramos gentoo-dev 2011-09-13 18:38:23 UTC
*** Bug 269010 has been marked as a duplicate of this bug. ***
Comment 6 Julian Ospald 2013-11-03 12:52:37 UTC
+  03 Nov 2013; Julian Ospald <hasufell@gentoo.org> jabberd2-2.2.17-r1.ebuild:
+  rename pid files wrt #241472


use etc-update or do it manually