| Summary: | Amavisd does not start up after an unclean shutdown | ||
|---|---|---|---|
| Product: | Mageia | Reporter: | Derek Jennings <derekjenn> |
| Component: | RPM Packages | Assignee: | Sysadmin Team <sysadmin-bugs> |
| Status: | RESOLVED INVALID | QA Contact: | QA Team <qa-bugs> |
| Severity: | normal | ||
| Priority: | Normal | CC: | davidwhodgins, marja11, stormi-mageia, sysadmin-bugs, tmb |
| Version: | 1 | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Source RPM: | amavisd-new-2.6.4-9.mga1.src.rpm | CVE: | |
| Status comment: | |||
| Attachments: | Patch to amavisd init script to delete stale pid file. | ||
|
Description
Derek Jennings
2011-10-11 11:59:02 CEST
Manuel Hiebel
2011-10-12 12:27:44 CEST
Assignee:
bugsquad =>
thomas Cauldron has 2.7.0. We don't want put a new version in a stable release. I may put 2.6.5 into backports Status:
NEW =>
ASSIGNED Perhaps it's possible to apply (just) the fix to version 2.6.4 and release that as an update? I found a patch and it works here. But a did a lot of changes on my box. Can ypu please check the location of your amavis.pid file I have /var/amavis/amavis.pid No, It is /var/lib/amavis/amavisd.pid Created attachment 978 [details]
Patch to amavisd init script to delete stale pid file.
The attached patch will delete a stale pid file.
I just installed amavisd-new. I found it wouldn't start ...
Oct 18 22:27:02 hodgins amavis[26227]: (!)Net::Server: 2011/10/18-22:27:02 Can't connect to TCP port 10025 on 127.0.0.1 [Address already in use]\n at line 88 in file /usr/lib/perl5/vendor_perl/5.12.2/Net/Server/Proto/TCP.pm
# lsof -n|grep 10025
master 26627 root 88u IPv4 1094805 0t0 TCP 127.0.0.1:10025 (LISTEN)
So I stopped postfix, and was then able to start amavisd.
I didn't have the problem when I was qa testing kolab, as it
uses cyrus. I switched back to postfix, after I finished testing
kolab.
Can the default port for amavisd be changed easily?
submitted the stale PID resolve to updates_testing. please test and I will submit to Qa Thanks Thomas Almost right Test procedure -------------- Start amavisd, observe pid file in /var/lib/amavis/amavisd.pid Stop amavisd gracefully with service amavisd stop Observe the pid file is gone. Now start amavisd again, then kill the amavisd process Start amavisd again. Message is: # service amavisd start /etc/init.d/amavisd: line 46: checkproc: command not found (stale amavisd pid file /var/lib/amavis/amavisd.pid found, removing. Did amavisd crash?)Starting amavisd: So the patch works correctly apart from the error message line 46: checkproc: command not found checkproc is in Suse, but not in Mageia. The equivalent function in Mageia is the status() function in /etc/init.d/functions However the startup script works whether checkproc is present or not. + # Suse patch ZMI 20100428 check for stale pid file 16 + if test -f $AMAVIS_PID ; then 17 + checkproc -p $AMAVIS_PID amavisd 18 + if test $? -ge 1 ; then 19 + # pid file is stale, remove it 20 + echo -n "(stale amavisd pid file $AMAVIS_PID found, removing. Did amavisd crash?)" 21 + rm -f $AMAVIS_PID 22 + fi 23 + fi line 18 tests the result of line 16 it ignores the result of line 17 which can be removed. fixed in 9.2. I tested it with restart and crashed when running and so far all looks good
Thomas Spuhler
2011-10-22 19:50:13 CEST
QA Contact:
(none) =>
qa-bugs Hi Thomas. If you meant to have the QA team test the update and then have it pushed to all users, you must set the Assignee to qa-bugs@ml.mageia.org (we don't use the QA contact field). Regards CC:
(none) =>
stormi My apologies Thomas I gave some wrong info in comment 7 Line 18 is testing the numerical result code from Line 17. Since checkproc is not present in Mageia the result code is always 0 and it removes the pid file. In 9.2 the test never passes and the "stale amavisd pid file" message never appears and the pid file is not removed. I think this will give the correct operation if test -f $AMAVIS_PID ; then # pid file is stale, remove it gprintf "(stale amavisd pid file %s found, removing. Did amavisd crash?)" "$AMAVIS_PID" rm -f $AMAVIS_PID fi However the mystery is that it still seems to work. amavis does not fail when starting even when there is a stale pid file present. To check if my test procedure was OK I went back to amavisd-new-2.6.4-9.mga1 and I cannot get that to fail, either by crashing amavisd, or by crashing the entire server. I raised the bug report because my server kept crashing due a failing hard drive, and after each restart amavisd refused to start until I manually deleted the pid file so I am confident there is a problem but cannot replicate it to order :-( Derek, I actually did test the original and it failed because of a stale PID file. After adding the patch, it didn't fail but reported a warning. After the latest update, it didn't fail nor was there a warning. I will check it gain. I checked here without the patch and I see not problem with the stale PID file either. I am sorry, I didn't validate the bug, as I found the patch on the Internet and I experienced the problem before on my server. I guess the version we have in Mageia 1 has this already fixed in Amavis. Let's close this as invalid and I will revert the spec file in svn and remove the patch. Please reopen if you don't agree. Status:
ASSIGNED =>
RESOLVED I agree. If it cannot be replicated then it cannot be fixed. I had already moved the mail server to more reliable hardware so I am not currently experiencing any difficulty. Thanks for taking a look at it. To sysadmins: please remove amavisd-new from core/updates_testing, then close the bug as invalid, as the update is cancelled. Thanks Status:
RESOLVED =>
REOPENED (In reply to comment #14) > To sysadmins: please remove amavisd-new from core/updates_testing, then close > the bug as invalid, as the update is cancelled. > > Thanks ping? According to Sophie: [19:37] <marja> :v amavisd-new -s <snip> [19:37] <Sophie> 2.6.4-9.2.mga1 // core-updates_testing-src (Mga, 1, i586), core-updates_testing-src (Mga, 1, x86_64) CC:
(none) =>
marja11 Could someone from the sysadmin team DELETE the srpm amavisd-new-2.6.4-9.2.mga1.src.rpm from Core Updates Testing. Once that's done, this bug report should be closed as resolved, invalid. CC:
(none) =>
davidwhodgins, sysadmin-bugs amavisd-new-2.6.4-9.2.mga1 removed Status:
REOPENED =>
RESOLVED |