🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
16 messages
16 total messages Started by Antonio Martos Sun, 03 Dec 2006 11:06
ctlinnd: Perl filter not defined
#74537
Author: Antonio Martos
Date: Sun, 03 Dec 2006 11:06
41 lines
2774 bytes
I'm quite confused with this message i get from Debian Inn 2.4.2-3
installation when i try to enable perl filtering for postings from my
own server (I guess it is in filter_nnrpd.pl, right?)

"ctlinnd perl y" returns: Perl filter not defined
after that: "ctlinnd mode" returns: Perl filtering disabled

This means I have perl support, but does not run because sintax errors?

I tried to substitute default filter_nnrpd.pl for something simpler
like:

# Sample filter
sub filter_post {
    my $rval = "Error" ;
    return $rval;
}

To reject all posting messages for testing, but it is still ignored.
Also tried to stop-start innd2 and to reload all.

news:/etc/news/filter# ctlinnd reload filter_nnrpd.pl ""
ctlinnd: Unknown reload type

Aditional checks:

news:/etc/news/filter# more /etc/news/*|grep pathfilter
pathfilter:             /etc/news/filter
news:/etc/news/filter# ls -la /etc/news/filter
-rw-r--r--  1 news news 6124 2004-12-22 05:21 filter_innd.pl
-rw-r--r--  1 news news 2268 2006-12-03 11:40 filter_nnrpd.pl
-rw-r--r--  1 news news 4177 2006-08-01 22:43 nnrpd_access.pl
-rw-r--r--  1 news news 2653 2006-08-01 22:43 nnrpd_auth.pl
-rw-r--r--  1 news news 1336 2006-08-01 22:43 startup_innd.pl
news:/etc/news/filter# perl -cw filter_nnrpd.pl
filter_nnrpd.pl syntax OK
news:/etc/news/filter# perl -cw filter_innd.pl
filter_innd.pl syntax OK

I'm confused. What else might I try?
Re: ctlinnd: Perl filter not defined
#74538
Author: F. Senault
Date: Sun, 03 Dec 2006 11:22
37 lines
2805 bytes
Le 3 décembre 2006 à 12:06, Antonio Martos a écrit :

> I'm quite confused with this message i get from Debian Inn 2.4.2-3
> installation when i try to enable perl filtering for postings from my
> own server (I guess it is in filter_nnrpd.pl, right?)
> 
> "ctlinnd perl y" returns: Perl filter not defined
> after that: "ctlinnd mode" returns: Perl filtering disabled
> 
> This means I have perl support, but does not run because sintax errors?
/.../
> I'm confused. What else might I try?

That's very simple.  INN supports two kind of filters : the posting
filter (filter_nnrpd.pl) and the feed filter (filter_innd.pl).  

The ctlinnd command is used to reload the second one, because it's used
by innd, which is a permanently running daemon.

What you are trying to implement is a posting filter.  That one will be
loaded every time an nnrpd daemon is spawaned, that is every time a
client connects.

So, just try to post an article, and your notice log will contain lines
like this (if your perl filter is correct) :

Dec  3 12:19:07 talisker nnrpd[54976]: xxxxxxx (xxxxxx) connect
Dec  3 12:19:07 talisker nnrpd[54976]: SERVER perl filtering enabled

Hope this helps.

Fred
-- 
Oh I try to find her  Oh I try to answer  I touch her hand  And death
smiles  She really want  to take me  I've seen the door  And the walls 
cry  (So) let it drain  (Your) static blood  And kiss the fallen angel
Down in the heart of hell                             (Noir Désir, Lola)
Re: ctlinnd: Perl filter not defined
#74539
Author: Aironay
Date: Sun, 03 Dec 2006 12:35
28 lines
2190 bytes
F. Senault escribió:

> What you are trying to implement is a posting filter.  That one will be
> loaded every time an nnrpd daemon is spawaned, that is every time a
> client connects.

Understood. But the problem remains in news.notice:

