You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by brian ally <2a...@sympatico.ca> on 2007/08/16 20:28:09 UTC
spamd is dying
postfix-2.3.3-1
cyrus-imapd-2.2.10-3
spamassassin-3.1.5-1
spamass-milter-0.3.0-1.1.fc2.rf
perl-Mail-SpamAssassin-3.1.5-1
I'm seeing spamd processes dying consistently:
Aug 13 09:06:07 subtropolix spamd[23480]: bayes: cannot open bayes
databases /var/spool/spamassassin/bayes_* R/O: tie failed: Permission denied
Aug 13 09:06:07 subtropolix spamd[23480]: bayes: locker: safe_lock:
cannot create tmp lockfile
/var/spool/spamassassin/bayes.lock.subtropolix.org.23480 for
/var/spool/spamassassin/bayes.lock: Permission denied
Aug 13 09:06:07 subtropolix spamd[23480]: spamd: clean message
(-0.2/5.0) for filter:5002 in 27.5 seconds, 3069 bytes.
Aug 13 09:06:07 subtropolix spamd[23480]: spamd: result: . 0 - AWL
scantime=27.5,size=3069,user=filter,uid=5002,required_score=5.0,rhost=subtropolix.org,\
raddr=127.0.0.1,rport=35144,mid=<A7...@wildnet-srv.wn.local>,\
autolearn=failed
Aug 13 09:07:40 subtropolix spamc[26720]: connect(AF_INET) to spamd at
127.0.0.1 failed, retrying (#1 of 3): Connection refused
# service spamassassin status
spamd dead but pid file exists
# service spamassassin start
Starting spamd: [ OK ]
Here're some lines from maillog from when it's been restarted:
Aug 16 13:09:54 subtropolix spamd[19296]: rules: meta test
DIGEST_MULTIPLE has undefined dependency 'DCC_CHECK'
Aug 16 13:09:59 subtropolix spamd[19296]: spamd: server started on port
783/tcp (running version 3.1.5)
Aug 16 13:09:59 subtropolix spamd[19296]: spamd: server pid: 19296
Aug 16 13:10:18 subtropolix spamd[24919]: bayes: locker: safe_lock:
cannot create tmp lockfile
/var/spool/spamassassin/bayes.lock.subtropolix.org.24919 for
/var/spool/spamassassin/bayes.lock: Permission denied
Aug 16 13:10:18 subtropolix spamd[24919]: spamd: clean message
(-100.9/5.0) for filter:5002 in 18.0 seconds, 117248 bytes.
Aug 16 13:10:18 subtropolix spamd[24919]: spamd: result: . -100 -
AWL,HTML_MESSAGE,USER_IN_WHITELIST\
scantime=18.0,size=117248,user=filter,uid=5002,required_score=5.0,rhost=subtropolix.org,\
raddr=127.0.0.1,rport=53653,mid=<00...@GUY>,autolearn=failed
I'm also curious about the "autolearn=failed" on that last line.
/etc/postfix/master.cf:
filter unix - n n - - pipe
flags=Rq user=filter argv=/usr/local/anomy/spamc.sh -f ${sender} --
${recipient}
local.cf:
rewrite_header Subject [SPAM]
lock_method flock
required_score 5.0
use_bayes 1
bayes_auto_learn 1
bayes_path /var/spool/spamassassin/bayes
# ls -l /var/spool/spamassassin/
total 2723
-rw------- 1 root root 162816 Aug 16 01:20 bayes_seen
-rw------- 1 mail mail 2618368 Aug 16 01:20 bayes_toks
/var spool spamassassin has:
drwxr-xr-x 3 mail mail 2048 Aug 16 01:20 spamassassin
Note there's no journal. I haven't figured out why (nor if it's
important). Does anything jump out at anyone as to why spamd might be
dying like this? I have googled for this but have yet to come across a
definitive answer.
Re: spamd is dying
Posted by Matus UHLAR - fantomas <uh...@fantomas.sk>.
Hello,
On 16.08.07 14:28, brian ally wrote:
> I'm seeing spamd processes dying consistently:
> Aug 13 09:06:07 subtropolix spamd[23480]: bayes: cannot open bayes
> databases /var/spool/spamassassin/bayes_* R/O: tie failed: Permission denied
> Aug 13 09:06:07 subtropolix spamd[23480]: bayes: locker: safe_lock:
> cannot create tmp lockfile
> /var/spool/spamassassin/bayes.lock.subtropolix.org.23480 for
> /var/spool/spamassassin/bayes.lock: Permission denied
> Aug 13 09:06:07 subtropolix spamd[23480]: spamd: clean message
> (-0.2/5.0) for filter:5002 in 27.5 seconds, 3069 bytes.
> Aug 13 09:06:07 subtropolix spamd[23480]: spamd: result: . 0 - AWL
> scantime=27.5,size=3069,user=filter,uid=5002,required_score=5.0,rhost=subtropolix.org,\
> raddr=127.0.0.1,rport=35144,mid=<A7...@wildnet-srv.wn.local>,\
> autolearn=failed
> Aug 13 09:07:40 subtropolix spamc[26720]: connect(AF_INET) to spamd at
> 127.0.0.1 failed, retrying (#1 of 3): Connection refused
>
> # service spamassassin status
> spamd dead but pid file exists
none of those messages tells why spamassassin died. What do kernel logs say?
Anything about dying processes?
> Note there's no journal. I haven't figured out why (nor if it's
> important). Does anything jump out at anyone as to why spamd might be
> dying like this? I have googled for this but have yet to come across a
> definitive answer.
It might be hardware (memory) problem. I'd start searching this way
--
Matus UHLAR - fantomas, uhlar@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
Support bacteria - they're the only culture some people have.
Re: spamd is dying
Posted by Duane Hill <d....@yournetplus.com>.
On Thu, 16 Aug 2007 at 21:37 -0400, 2audrey@sympatico.ca confabulated:
>> I start spamd like this:
>>
>> /usr/bin/spamd -r /var/run/spamd.pid \
>> -d --username=defang --max-spare=8 --min-children=10 --max-children=45
>>
>
> I'll try some of those params. Certainly, i should bump up the max-children
> from 5 and see if that helps.
Keep in mind, the paramenters mentioned above starting with --max and
--min are controlling factors in how much system memory SA will take up.
Our filter server has 12 gigs of ram. Thus, I have this defined:
--min-children=10 --max-children=40 --min-spare=20 --max-spare=22
> One thing that just jumped out at me is that this init script has -H, which
> expects a directory as an argument:
>
> -H [dir], --helper-home-dir[=dir] Specify a different HOME directory
And as the docs state later in the man page:
"By specifying no argument, spamd will use the spamc caller's home
directory instead."
So, if you are calling spamc, the username that calls spamc will have it's
home directory used instead.
> Maybe that has something to do with this. I'll drop it (or should i give it
> "/var/spool/spamassassin"?) and see if that works.
-------
_|_
(_| |
RE: spamd is dying
Posted by Anthony Kamau <An...@diamondkey.com>.
> -----Original Message-----
> From: brian ally [mailto:2audrey@sympatico.ca]
> Sent: Friday, 17 August 2007 11:38 AM
> To: users@spamassassin.apache.org
> Subject: Re: spamd is dying
>
> maillist wrote:
> > brian ally wrote:
> >
> >> postfix-2.3.3-1
> >> cyrus-imapd-2.2.10-3
> >> spamassassin-3.1.5-1
> >> spamass-milter-0.3.0-1.1.fc2.rf
> >> perl-Mail-SpamAssassin-3.1.5-1
> >>
> >> I'm seeing spamd processes dying consistently:
> >>
> > How are you starting spamd? I think you are starting spamd as a
user
> > without permissions to /var/spool/spamassassin/bayes.
>
> A script in /etc/init.d (SA was installed as a fedora RPM). The
relevant
> lines:
> -- snip --
> prog="spamd"
>
> # Source networking configuration.
> . /etc/sysconfig/network
>
> # Check that networking is up.
> [ ${NETWORKING} = "no" ] && exit 0
>
> # Set default spamd configuration.
> #SPAMDOPTIONS="-d -c -m5 -H"
> SPAMDOPTIONS="-d -m5 -H"
> SPAMD_PID=/var/run/spamd.pid
>
You will need to change SPAMDOPTIONS variable to include the user it
will run as - namely the -u option.
I change mine from a default entry of:
#SPAMDOPTIONS="-d -c -m5 -H"
to
SPAMDOPTIONS="-d -c -m5 -H -x -q -u spam"
This cleared up a similar error I was getting with mine.
I had a good reason to include all those switches when I installed SA,
but don't ask me now why I needed them! All I know is that SA runs
without errors!
Cheers,
AK.
Re: spamd is dying
Posted by brian ally <2a...@sympatico.ca>.
maillist wrote:
> brian ally wrote:
>
>> postfix-2.3.3-1
>> cyrus-imapd-2.2.10-3
>> spamassassin-3.1.5-1
>> spamass-milter-0.3.0-1.1.fc2.rf
>> perl-Mail-SpamAssassin-3.1.5-1
>>
>> I'm seeing spamd processes dying consistently:
>>
> How are you starting spamd? I think you are starting spamd as a user
> without permissions to /var/spool/spamassassin/bayes.
A script in /etc/init.d (SA was installed as a fedora RPM). The relevant
lines:
-- snip --
prog="spamd"
# Source networking configuration.
. /etc/sysconfig/network
# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0
# Set default spamd configuration.
#SPAMDOPTIONS="-d -c -m5 -H"
SPAMDOPTIONS="-d -m5 -H"
SPAMD_PID=/var/run/spamd.pid
# Source spamd configuration.
if [ -f /etc/sysconfig/spamassassin ] ; then
. /etc/sysconfig/spamassassin
fi
[ -f /usr/bin/spamd -o -f /usr/local/bin/spamd ] || exit 0
PATH=$PATH:/usr/bin:/usr/local/bin
# By default it's all good
RETVAL=0
# See how we were called.
case "$1" in
start)
# Start daemon.
echo -n $"Starting $prog: "
daemon $NICELEVEL spamd $SPAMDOPTIONS -r $SPAMD_PID
RETVAL=$?
echo
if [ $RETVAL = 0 ]; then
touch /var/lock/subsys/spamassassin
fi
;;
-- snip --
> Also, in my experience, that line in your config file should actually be
> changed from:
>
> bayes_path /var/spool/spamassassin/bayes
>
> to:
>
> bayes_path /var/spool/spamassassin/bayes/bayes
Aarghh! Why is this so opaque in the docs? FWIW, google shows 660 pages
for "bayes" vs. 7 for "bayes/bayes". I'm thinking that it doesn't really
matter, as long as the daemons can find what's been created.
What about the missing journal? Is that an issue here?
> I start spamd like this:
>
> /usr/bin/spamd -r /var/run/spamd.pid \
> -d --username=defang --max-spare=8 --min-children=10 --max-children=45
>
I'll try some of those params. Certainly, i should bump up the
max-children from 5 and see if that helps.
One thing that just jumped out at me is that this init script has -H,
which expects a directory as an argument:
-H [dir], --helper-home-dir[=dir] Specify a different HOME directory
Maybe that has something to do with this. I'll drop it (or should i give
it "/var/spool/spamassassin"?) and see if that works.
Thanks!
brian
Re: spamd is dying
Posted by maillist <ma...@emailacs.com>.
brian ally wrote:
> postfix-2.3.3-1
> cyrus-imapd-2.2.10-3
> spamassassin-3.1.5-1
> spamass-milter-0.3.0-1.1.fc2.rf
> perl-Mail-SpamAssassin-3.1.5-1
>
> I'm seeing spamd processes dying consistently:
>
> Aug 13 09:06:07 subtropolix spamd[23480]: bayes: cannot open bayes
> databases /var/spool/spamassassin/bayes_* R/O: tie failed: Permission
> denied
> Aug 13 09:06:07 subtropolix spamd[23480]: bayes: locker: safe_lock:
> cannot create tmp lockfile
> /var/spool/spamassassin/bayes.lock.subtropolix.org.23480 for
> /var/spool/spamassassin/bayes.lock: Permission denied
> Aug 13 09:06:07 subtropolix spamd[23480]: spamd: clean message
> (-0.2/5.0) for filter:5002 in 27.5 seconds, 3069 bytes.
> Aug 13 09:06:07 subtropolix spamd[23480]: spamd: result: . 0 - AWL
> scantime=27.5,size=3069,user=filter,uid=5002,required_score=5.0,rhost=subtropolix.org,\
>
> raddr=127.0.0.1,rport=35144,mid=<A7...@wildnet-srv.wn.local>,\
>
> autolearn=failed
> Aug 13 09:07:40 subtropolix spamc[26720]: connect(AF_INET) to spamd at
> 127.0.0.1 failed, retrying (#1 of 3): Connection refused
>
> # service spamassassin status
> spamd dead but pid file exists
> # service spamassassin start
> Starting spamd: [ OK ]
>
> Here're some lines from maillog from when it's been restarted:
>
>
> Aug 16 13:09:54 subtropolix spamd[19296]: rules: meta test
> DIGEST_MULTIPLE has undefined dependency 'DCC_CHECK'
> Aug 16 13:09:59 subtropolix spamd[19296]: spamd: server started on port
> 783/tcp (running version 3.1.5)
> Aug 16 13:09:59 subtropolix spamd[19296]: spamd: server pid: 19296
> Aug 16 13:10:18 subtropolix spamd[24919]: bayes: locker: safe_lock:
> cannot create tmp lockfile
> /var/spool/spamassassin/bayes.lock.subtropolix.org.24919 for
> /var/spool/spamassassin/bayes.lock: Permission denied
> Aug 16 13:10:18 subtropolix spamd[24919]: spamd: clean message
> (-100.9/5.0) for filter:5002 in 18.0 seconds, 117248 bytes.
> Aug 16 13:10:18 subtropolix spamd[24919]: spamd: result: . -100 -
> AWL,HTML_MESSAGE,USER_IN_WHITELIST\
> scantime=18.0,size=117248,user=filter,uid=5002,required_score=5.0,rhost=subtropolix.org,\
>
> raddr=127.0.0.1,rport=53653,mid=<00...@GUY>,autolearn=failed
>
>
>
> I'm also curious about the "autolearn=failed" on that last line.
>
> /etc/postfix/master.cf:
> filter unix - n n - - pipe
> flags=Rq user=filter argv=/usr/local/anomy/spamc.sh -f ${sender}
> -- ${recipient}
>
> local.cf:
> rewrite_header Subject [SPAM]
> lock_method flock
> required_score 5.0
> use_bayes 1
> bayes_auto_learn 1
> bayes_path /var/spool/spamassassin/bayes
>
> # ls -l /var/spool/spamassassin/
> total 2723
> -rw------- 1 root root 162816 Aug 16 01:20 bayes_seen
> -rw------- 1 mail mail 2618368 Aug 16 01:20 bayes_toks
>
> /var spool spamassassin has:
> drwxr-xr-x 3 mail mail 2048 Aug 16 01:20 spamassassin
>
> Note there's no journal. I haven't figured out why (nor if it's
> important). Does anything jump out at anyone as to why spamd might be
> dying like this? I have googled for this but have yet to come across a
> definitive answer.
>
How are you starting spamd? I think you are starting spamd as a user
without permissions to /var/spool/spamassassin/bayes.
Also, in my experience, that line in your config file should actually be
changed from:
bayes_path /var/spool/spamassassin/bayes
to:
bayes_path /var/spool/spamassassin/bayes/bayes
I start spamd like this:
/usr/bin/spamd -r /var/run/spamd.pid \
-d --username=defang --max-spare=8 --min-children=10 --max-children=45
So, I start spamd as the user "defang".
-=Aubrey=-