You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by John Fleming <jo...@wa9als.com> on 2004/06/03 05:06:17 UTC
bayes_* R/W: tie failed
Would someone explain the following maillog entries to me? I know it has
something to do with the user and permissions, but I'm not sure what's
wrong. I'm also not sure of the effects of the error. I'm calling spamc
with no options, e.g. /usr/sbin/spamc. The properties of
/var/.spamassassin are group:root, owner:root, 777.
Do I need to create a new user, e.g. "spamchecker", and change the group and
owner of /var/.spamassassin to that user and then call spamc with -u
spamchecker?
Thanks - John (assume major newbie, but learning...)
Jun 2 21:49:34 localhost spamd[11966]: info: setuid to susan succeeded
Jun 2 21:49:34 localhost spamd[11966]: processing message
<20...@elisha.churchquest.com> for susan:513.
Jun 2 21:49:34 localhost postfix/smtpd[11955]: disconnect from
elisha.churchquest.com[207.44.194.116]
Jun 2 21:49:35 localhost spamd[11966]: Cannot open bayes databases
/var/.spamassassin/bayes_* R/W: tie failed: Permission denied
Jun 2 21:49:45 localhost spamd[11966]: Cannot open bayes databases
/var/.spamassassin/bayes_* R/W: tie failed: Permission denied
Jun 2 21:49:45 localhost spamd[11966]: identified spam (26.1/5.0) for
susan:513 in 10.6 seconds, 5770 bytes.
Jun 2 21:49:45 localhost postfix/local[11957]: 73C60AFA86:
to=susan@<snipped>.org, relay=local, delay=11, status=sent
("|/usr/bin/procmail")
Re: bayes_* R/W: tie failed
Posted by John Fleming <jo...@wa9als.com>.
----- Original Message -----
From: "John Fleming" <jo...@wa9als.com>
To: <sp...@incubator.apache.org>
Sent: Wednesday, June 02, 2004 10:06 PM
Subject: bayes_* R/W: tie failed
> wrong. I'm also not sure of the effects of the error. I'm calling spamc
> with no options, e.g. /usr/sbin/spamc.
Uh, that's /usr/bin/spamc to be accurate!
Re: bayes_* R/W: tie failed
Posted by John Fleming <jo...@wa9als.com>.
----- Original Message -----
From: "Matt Kettler" <mk...@comcast.net>
To: "John Fleming" <jo...@wa9als.com>;
<sp...@incubator.apache.org>
Sent: Wednesday, June 02, 2004 11:22 PM
Subject: Re: bayes_* R/W: tie failed
> At 10:06 PM 6/2/04 -0500, John Fleming wrote:
> >Would someone explain the following maillog entries to me? I know it has
> >something to do with the user and permissions, but I'm not sure what's
> >wrong. I'm also not sure of the effects of the error. I'm calling spamc
> >with no options, e.g. /usr/sbin/spamc. The properties of
> >/var/.spamassassin are group:root, owner:root, 777.
> >
> >Do I need to create a new user, e.g. "spamchecker", and change the group
and
> >owner of /var/.spamassassin to that user and then call spamc with -u
> >spamchecker?
> >
> >Thanks - John (assume major newbie, but learning...)
> >
> >Jun 2 21:49:34 localhost spamd[11966]: info: setuid to susan succeeded
> >Jun 2 21:49:34 localhost spamd[11966]: processing message
> ><20...@elisha.churchquest.com> for susan:513.
> >Jun 2 21:49:34 localhost postfix/smtpd[11955]: disconnect from
> >elisha.churchquest.com[207.44.194.116]
> >Jun 2 21:49:35 localhost spamd[11966]: Cannot open bayes databases
> >/var/.spamassassin/bayes_* R/W: tie failed: Permission denied
>
>
> Occasional lock failures for the R/W lock are perfectly normal in SA, and
> actually somewhat common on busy servers. However, they shouldn't happen
if
> you've only got one instance of spamc running at the time.
>
> SA acquires the R/W lock when it wants to do any of the "opportunistic"
> operations, ones involving autolearning and bayes housekeeping. However,
> it's safe for these operations to fail.
>
> So, if SA decides to autolearn a message, but another SA instance is
> already autolearning, or expiring tokens, it will fail the get the R/W
> lock. The alternative is for SA to wait, which slows down mail processing.
> It's much better to simply skip the autolearning and move on to delivering
> the message.
>
> However, if a SA process died and left the lockfile around, then you'll
get
> failures every time even if it's the only SA process.
>
> If you can temporarily shut down all your SA processes, once they have all
> exited, there should be no files with "lock" in the name along side your
> bayes_toks, bayes_seen, etc. If there are any, remove them.
Thanks for the comments Matt. Do you mean just looking in the
/var/.spamassassin directory where my bayes_* files are kept? I just took a
random look and don't see any lock files. I'm just running a server for a
small group of about 8 people, but I think it fails every time. So does
this only have to do with autolearning and not evaluation for spam? It does
appear that bayes CHECKING is working OK.
Before I changed my permissions on that directory to 777, I got a different
sort of write error - can't remember the exact wording, but I thought
changing to 777 would solve the problem. However, it just changed the
error. - John
[root@Luke .spamassassin]# ls -a
. .. bayes_journal bayes_seen bayes_toks
[root@Luke .spamassassin]#
Re: bayes_* R/W: tie failed
Posted by Matt Kettler <mk...@comcast.net>.
At 10:06 PM 6/2/04 -0500, John Fleming wrote:
>Would someone explain the following maillog entries to me? I know it has
>something to do with the user and permissions, but I'm not sure what's
>wrong. I'm also not sure of the effects of the error. I'm calling spamc
>with no options, e.g. /usr/sbin/spamc. The properties of
>/var/.spamassassin are group:root, owner:root, 777.
>
>Do I need to create a new user, e.g. "spamchecker", and change the group and
>owner of /var/.spamassassin to that user and then call spamc with -u
>spamchecker?
>
>Thanks - John (assume major newbie, but learning...)
>
>Jun 2 21:49:34 localhost spamd[11966]: info: setuid to susan succeeded
>Jun 2 21:49:34 localhost spamd[11966]: processing message
><20...@elisha.churchquest.com> for susan:513.
>Jun 2 21:49:34 localhost postfix/smtpd[11955]: disconnect from
>elisha.churchquest.com[207.44.194.116]
>Jun 2 21:49:35 localhost spamd[11966]: Cannot open bayes databases
>/var/.spamassassin/bayes_* R/W: tie failed: Permission denied
Occasional lock failures for the R/W lock are perfectly normal in SA, and
actually somewhat common on busy servers. However, they shouldn't happen if
you've only got one instance of spamc running at the time.
SA acquires the R/W lock when it wants to do any of the "opportunistic"
operations, ones involving autolearning and bayes housekeeping. However,
it's safe for these operations to fail.
So, if SA decides to autolearn a message, but another SA instance is
already autolearning, or expiring tokens, it will fail the get the R/W
lock. The alternative is for SA to wait, which slows down mail processing.
It's much better to simply skip the autolearning and move on to delivering
the message.
However, if a SA process died and left the lockfile around, then you'll get
failures every time even if it's the only SA process.
If you can temporarily shut down all your SA processes, once they have all
exited, there should be no files with "lock" in the name along side your
bayes_toks, bayes_seen, etc. If there are any, remove them.