> So, just try to post an article, and your notice log will contain lines
> like this (if your perl filter is correct) :
> 
> Dec  3 12:19:07 talisker nnrpd[54976]: xxxxxxx (xxxxxx) connect
> Dec  3 12:19:07 talisker nnrpd[54976]: SERVER perl filtering enabled

Mine is:
Dec  3 13:15:29 localhost nnrpd[26267]: SERVER perl filter not defined

And the posting is accepted (all postings should be rejected from the 
testing filter I set)

Maybe the perl filter requires a different name from filter_nnrpd.pl or 
is it placed now in a different folder? But I checked conf file for this 
(folder, not filter file name)
This worked in the past, and I don't know when and how it stopped.
Maybe an upgrade from Debian repositories could change this without 
notice? Just guessing. I'm just trying to avoid a complete reinstall.

Thanks for your help.
Re: ctlinnd: Perl filter not defined
#74540
Author: Aioe
Date: Sun, 03 Dec 2006 13:12
8 lines
1288 bytes
On Sun, 03 Dec 2006 13:35:43 +0100, Aironay wrote:

> And the posting is accepted (all postings should be rejected from the 
> testing filter I set)

try to use this 
http://news.aioe.org/spip.php?rubrique24
Re: ctlinnd: Perl filter not defined
#74542
Author: F. Senault
Date: Sun, 03 Dec 2006 13:20
31 lines
2480 bytes
Le 3 décembre 2006 à 13:35, Aironay a écrit :

> F. Senault escribió:

>> Dec  3 12:19:07 talisker nnrpd[54976]: xxxxxxx (xxxxxx) connect
>> Dec  3 12:19:07 talisker nnrpd[54976]: SERVER perl filtering enabled
> 
> Mine is:
> Dec  3 13:15:29 localhost nnrpd[26267]: SERVER perl filter not defined
> 
> And the posting is accepted (all postings should be rejected from the 
> testing filter I set)
> 
> Maybe the perl filter requires a different name from filter_nnrpd.pl or 
> is it placed now in a different folder? But I checked conf file for this 
> (folder, not filter file name)

That must be filter_nnrpd.pl, and it must be at the path specified by
the "pathfilter" parameter of inn.conf.  If that doesn't exist, add it,
you'll be sure nnrpd is looking at the right place.

BTW, your nnrpd is launched from innd or from inetd, isn't it ?  You
don't use it as a stand-alone server, with the -D parameter ?  If that's
the case, you'll have to restart it, I think.

Fred
-- 
Trusted you                 With my life
Shattered dreams            Broken glass
I hope there is a closure   Down your path                      (Kittie,
For I have yet to find      The means to forgive          Pink Lemonade)
Re: ctlinnd: Perl filter not defined
#74541
Author: Aironay
Date: Sun, 03 Dec 2006 14:28
10 lines
1590 bytes
Aioe escribió:
> try to use this 
> http://news.aioe.org/spip.php?rubrique24

I did, The same thing happens when connecting a client:

Dec  3 14:49:40 localhost nnrpd[29149]: SERVER perl filter not defined

And still no filtering is applied, and filtering remains disabled in 
ctlinnd.
Re: ctlinnd: Perl filter not defined
#74543
Author: Aironay
Date: Sun, 03 Dec 2006 14:29
14 lines
1803 bytes
F. Senault escribió:

> That must be filter_nnrpd.pl, and it must be at the path specified by
> the "pathfilter" parameter of inn.conf.  If that doesn't exist, add it,
> you'll be sure nnrpd is looking at the right place.

Checked, it is ok.

> BTW, your nnrpd is launched from innd or from inetd, isn't it ?  You
> don't use it as a stand-alone server, with the -D parameter ?  If that's
> the case, you'll have to restart it, I think.

