Bug#347689: marked as done (init script sets wrong pidfile, causes 'no pidfile found' message)
Your message dated Thu, 12 Jan 2006 14:44:11 +1100
with message-id <43C5D08B.5090504@0c3.net>
and subject line Bug#347689: init script sets wrong pidfile, causes 'no pidfile found' message
has caused the attached Bug report to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere. Please contact me immediately.)
Debian bug tracking system administrator
(administrator, Debian Bugs database)
--------------------------------------
Received: (at submit) by bugs.debian.org; 12 Jan 2006 03:32:04 +0000
>From michael@endbracket.net Wed Jan 11 19:32:04 2006
Return-path: <michael@endbracket.net>
Received: from ihug-mail.icp-qv1-irony2.iinet.net.au ([203.59.1.196] helo=mail-ihug.icp-qv1-irony2.iinet.net.au)
by spohr.debian.org with esmtp (Exim 4.50)
id 1EwtC0-0003rC-JU
for submit@bugs.debian.org; Wed, 11 Jan 2006 19:32:04 -0800
Received: from 203-214-113-248.dyn.iinet.net.au (HELO mail.endbracket.net) ([203.214.113.248])
by mail-ihug.icp-qv1-irony2.iinet.net.au with ESMTP; 12 Jan 2006 11:32:00 +0800
X-BrightmailFiltered: true
X-Brightmail-Tracker: AAAAAA==
Received: from [127.0.0.1] (eagle.endbracket.net [192.168.1.254])
by mail.endbracket.net (Postfix) with ESMTP id 1B63A369B5
for <submit@bugs.debian.org>; Thu, 12 Jan 2006 14:31:57 +1100 (EST)
Message-ID: <[🔎] 43C5CE11.8010707@endbracket.net>
Date: Thu, 12 Jan 2006 14:33:37 +1100
From: Michael Wardle <michael@endbracket.net>
User-Agent: Thunderbird 1.5 (Windows/20051201)
MIME-Version: 1.0
To: submit@bugs.debian.org
Subject: init script sets wrong pidfile, causes 'no pidfile found' message
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Delivered-To: submit@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02
(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Level:
X-Spam-Status: No, hits=-7.0 required=4.0 tests=BAYES_00,HAS_PACKAGE,
RCVD_IN_SORBS autolearn=no version=2.60-bugs.debian.org_2005_01_02
Package: apache2-common
Version: 2.0.54-5
When I issue "/etc/init.d/apache2 stop", I get a message:
Stopping web server: Apache2 ... no pidfile found! not running?.
This appears to be caused by a binary file existing in my /etc/apache2
directory, which causes the "grep" command in apache_stop() to produce:
/etc/apache2/apache2.conf:PidFile /var/run/apache2.pid
Binary file /etc/apache2/apache2.tar matches
When this is filtered thru awk, the for loop tries to read a pid from
"/var/run/apache2.pid" and "file", as these are the second words from
the first and second lines of output. It successfully reads one from
/var/run/apache2.pid, but fails to read one from file. It then sets PID
to the correct pid from /var/run/apache2.pid, but erroneously sets
PIDFILE to file rather than /var/run/apache2.
The following patch should correctly set PIDFILE to the same file that
contained a PID.
--- apache2 2006/01/12 03:21:12 1.2
+++ apache2 2006/01/12 03:21:40
@@ -36,8 +36,8 @@
# apache2 allows more than PidFile entry in the config but only
# the last found in the config is used
for PFILE in `grep ^PidFile /etc/apache2/* -r | awk '{print
$2}'`; do
- PIDFILE="$PFILE"
- if [ -e "$PIDFILE" ]; then
+ if [ -e "$PFILE" ]; then
+ PIDFILE="$PFILE"
PID=`cat $PIDFILE`
fi
done
---------------------------------------
Received: (at 347689-done) by bugs.debian.org; 12 Jan 2006 03:44:49 +0000
>From adconrad@0c3.net Wed Jan 11 19:44:49 2006
Return-path: <adconrad@0c3.net>
Received: from ihug-mail.icp-qv1-irony5.iinet.net.au ([203.59.1.199] helo=mail-ihug.icp-qv1-irony5.iinet.net.au)
by spohr.debian.org with esmtp (Exim 4.50)
id 1EwtOK-0004QA-Nk
for 347689-done@bugs.debian.org; Wed, 11 Jan 2006 19:44:49 -0800
Received: from 203-214-4-60.dyn.iinet.net.au (HELO [10.0.0.4]) ([203.214.4.60])
by mail-ihug.icp-qv1-irony5.iinet.net.au with ESMTP; 12 Jan 2006 11:44:16 +0800
X-BrightmailFiltered: true
X-Brightmail-Tracker: AAAAAA==
Message-ID: <43C5D08B.5090504@0c3.net>
Date: Thu, 12 Jan 2006 14:44:11 +1100
From: Adam Conrad <adconrad@0c3.net>
User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051013)
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: Michael Wardle <michael@endbracket.net>, 347689-done@bugs.debian.org
Subject: Re: Bug#347689: init script sets wrong pidfile, causes 'no pidfile
found' message
References: <[🔎] 43C5CE11.8010707@endbracket.net>
In-Reply-To: <[🔎] 43C5CE11.8010707@endbracket.net>
X-Enigmail-Version: 0.92.1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02
(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Level:
X-Spam-Status: No, hits=-6.0 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER
autolearn=no version=2.60-bugs.debian.org_2005_01_02
Michael Wardle wrote:
>
> When I issue "/etc/init.d/apache2 stop", I get a message:
> Stopping web server: Apache2 ... no pidfile found! not running?.
This has already been reworked in the init script in unstable, and isn't
going to be fixed in stable (not a particularly critical bug, just some
weird corner case), so I'm closing this.
... Adam
Reply to: