You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Vlad Shpolyanskiy <vl...@gmail.com> on 2018/10/04 19:39:06 UTC

spamassassin-3.4.2 and reload command

Hi All!

I have recently upgraded SA to the latest version.
I'm running SA on FreeBSD 11.2-RELEASE-p4, SA installed via pkg utility with
default set of options.
The running command looks like:
/usr/local/bin/perl -T -w /usr/local/bin/spamd -m 5 -4 -d -r
/var/run/spamd/spamd.pid
Now I have a problem with reloading SA, e.g. after sa-update.
Reloading first time works as expected, but second time fails with error:
spamd not running? (check /var/run/spamd/spamd.pid)
The pid file is present, the permissions are fine.
If I use restart instead of  reload it works fine, no matter how many times.
spamassassin-3.4.1_12 does not have this problem.
Please, advice.
Thank you!



--
Sent from: http://spamassassin.1065346.n5.nabble.com/SpamAssassin-Users-f3.html

Re: spamassassin-3.4.2 and reload command

Posted by "Kevin A. McGrail" <km...@apache.org>.
On 10/5/2018 4:22 AM, Vlad Shpolyanskiy wrote:
> sa-spamd.sa-spamd
> <http://spamassassin.1065346.n5.nabble.com/file/t6289/sa-spamd.sa-spamd>  
> Just in case I have attached FreeBSD script.
> May be you are right, I posted to the wrong place, should address this to
> the FreeBSD port maintainer.
>
I would talk to the FreeBSD port maintainer.  That script is not all the
guts of how their system works and I'm not familiar with it.  I would
point out that one bug on the process name change.  I'd bet it has
something to do with it based on other distros.

-- 
Kevin A. McGrail
VP Fundraising, Apache Software Foundation
Chair Emeritus Apache SpamAssassin Project
https://www.linkedin.com/in/kmcgrail - 703.798.0171


Re: spamassassin-3.4.2 and reload command

Posted by Vlad Shpolyanskiy <vl...@gmail.com>.
sa-spamd.sa-spamd
<http://spamassassin.1065346.n5.nabble.com/file/t6289/sa-spamd.sa-spamd>  
Just in case I have attached FreeBSD script.
May be you are right, I posted to the wrong place, should address this to
the FreeBSD port maintainer.



--
Sent from: http://spamassassin.1065346.n5.nabble.com/SpamAssassin-Users-f3.html

Re: spamassassin-3.4.2 and reload command

Posted by Vlad Shpolyanskiy <vl...@gmail.com>.
Kevin A. McGrail-5 wrote
> What command are you using to restart?  There was a small change in the
> process listing that might affect tools from distros.  I think it is this
> bug: https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7594
> 
> -- 
> Kevin A. McGrail
> VP Fundraising, Apache Software Foundation
> Chair Emeritus Apache SpamAssassin
> Projecthttps://www.linkedin.com/in/kmcgrail - 703.798.0171

Hi Kevin, 
I'm using standart freebsd script from /usr/local/etc/rc.d.
For reload it's sa-spamd reload, for restart it's sa-spamd restart. 



--
Sent from: http://spamassassin.1065346.n5.nabble.com/SpamAssassin-Users-f3.html

Re: spamassassin-3.4.2 and reload command

Posted by "Kevin A. McGrail" <km...@apache.org>.
 On 10/4/2018 3:39 PM, Vlad Shpolyanskiy wrote:

Hi All!

I have recently upgraded SA to the latest version.
I'm running SA on FreeBSD 11.2-RELEASE-p4, SA installed via pkg utility with
default set of options.
The running command looks like:
/usr/local/bin/perl -T -w /usr/local/bin/spamd -m 5 -4 -d -r
/var/run/spamd/spamd.pid
Now I have a problem with reloading SA, e.g. after sa-update.
Reloading first time works as expected, but second time fails with error:
spamd not running? (check /var/run/spamd/spamd.pid)
The pid file is present, the permissions are fine.
If I use restart instead of  reload it works fine, no matter how many times.
spamassassin-3.4.1_12 does not have this problem.
Please, advice.
Thank you!