Lauchs from innd, but anyway I try to restart the server every time I 
make some changes, just in case.
Re: ctlinnd: Perl filter not defined
#74544
Author: Aioe
Date: Sun, 03 Dec 2006 14:35
7 lines
1366 bytes
On Sun, 03 Dec 2006 15:28:00 +0100, Aironay wrote:

> 
> Dec  3 14:49:40 localhost nnrpd[29149]: SERVER perl filter not defined

have you compiled innd with --with-perl flag?
Re: ctlinnd: Perl filter not defined
#74546
Author: F. Senault
Date: Sun, 03 Dec 2006 15:10
35 lines
2728 bytes
Le 3 décembre 2006 à 15:29, Aironay a écrit :

> F. Senault escribió:
> 
>> That must be filter_nnrpd.pl, and it must be at the path specified by
>> the "pathfilter" parameter of inn.conf.  If that doesn't exist, add it,
>> you'll be sure nnrpd is looking at the right place.
> 
> Checked, it is ok.
> 
>> BTW, your nnrpd is launched from innd or from inetd, isn't it ?  You
>> don't use it as a stand-alone server, with the -D parameter ?  If that's
>> the case, you'll have to restart it, I think.
> 
> Lauchs from innd, but anyway I try to restart the server every time I 
> make some changes, just in case.

There's no need.

Well, I have no more ideas.  The message 'perl filter not defined'
indicates that your nnrpd has been compiled with perl support, so it
can't be that.

If that's a pre-made package, maybe you should consider compiling INN
from sources yourself.  Maybe some compile option, like the name of the
filter, has been tweaked by the package maintainer.

(Now, maybe someone else will have a better answer or some ideas...)

Fred
-- 
Sometimes I sleep, sometimes it's not for days         The people I meet
always go their separate ways     Sometimes you tell the day      By the
bottle that you drink      And times when you're all alone all you do is
think                                   (Bon Jovi, Wanted Dead or Alive)
Re: ctlinnd: Perl filter not defined
#74545
Author: Aioe
Date: Sun, 03 Dec 2006 16:48
10 lines
1506 bytes
On Sun, 03 Dec 2006 16:10:10 +0100, F. Senault wrote:

> Well, I have no more ideas.  The message 'perl filter not defined'
> indicates that your nnrpd has been compiled with perl support, so it
> can't be that.

are you sure?

i haven't got an host to verify now but i'm not so sure
Re: ctlinnd: Perl filter not defined
#74547
Author: F. Senault
Date: Sun, 03 Dec 2006 17:52
21 lines
2133 bytes
Le 3 décembre 2006 à 17:48, Aioe a écrit :

> On Sun, 03 Dec 2006 16:10:10 +0100, F. Senault wrote:
> 
>> Well, I have no more ideas.  The message 'perl filter not defined'
>> indicates that your nnrpd has been compiled with perl support, so it
>> can't be that.
> 
> are you sure?
> 
> i haven't got an host to verify now but i'm not so sure

I did.  It's inside lib/perl.c (line 91 for the 'not defined' message),
which is enclosed in a big #if DO_PERL.

Fred
-- 
Can you help me remember how to smile
Make it somehow all seem worthwhile
How on earth did I get so jaded
Life's mystery seems so faded               (Soul Asylum, Runaway Train)
Re: ctlinnd: Perl filter not defined
#74548
Author: Gary L. Burnore
Date: Sun, 03 Dec 2006 19:12
48 lines
3491 bytes
On Sun, 3 Dec 2006 16:10:10 +0100, "F. Senault" <fred@lacave.net>
wrote:

