You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Chris <cp...@earthlink.net> on 2005/08/06 16:42:48 UTC
/etc/rc.d/init.d/spamassassin restart
I run a crojob every six hours to shutdown and restart spamassassin. The below
has appeared twice in the past week, on the fourth and this morning. What I
see as odd is that SA is apparently still running as spam is still being
tagged. Is it possible that on a previous shutdown command that all the
running spamd processes were not killed thus causing this?
---------- Forwarded Message ----------
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]
-------------------------------------------------------
--
Chris
Registered Linux User 283774 http://counter.li.org
09:37:29 up 2 days, 18:13, 2 users, load average: 0.69, 0.26, 0.18
Mandriva Linux 10.1 Official, kernel 2.6.8.1-12mdk
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
A bad dinner with your wife is worth more than a good one in the company of
your mother-in-law.
-- A law for married men
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Re: spamassassin restart
Posted by jdow <jd...@earthlink.net>.
From: "Chris" <cp...@earthlink.net>
On Saturday 06 August 2005 06:16 pm, jdow wrote:
> into my cronjob folder. I thought I'd try the 'reload' instead of
> 'restart' however, however it seems like 'reload' is not an option:
>
> << jdow: edit /etc/init.d/spamassassin and make it an option. For FC4 this
> works when placed between the stop) and restart) cases.
> reload)
> # Reload the daemon's configs
> echo -n $"Reloading configuration: "
> killproc spamd -HUP
> RETVAL=$?
> echo
> ;;
>
> {^_^}
jdow, adding the above, as you did between stop and restart, then running
"service spamassassin reload" nets this:
[root@cpollock init.d]# service spamassassin reload
/etc/init.d/spamassassin: line 49: : command not found
/etc/init.d/spamassassin: line 50: : command not found
/etc/init.d/spamassassin: line 51: : command not found
/etc/init.d/spamassassin: line 52: : command not found
/etc/init.d/spamassassin: line 53: : command not found
/etc/init.d/spamassassin: line 54: : command not found
Is it possible that there is something missing? I notice this in the stop
command:
[ $RETVAL = 0 ] && rm -f /var/lock/subsys/spamassassin
In yours above you have nothing as the $RETVAL. Should the SA lockfile be
removed or just touched? Or neither? Or, still being the newbie that I am,
am I way out in left field?
<< jdow: That is from the Fedora Core 4 SpamAssassin script I run. You
will have to extract the concepts and place them into the context for
the release you are running.
{^_^}
Re: spamassassin restart
Posted by Chris <cp...@earthlink.net>.
On Saturday 06 August 2005 06:16 pm, jdow wrote:
> into my cronjob folder. I thought I'd try the 'reload' instead of
> 'restart' however, however it seems like 'reload' is not an option:
>
> << jdow: edit /etc/init.d/spamassassin and make it an option. For FC4 this
> works when placed between the stop) and restart) cases.
> reload)
> # Reload the daemon's configs
> echo -n $"Reloading configuration: "
> killproc spamd -HUP
> RETVAL=$?
> echo
> ;;
>
> {^_^}
jdow, adding the above, as you did between stop and restart, then running
"service spamassassin reload" nets this:
[root@cpollock init.d]# service spamassassin reload
/etc/init.d/spamassassin: line 49: : command not found
/etc/init.d/spamassassin: line 50: : command not found
/etc/init.d/spamassassin: line 51: : command not found
/etc/init.d/spamassassin: line 52: : command not found
/etc/init.d/spamassassin: line 53: : command not found
/etc/init.d/spamassassin: line 54: : command not found
Is it possible that there is something missing? I notice this in the stop
command:
[ $RETVAL = 0 ] && rm -f /var/lock/subsys/spamassassin
In yours above you have nothing as the $RETVAL. Should the SA lockfile be
removed or just touched? Or neither? Or, still being the newbie that I am,
am I way out in left field?
--
Chris
Registered Linux User 283774 http://counter.li.org
20:01:49 up 3 days, 4:38, 2 users, load average: 0.56, 0.26, 0.18
Mandriva Linux 10.1 Official, kernel 2.6.8.1-12mdk
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
People don't usually make the same mistake twice -- they make it three
times, four time, five times...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Re: spamassassin restart
Posted by jdow <jd...@earthlink.net>.
From: "Chris" <cp...@earthlink.net>
> > 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]
> >
> > -------------------------------------------------------
>
> Here's some anecdotal evidence, for whatever it's worth. I manage six
> mail servers (three clients plus my own) running spamd. Four are
> Fedora Core 1 or 3 (one of the threes is heavily loaded - over 18K
> mails per day) and the other two are FreeBSD.
>
> I have had problems with spamd going away on the very lightly loaded
> (15-20 mails per day) FreeBSD machine. After some testing, I
> determined that, after the morning updating of rules_du_jour, the
> restart was not getting the job done, even after I extended the sleep
> between stop and start. I changed the RDJ script to use reload
> instead of restart, and it hasn't "gone down" since.
>
> I know your problem isn't RDJ. I related that vignette to illustrate
> that there may be some kind of odd race condition that causes spamd
> not to restart properly.
>
> I would think it would be more effective to reduce the max number of
> connections per child, if you're trying to hold down memory
> consumption.
>
> Cheers,
Bob, first I'm going to slightly edit the subject so that the reply doesn't
go
into my cronjob folder. I thought I'd try the 'reload' instead of 'restart'
however, however it seems like 'reload' is not an option:
<< jdow: edit /etc/init.d/spamassassin and make it an option. For FC4 this
works when placed between the stop) and restart) cases.
reload)
# Reload the daemon's configs
echo -n $"Reloading configuration: "
killproc spamd -HUP
RETVAL=$?
echo
;;
{^_^}
Re: spamassassin restart
Posted by Bob McClure Jr <ro...@earthlink.net>.
On Sat, Aug 06, 2005 at 04:24:55PM -0500, Chris wrote:
> On Saturday 06 August 2005 10:13 am, Bob McClure Jr wrote:
>
> > > 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]
> > >
> > > -------------------------------------------------------
>
> >
> > Here's some anecdotal evidence, for whatever it's worth. I manage six
> > mail servers (three clients plus my own) running spamd. Four are
> > Fedora Core 1 or 3 (one of the threes is heavily loaded - over 18K
> > mails per day) and the other two are FreeBSD.
> >
> > I have had problems with spamd going away on the very lightly loaded
> > (15-20 mails per day) FreeBSD machine. After some testing, I
> > determined that, after the morning updating of rules_du_jour, the
> > restart was not getting the job done, even after I extended the sleep
> > between stop and start. I changed the RDJ script to use reload
> > instead of restart, and it hasn't "gone down" since.
> >
> > I know your problem isn't RDJ. I related that vignette to illustrate
> > that there may be some kind of odd race condition that causes spamd
> > not to restart properly.
> >
> > I would think it would be more effective to reduce the max number of
> > connections per child, if you're trying to hold down memory
> > consumption.
> >
> > Cheers,
>
> Bob, first I'm going to slightly edit the subject so that the reply doesn't go
> into my cronjob folder. I thought I'd try the 'reload' instead of 'restart'
> however, however it seems like 'reload' is not an option:
>
> [root@cpollock root]# service spamassassin reload
> Usage: /etc/init.d/spamassassin {start|stop|restart|status}
> [root@cpollock root]#
>
> so guess I'll stick with the restart and see how it goes. I think the only
> reason I was doing the restart was back when running 2.63 I only had 256mb
> ram and I did it to free ram up.
>
> Thanks
> Chris
>
> --
> Chris
> Registered Linux User 283774 http://counter.li.org
> 16:17:45 up 3 days, 54 min, 3 users, load average: 0.43, 0.51, 0.37
> Mandriva Linux 10.1 Official, kernel 2.6.8.1-12mdk
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Hmm. The provided init script for Linux doesn't have it, but what is
provided for NetBSD includes this function:
sig_reload="HUP"
.
.
.
spamd_reload()
{
if [ -z "${the_spamd_pid}" ]; then
echo "${command} not running? (check ${pidfile})."
return 1
fi
echo "Reloading spamd"
kill -${sig_reload} ${the_spamd_pid}
}
Nevertheless, if you're trying to minimize memory consumption, reload
won't do what you want. That's good only for re-reading config
files. I don't think that will free up memory unless SIGHUP causes it
to re-execute itself. I've not seen the code, so I don't know.
Generally, the point of a "reload" is to get a re-read of the config
files without the overhead of a restart.
The point of relating my experience was just to point out that
"restart" might not be bulletproof.
Cheers,
--
Bob McClure, Jr. Bobcat Open Systems, Inc.
robertmcclure@earthlink.net http://www.bobcatos.com
God doesn't have (or need) a Plan B.
spamassassin restart
Posted by Chris <cp...@earthlink.net>.
On Saturday 06 August 2005 10:13 am, Bob McClure Jr wrote:
> > 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]
> >
> > -------------------------------------------------------
>
> Here's some anecdotal evidence, for whatever it's worth. I manage six
> mail servers (three clients plus my own) running spamd. Four are
> Fedora Core 1 or 3 (one of the threes is heavily loaded - over 18K
> mails per day) and the other two are FreeBSD.
>
> I have had problems with spamd going away on the very lightly loaded
> (15-20 mails per day) FreeBSD machine. After some testing, I
> determined that, after the morning updating of rules_du_jour, the
> restart was not getting the job done, even after I extended the sleep
> between stop and start. I changed the RDJ script to use reload
> instead of restart, and it hasn't "gone down" since.
>
> I know your problem isn't RDJ. I related that vignette to illustrate
> that there may be some kind of odd race condition that causes spamd
> not to restart properly.
>
> I would think it would be more effective to reduce the max number of
> connections per child, if you're trying to hold down memory
> consumption.
>
> Cheers,
Bob, first I'm going to slightly edit the subject so that the reply doesn't go
into my cronjob folder. I thought I'd try the 'reload' instead of 'restart'
however, however it seems like 'reload' is not an option:
[root@cpollock root]# service spamassassin reload
Usage: /etc/init.d/spamassassin {start|stop|restart|status}
[root@cpollock root]#
so guess I'll stick with the restart and see how it goes. I think the only
reason I was doing the restart was back when running 2.63 I only had 256mb
ram and I did it to free ram up.
Thanks
Chris
--
Chris
Registered Linux User 283774 http://counter.li.org
16:17:45 up 3 days, 54 min, 3 users, load average: 0.43, 0.51, 0.37
Mandriva Linux 10.1 Official, kernel 2.6.8.1-12mdk
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Nothing motivates a man more than to see his boss putting in an honest day's
work
-- Murphy's Laws on Technology n°9
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Re: /etc/rc.d/init.d/spamassassin restart
Posted by Bob McClure Jr <ro...@earthlink.net>.
On Sat, Aug 06, 2005 at 09:42:48AM -0500, Chris wrote:
> I run a crojob every six hours to shutdown and restart spamassassin. The below
> has appeared twice in the past week, on the fourth and this morning. What I
> see as odd is that SA is apparently still running as spam is still being
> tagged. Is it possible that on a previous shutdown command that all the
> running spamd processes were not killed thus causing this?
>
> ---------- Forwarded Message ----------
>
> 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]
>
> -------------------------------------------------------
>
> --
> Chris
> Registered Linux User 283774 http://counter.li.org
> 09:37:29 up 2 days, 18:13, 2 users, load average: 0.69, 0.26, 0.18
> Mandriva Linux 10.1 Official, kernel 2.6.8.1-12mdk
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Here's some anecdotal evidence, for whatever it's worth. I manage six
mail servers (three clients plus my own) running spamd. Four are
Fedora Core 1 or 3 (one of the threes is heavily loaded - over 18K
mails per day) and the other two are FreeBSD.
I have had problems with spamd going away on the very lightly loaded
(15-20 mails per day) FreeBSD machine. After some testing, I
determined that, after the morning updating of rules_du_jour, the
restart was not getting the job done, even after I extended the sleep
between stop and start. I changed the RDJ script to use reload
instead of restart, and it hasn't "gone down" since.
I know your problem isn't RDJ. I related that vignette to illustrate
that there may be some kind of odd race condition that causes spamd
not to restart properly.
I would think it would be more effective to reduce the max number of
connections per child, if you're trying to hold down memory
consumption.
Cheers,
--
Bob McClure, Jr. Bobcat Open Systems, Inc.
robertmcclure@earthlink.net http://www.bobcatos.com
God doesn't have (or need) a Plan B.
Re: /etc/rc.d/init.d/spamassassin restart
Posted by Steven Stern <su...@sterndata.com>.
Chris wrote:
> I run a crojob every six hours to shutdown and restart spamassassin. The below
> has appeared twice in the past week, on the fourth and this morning. What I
> see as odd is that SA is apparently still running as spam is still being
> tagged. Is it possible that on a previous shutdown command that all the
> running spamd processes were not killed thus causing this?
>
> ---------- Forwarded Message ----------
>
> 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]
>
> -------------------------------------------------------
>
This happens on one of my slower, busy machines. I modified the "stop"
section of /etc/init.d/spamasssassin as follows:
stop)
# Stop daemons.
echo -n "Shutting down spamd (twice): "
killproc spamd
sleep 5
killproc spamd
RETVAL=$?
echo
[ $RETVAL = 0 ] && rm -f /var/lock/subsys/spamassassin
;;
--
Steve