What command are you using to restart?  There was a small change in the
process listing that might affect tools from distros.  I think it is this
bug: https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7594

-- 
Kevin A. McGrail
VP Fundraising, Apache Software Foundation
Chair Emeritus Apache SpamAssassin
Projecthttps://www.linkedin.com/in/kmcgrail - 703.798.0171

Re: spamassassin-3.4.2 and reload command

Posted by Vlad Shpolyanskiy <vl...@gmail.com>.
Hi!
Yep, you are right!

After start the command looks like:
/usr/local/bin/perl -T -w /usr/local/bin/spamd -m 5 -4 -d -r
/var/run/spamd/spamd.pid

But after reload:
/usr/local/bin/perl5 -T -w /usr/local/bin/spamd -m 5 -4 -d -r
/var/run/spamd/spamd.pid

So, it is  perl vs perl5.
Probably that is the cause of failure for subsequent reloads.



--
Sent from: http://spamassassin.1065346.n5.nabble.com/SpamAssassin-Users-f3.html

Re: spamassassin-3.4.2 and reload command

Posted by RW <rw...@googlemail.com>.
On Sat, 6 Oct 2018 15:59:10 +0100
RW wrote:

> On Thu, 4 Oct 2018 12:39:06 -0700 (MST)
> Vlad Shpolyanskiy wrote:
> 
> > Hi All!
> > 
> > I have recently upgraded SA to the latest version.
> > I'm running SA on FreeBSD 11.2-RELEASE-p4, SA installed via pkg
> > utility with default set of options.
> > The running command looks like:
> > /usr/local/bin/perl -T -w /usr/local/bin/spamd -m 5 -4 -d -r
> > /var/run/spamd/spamd.pid
> > Now I have a problem with reloading SA, e.g. after sa-update.
> > Reloading first time works as expected, but second time fails with
> > error: spamd not running? (check /var/run/spamd/spamd.pid)
> > The pid file is present, the permissions are fine.  
> 
> But is spamd actually still running? Did you get the pid from the file
> and run:
> 
>    ps <pid>

What's going on is that when spamd starts-up, the command field in the
output of ps is: 

    /usr/local/bin/perl -T -w /usr/local/bin/spamd ...

When the rc reload command is used (which sends HUP to spamd) this
changes to:
    
    /usr/local/bin/perl5.26.2 -T -w /usr/local/bin/spamd ...

perl and perl5.26.2 are the same binary hard-linked.

The second version doesn't match what the rc scripts are expecting,
which makes it look like spamd has terminated and the pid has been
reassigned to a different process. 

Re: spamassassin-3.4.2 and reload command

Posted by RW <rw...@googlemail.com>.
On Thu, 4 Oct 2018 12:39:06 -0700 (MST)
Vlad Shpolyanskiy wrote:

> Hi All!
> 
> I have recently upgraded SA to the latest version.
> I'm running SA on FreeBSD 11.2-RELEASE-p4, SA installed via pkg
> utility with default set of options.
> The running command looks like:
> /usr/local/bin/perl -T -w /usr/local/bin/spamd -m 5 -4 -d -r
> /var/run/spamd/spamd.pid
> Now I have a problem with reloading SA, e.g. after sa-update.
> Reloading first time works as expected, but second time fails with
> error: spamd not running? (check /var/run/spamd/spamd.pid)
> The pid file is present, the permissions are fine.

But is spamd actually still running? Did you get the pid from the file
and run:

   ps <pid>


> If I use restart instead of  reload it works fine, no matter how many
> times.


On Thu, 4 Oct 2018 16:05:39 -0400
Kevin A. McGrail wrote:


> What command are you using to restart?  There was a small change in
> the process listing that might affect tools from distros.  I think it
> is this bug: https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7594

If that were the case it would show in the reset as well.