>Le 3 décembre 2006 à 15:29, Aironay a écrit :
>
>> F. Senault escribió:
>> 
>>> That must be filter_nnrpd.pl, and it must be at the path specified by
>>> the "pathfilter" parameter of inn.conf.  If that doesn't exist, add it,
>>> you'll be sure nnrpd is looking at the right place.
>> 
>> Checked, it is ok.
>> 
>>> BTW, your nnrpd is launched from innd or from inetd, isn't it ?  You
>>> don't use it as a stand-alone server, with the -D parameter ?  If that's
>>> the case, you'll have to restart it, I think.
>> 
>> Lauchs from innd, but anyway I try to restart the server every time I 
>> make some changes, just in case.
>
>There's no need.
>
>Well, I have no more ideas.  The message 'perl filter not defined'
>indicates that your nnrpd has been compiled with perl support, so it
>can't be that.
>
>If that's a pre-made package, maybe you should consider compiling INN
>from sources yourself.  Maybe some compile option, like the name of the
>filter, has been tweaked by the package maintainer.
>
>(Now, maybe someone else will have a better answer or some ideas...)

only the obvious ones like make sure the owner if innd and nnrpd can
read the perl filter commands and make sure the path to perl is set
correctly in the top of those files.  (If #! /usr/local/bin/perl is
set and perl is only in /usr/bin, you could get that message)

-- 
gburnore at DataBasix dot Com 
---------------------------------------------------------------------------
                    How you look depends on where you go.
---------------------------------------------------------------------------
Gary L. Burnore                       |  ÝÛ³ºÝ³Þ³ºÝ³³Ýۺݳ޳ºÝ³Ý³Þ³ºÝ³ÝÝÛ³
                                      |  ÝÛ³ºÝ³Þ³ºÝ³³Ýۺݳ޳ºÝ³Ý³Þ³ºÝ³ÝÝÛ³
Official .sig, Accept no substitutes. |  ÝÛ³ºÝ³Þ³ºÝ³³Ýۺݳ޳ºÝ³Ý³Þ³ºÝ³ÝÝÛ³
                                      |  ÝÛ 0 1 7 2 3 / Ý³Þ 3 7 4 9 3 0 Û³
Black Helicopter Repair Services, Ltd.|     Official Proof of Purchase
===========================================================================
Re: ctlinnd: Perl filter not defined
#74549
Author: Russ Allbery
Date: Sun, 03 Dec 2006 19:19
16 lines
2028 bytes
Gary L Burnore <gburnore@databasix.com> writes:

> only the obvious ones like make sure the owner if innd and nnrpd can
> read the perl filter commands and make sure the path to perl is set
> correctly in the top of those files.  (If #! /usr/local/bin/perl is set
> and perl is only in /usr/bin, you could get that message)

Also run perl -wc on the filter file and make sure that it's valid Perl.
I don't remember what happens if nnrpd tries to load it and gets a syntax
error.

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>

          Please post questions rather than mailing me directly.
     <http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Re: ctlinnd: Perl filter not defined
#74550
Author: Aioe
Date: Sun, 03 Dec 2006 20:34
8 lines
1462 bytes
On Sun, 03 Dec 2006 18:52:12 +0100, F. Senault wrote:

> I did.  It's inside lib/perl.c (line 91 for the 'not defined' message),
> which is enclosed in a big #if DO_PERL.

thank you :)

Re: ctlinnd: Perl filter not defined
#74551
Author: Aioe
Date: Sun, 03 Dec 2006 20:53
8 lines
1524 bytes
On Sun, 03 Dec 2006 11:19:32 -0800, Russ Allbery wrote:

> I don't remember what happens if nnrpd tries to load it and gets a syntax
> error.

nnrpd logs the error string through syslog (news.err)

.-)
Re: ctlinnd: Perl filter not defined
#74552
Author: Aironay
Date: Sun, 03 Dec 2006 22:09
13 lines
1850 bytes
Russ Allbery escribió:

> Also run perl -wc on the filter file and make sure that it's valid Perl.
> I don't remember what happens if nnrpd tries to load it and gets a syntax
> error.

It might be that, but not on filter_nnrpd.pl (I checked lots of times)
I replaced all filter folder with new files. Some of the others, appart 
from filter_innd.pl and filter_nnrpd.pl, might have some sintax error 
that causes filtering to disable.

Now I can run ctlinnd perl y with success.
Thanks for the help
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads