RE: RDJ from cron - is it safe?
On Fri, 2005-06-24 at 15:53 -0400, Chris Santerre wrote: I'm completely guessing out of the blue here, but is it a timing issue? Is it trying to restart before the final child is able to quit? Yes, sort of... Chris Thielen wrote: Maybe try changing your SA_RESTART to killall -HUP spamd. I think spamd will correctly reload configuration files with a HUP signal Oddly enough for some reason when I did a 'killall -HUP spamd' all the spamd processes were killed off rather than restarted! Secondly, the spamd man page mentions a warning about using HUP. It turns out that the problem is not with SA, or RDJ, as such, but with Fedora. To 'restart' SA, the fedora startup script issues a 'stop' then a 'start'. To help with this the 'stop' uses some script functions in /etc/init.d/functions. In particular it uses 'killproc'. That function tries to locate the pids of the spamd processes. It first looks for a pid file, /var/run/spamd.pid, but that doesn't exist. So it then calls the 'pidof' command. This returns a list of the pids. However, it seems that the child processes are listed first, so the last pid is the parent one. It seems that as the children are being killed off, the parent sees this and restarts a child! Hence the overall 'restart' fails. I have inserted 2 lines into 'killproc' to reverse the pid order. Now the parent pid is seen first and killed off first. Testing this, 'restart' now works fine every time. I'll submit this as a bug to Fedora Core to see what they say. Needless to say, this problem may be particular to Fedora, other unix/linuxes may handle restarts and/or pids differently, and so not see this problem. Many thanks for all the replies. Now we have sorted this 'bug' out, I'll see about automating RDJ :-) John. -- --- John Horne, University of Plymouth, UK Tel: +44 (0)1752 233914 E-mail: [EMAIL PROTECTED] Fax: +44 (0)1752 233839
Re: RDJ from cron - is it safe?
QUOTE___ /etc/init.d/spamassassin restart Shutting down spamd: [ OK ] Starting spamd: Could not create INET socket on 127.0.0.1:783: Address already in use (IO::Socket::INET: Address already in use) [FAILED] __ I got exactly this same thing randomly, and coming in to work with ten calls queued to let me know so and so had a bucket of spam on a Monday morning prompted me to comment out the auto-restart portion of the RDJ. I let it run and do nightly updates, email me the results, and then I simply manually restart if any rules prompt me to. I've thought of putting a check to see if any child processes are running, and simply loop a few times if so, as I'm pretty sure that would take care of it, but so far that seems like more energy than just restarting it by hand. Ben
Re: RDJ from cron - is it safe?
On Mon, Jun 27, 2005 at 08:48:25AM -0400, Ben Hanson wrote: QUOTE___ /etc/init.d/spamassassin restart Shutting down spamd: [ OK ] Starting spamd: Could not create INET socket on 127.0.0.1:783: Address already in use (IO::Socket::INET: Address already in use) [FAILED] __ I got exactly this same thing randomly, and coming in to work with ten calls queued to let me know so and so had a bucket of spam on a Monday morning prompted me to comment out the auto-restart portion of the RDJ. I let it run and do nightly updates, email me the results, and then I simply manually restart if any rules prompt me to. I've thought of putting a check to see if any child processes are running, and simply loop a few times if so, as I'm pretty sure that would take care of it, but so far that seems like more energy than just restarting it by hand. Ben Of five Linux and two FreeBSD machines I administer, only the lightest-loaded FreeBSD has given me a problem with restart not starting up properly. I changed it to do a reload (SIGHUP) instead, and (so far) have no more problems with it Cheers, -- Bob McClure, Jr. Bobcat Open Systems, Inc. [EMAIL PROTECTED] http://www.bobcatos.com God doesn't have (or need) a Plan B.
RE: RDJ from cron - is it safe?
have there been problems doing this? RDJ will not restart the daemon or even keep changed rulesets if the lint returns an error. So, running it via a cron job is safe. It depends on how you're running SA. If you're using amavisd and you specify a restart script, make sure it restarts both amavisd and postfix. Otherwise the two can stop talking to each other, and your mail will get held up until you restart postfix and flush the queue. This may be unique to my configuration, but if so I'm not sure of the cause. -Aaron
Re: RDJ from cron - is it safe?
On Thu, 2005-06-23 at 14:13 -0700, Ed Kasky wrote: At 09:54 AM Thursday, 6/23/2005, John Horne wrote -= Hello, We have been running RDJ manually, but are now considering running it via cron. The problem is what if something 'goes wrong'? This is on a central mailhub, and we do not want the mail going through un-spam checked. I gather others do run RDJ from cron, so the question is have there been problems doing this? RDJ will not restart the daemon or even keep changed rulesets if the lint returns an error. So, running it via a cron job is safe. Many thanks for all the replies, which all seem positive. However, we have been seeing problems with restarting the daemon recently, which is why I am wary about starting to run RDJ from cron. In trying to restart spamassassin, on a fedora core 4 and core 3 system, we see: /etc/init.d/spamassassin restart Shutting down spamd: [ OK ] Starting spamd: Could not create INET socket on 127.0.0.1:783: Address already in use (IO::Socket::INET: Address already in use) [FAILED] It seems that a single child procees is left running: ps auxww|grep -i spamd mail 4156 0.0 2.7 61532 57152 ?S17:28 0:00 spamd child root 4169 0.0 0.0 3756 736 pts/1S+ 17:28 0:00 grep -i spamd If we run 'restart' again then it works okay. If we do a stop and then a start, that too works okay. Does anyone else see this problem? Our mail servers can get busy, so we start SA with the options: -d -x -m 15 -s daemon -u mail --max-conn-per-child=100 Reducing the '-m' value made no difference to this problem. SA version is 3.0.4 on the FC4 server. Thanks, John. -- --- John Horne, University of Plymouth, UK Tel: +44 (0)1752 233914 E-mail: [EMAIL PROTECTED] Fax: +44 (0)1752 233839
RE: RDJ from cron - is it safe?
-Original Message- From: John Horne [mailto:[EMAIL PROTECTED] Sent: Friday, June 24, 2005 12:44 PM To: SpamAssassin Subject: Re: RDJ from cron - is it safe? On Thu, 2005-06-23 at 14:13 -0700, Ed Kasky wrote: At 09:54 AM Thursday, 6/23/2005, John Horne wrote -= Hello, We have been running RDJ manually, but are now considering running it via cron. The problem is what if something 'goes wrong'? This is on a central mailhub, and we do not want the mail going through un-spam checked. I gather others do run RDJ from cron, so the question is have there been problems doing this? RDJ will not restart the daemon or even keep changed rulesets if the lint returns an error. So, running it via a cron job is safe. Many thanks for all the replies, which all seem positive. However, we have been seeing problems with restarting the daemon recently, which is why I am wary about starting to run RDJ from cron. In trying to restart spamassassin, on a fedora core 4 and core 3 system, we see: /etc/init.d/spamassassin restart Shutting down spamd: [ OK ] Starting spamd: Could not create INET socket on 127.0.0.1:783: Address already in use (IO::Socket::INET: Address already in use) [FAILED] It seems that a single child procees is left running: ps auxww|grep -i spamd mail 4156 0.0 2.7 61532 57152 ?S17:28 0:00 spamd child root 4169 0.0 0.0 3756 736 pts/1S+ 17:28 0:00 grep -i spamd If we run 'restart' again then it works okay. If we do a stop and then a start, that too works okay. Does anyone else see this problem? Our mail servers can get busy, so we start SA with the options: -d -x -m 15 -s daemon -u mail --max-conn-per-child=100 Reducing the '-m' value made no difference to this problem. SA version is 3.0.4 on the FC4 server. I'm completely guessing out of the blue here, but is it a timing issue? Is it trying to restart before the final child is able to quit? Chris Santerre System Admin and SARE/URIBL Ninja http://www.rulesemporium.com http://www.uribl.com
Re: RDJ from cron - is it safe?
Aaron Grewell wrote: It depends on how you're running SA. If you're using amavisd and you specify a restart script, make sure it restarts both amavisd and postfix. there is no need to restart postfix. Otherwise the two can stop talking to each other, and your mail will get held up until you restart postfix and flush the queue. This may be unique to my configuration, but if so I'm not sure of the cause. you must be having another problem.
RE: RDJ from cron - is it safe?
At 09:30 AM Friday, 6/24/2005, you wrote -= have there been problems doing this? RDJ will not restart the daemon or even keep changed rulesets if the lint returns an error. So, running it via a cron job is safe. It depends on how you're running SA. If you're using amavisd and you specify a restart script, make sure it restarts both amavisd and postfix. Otherwise the two can stop talking to each other, and your mail will get held up until you restart postfix and flush the queue. This may be unique to my configuration, but if so I'm not sure of the cause. I guess I should have specified that I am running spamc/spamd and sendmail. In which case, RDJ will not restart spamd or keep the new ruleset(s) if the lint fails. Ed Kasky ~ Randomly Generated Quote (473 of 478): Where there's a will, I want to be in it.
Re: RDJ from cron - is it safe?
John Horne wrote: Many thanks for all the replies, which all seem positive. However, we have been seeing problems with restarting the daemon recently, which is why I am wary about starting to run RDJ from cron. In trying to restart spamassassin, on a fedora core 4 and core 3 system, we see: /etc/init.d/spamassassin restart Shutting down spamd: [ OK ] Starting spamd: Could not create INET socket on 127.0.0.1:783: Address already in use (IO::Socket::INET: Address already in use) [FAILED] It seems that a single child procees is left running: ps auxww|grep -i spamd mail 4156 0.0 2.7 61532 57152 ?S17:28 0:00 spamd child root 4169 0.0 0.0 3756 736 pts/1S+ 17:28 0:00 grep -i spamd If we run 'restart' again then it works okay. If we do a stop and then a start, that too works okay. Hi John, Maybe try changing your SA_RESTART to killall -HUP spamd. I think spamd will correctly reload configuration files with a HUP signal. Chris Thielen PS. two copies of this email may appear. I accidentally sent the first from a non-subscribed address. PPS. I also just found out I have an open proxy on my mail server (fixed). naughty naughty me :) -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.4 (Darwin) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCvFCEu+NW2kiW8d0RAqHVAKCSKDEQflY6/0GhbzQcyxNyeiqi7gCg2kE/ b1RqMIopMm/Jpxv2Ij9HT0Q= =zSkw -END PGP SIGNATURE- signature.asc Description: OpenPGP digital signature
RDJ from cron - is it safe?
Hello, We have been running RDJ manually, but are now considering running it via cron. The problem is what if something 'goes wrong'? This is on a central mailhub, and we do not want the mail going through un-spam checked. I gather others do run RDJ from cron, so the question is have there been problems doing this? Thanks, John. -- --- John Horne, University of Plymouth, UK Tel: +44 (0)1752 233914 E-mail: [EMAIL PROTECTED] Fax: +44 (0)1752 233839
Re: RDJ from cron - is it safe?
Hello, We have been running RDJ manually, but are now considering running it via cron. The problem is what if something 'goes wrong'? This is on a central mailhub, and we do not want the mail going through un-spam checked. I gather others do run RDJ from cron, so the question is have there been problems doing this? When ever there is a problem rdj reverts back to what it was replacing. In other words it does an automatic roll back on errors. At least that is what I've been seeing. = Kevin W. Gagel Network Administrator Information Technology Services (250) 561-5848 local 448 --- The College of New Caledonia, Visit us at http://www.cnc.bc.ca Virus scanning is done on all incoming and outgoing email. Anti-spam information for CNC can be found at http://avas.cnc.bc.ca ---
Re: RDJ from cron - is it safe?
John Horne wrote: We have been running RDJ manually, but are now considering running it via cron. The problem is what if something 'goes wrong'? This is on a central mailhub, and we do not want the mail going through un-spam checked. I gather others do run RDJ from cron, so the question is have there been problems doing this? When there has been a problem (since RDJ lints the rules before attempting a restart IIRC) any problematic updated rules didn't get installed and everything kept on running as it should. As such, I've not experienced any problems on a live system running RDJ from cron. Regards, Martyn -- Martyn Drake http://www.drake.org.uk http://www.ourlittleduckling.com
Re: RDJ from cron - is it safe?
I have it running from cron on 12 servers. Never a problem. - Original Message - From: Martyn Drake [EMAIL PROTECTED] To: users@spamassassin.apache.org Sent: Thursday, June 23, 2005 10:02 AM Subject: Re: RDJ from cron - is it safe? John Horne wrote: We have been running RDJ manually, but are now considering running it via cron. The problem is what if something 'goes wrong'? This is on a central mailhub, and we do not want the mail going through un-spam checked. I gather others do run RDJ from cron, so the question is have there been problems doing this? When there has been a problem (since RDJ lints the rules before attempting a restart IIRC) any problematic updated rules didn't get installed and everything kept on running as it should. As such, I've not experienced any problems on a live system running RDJ from cron. Regards, Martyn -- Martyn Drake http://www.drake.org.uk http://www.ourlittleduckling.com
Re: RDJ from cron - is it safe?
At 09:54 AM Thursday, 6/23/2005, John Horne wrote -= Hello, We have been running RDJ manually, but are now considering running it via cron. The problem is what if something 'goes wrong'? This is on a central mailhub, and we do not want the mail going through un-spam checked. I gather others do run RDJ from cron, so the question is have there been problems doing this? RDJ will not restart the daemon or even keep changed rulesets if the lint returns an error. So, running it via a cron job is safe. Ed Kasky ~ Randomly Generated Quote (462 of 478): When angry, count to 10. When really angry, curse. - M. Twain