Thread View: news.software.nntp
13 messages
13 total messages
Started by Daniel
Wed, 11 Sep 2002 19:49
nnrpd error: cannot stat backoff_db '': No such file or directory?
Author: Daniel
Date: Wed, 11 Sep 2002 19:49
Date: Wed, 11 Sep 2002 19:49
158 lines
7948 bytes
7948 bytes
What causes the nnrpd error: cannot stat backoff_db '': No such file
or directory?
How can I fix it?
background info follows...
Thank you very much!
~ Daniel
RH 7.2 using inn-2.3.2-5 SRPM, but changed configure flag in spec from
--with-perl to --with-python and rebuilt...
With this I replaced my existing inn-2.3.2-5
The situation is I began experimenting with authorization using the
nnrpd_auth.py
I copied the doc/samples nnrpd.py into my inn filter directory
changed nnrppythonauth in inn.conf to true
I made one change to nnrpd_auth.py and that was to allow all hosts,
not just 127.0.0.1 (I commented out some lines)
if attributes['type'] == buffer('connect'):
# if attributes['ipaddress'] == buffer('127.0.0.1'):
# syslog('notice', 'authentication by IP address
succeeded')
return ( self.connectcodes['READPOST'], 1, 1, '*' )
# else:
# syslog('notice', 'authentication by IP address
failed')
# return ( self.connectcodes['PERMDENIED'], 0, 0, '!*'
)
made sure there weren't any awful syntax errors
$ python -ic 'import nnrpd, nnrpd_auth'
-- syslog level: notice message: nnrpd authentication class instance
created
** set_auth_hook for <nnrpd_auth.AUTH instance at 4a63b0>
-- syslog level: notice message: authentication module successfully
hooked into nnrpd
>>>
Reading to the newsgroup works fine, but posting results in the
following:
news.err log:
Sep 11 14:37:45 tcsl nnrpd[30642]: 172.16.48.12 cannot stat backoff_db
'': No such file or directory
No error is returned to the client, though I would expect to have seen
"Posting disallowed"
elif attributes['type'] == buffer('post'):
syslog('notice', 'authorization for post access failed')
return "Posting disallowed"
When there is no rejection string, i.e. return None, I still get the
cannot stat backoff_db error, but the post goes through fine.
/var/log/messages shows user process fault for nnrpd process when I
get that cannot stat backoff_db error
here is the news.notice log for more info than the news.err:
Sep 11 14:37:26 tcsl innd: SERVER shutdown received signal 15
Sep 11 14:37:26 tcsl innd: SERVER descriptors 1024
Sep 11 14:37:26 tcsl innd: SERVER outgoing 1011
Sep 11 14:37:26 tcsl innd: SERVER ccsetup control:12
Sep 11 14:37:26 tcsl innd: SERVER lcsetup localconn:14
Sep 11 14:37:26 tcsl innd: SERVER rcsetup remconn:4
Sep 11 14:37:26 tcsl innd: controlchan! spawned
controlchan!:17:proc:30636
Sep 11 14:37:26 tcsl innd: dummy-feed opened dummy-feed:16:file
Sep 11 14:37:26 tcsl innd: python interpreter initialized OK
Sep 11 14:37:26 tcsl innd: python: First load, so I can do
initialization stuff.
Sep 11 14:37:26 tcsl innd: python: spamfilter successfully hooked into
INN
Sep 11 14:37:26 tcsl innd: SERVER Python filtering enabled
Sep 11 14:37:26 tcsl innd: defined python methods
Sep 11 14:37:26 tcsl innd: SERVER starting
Sep 11 14:37:27 tcsl controlchan[30636]: starting
Sep 11 14:37:27 tcsl controlchan[30636]: loaded
$inn::controlprogs/checkgroups.pl
Sep 11 14:37:27 tcsl controlchan[30636]: loaded
$inn::controlprogs/ihave.pl
Sep 11 14:37:27 tcsl controlchan[30636]: loaded
$inn::controlprogs/senduuname.pl
Sep 11 14:37:27 tcsl controlchan[30636]: loaded
$inn::controlprogs/newgroup.pl
Sep 11 14:37:27 tcsl controlchan[30636]: loaded
$inn::controlprogs/rmgroup.pl
Sep 11 14:37:27 tcsl controlchan[30636]: loaded
$inn::controlprogs/sendme.pl
Sep 11 14:37:27 tcsl controlchan[30636]: loaded
$inn::controlprogs/sendsys.pl
Sep 11 14:37:27 tcsl controlchan[30636]: loaded
$inn::controlprogs/version.pl
Sep 11 14:37:39 tcsl nnrpd[30639]: python interpreter initialized OK
Sep 11 14:37:39 tcsl nnrpd[30639]: python: nnrpd authentication class
instance created
Sep 11 14:37:39 tcsl nnrpd[30639]: python: authentication module
successfully hooked into nnrpd
Sep 11 14:37:39 tcsl nnrpd[30639]: some python methods defined. good.
Sep 11 14:37:39 tcsl nnrpd[30639]: ? cant gethostbyaddr 172.16.48.12
Unknown host -- using IP address for access
Sep 11 14:37:39 tcsl nnrpd[30639]: 172.16.48.12 connect
Sep 11 14:37:39 tcsl nnrpd[30639]: python authenticate_method (type
connect) succeeded, return code 200
Sep 11 14:37:39 tcsl nnrpd[30639]: 172.16.48.12 times user 0.030
system 0.030 elapsed 0.029
Sep 11 14:37:39 tcsl nnrpd[30639]: python: close method running, bye!
Sep 11 14:37:41 tcsl nnrpd[30640]: python interpreter initialized OK
Sep 11 14:37:41 tcsl nnrpd[30640]: python: nnrpd authentication class
instance created
Sep 11 14:37:41 tcsl nnrpd[30640]: python: authentication module
successfully hooked into nnrpd
Sep 11 14:37:41 tcsl nnrpd[30640]: some python methods defined. good.
Sep 11 14:37:42 tcsl nnrpd[30640]: ? cant gethostbyaddr 172.16.48.12
Unknown host -- using IP address for access
Sep 11 14:37:42 tcsl nnrpd[30640]: 172.16.48.12 connect
Sep 11 14:37:42 tcsl nnrpd[30640]: python authenticate_method (type
connect) succeeded, return code 200
Sep 11 14:37:42 tcsl nnrpd[30640]: 172.16.48.12 times user 0.040
system 0.020 elapsed 0.030
Sep 11 14:37:42 tcsl nnrpd[30640]: python: close method running, bye!
Sep 11 14:37:45 tcsl nnrpd[30641]: python interpreter initialized OK
Sep 11 14:37:45 tcsl nnrpd[30641]: python: nnrpd authentication class
instance created
Sep 11 14:37:45 tcsl nnrpd[30641]: python: authentication module
successfully hooked into nnrpd
Sep 11 14:37:45 tcsl nnrpd[30641]: some python methods defined. good.
Sep 11 14:37:45 tcsl nnrpd[30641]: ? cant gethostbyaddr 172.16.48.12
Unknown host -- using IP address for access
Sep 11 14:37:45 tcsl nnrpd[30641]: 172.16.48.12 connect
Sep 11 14:37:45 tcsl nnrpd[30641]: python authenticate_method (type
connect) succeeded, return code 200
Sep 11 14:37:45 tcsl nnrpd[30641]: 172.16.48.12 times user 0.020
system 0.040 elapsed 0.029
Sep 11 14:37:45 tcsl nnrpd[30641]: python: close method running, bye!
Sep 11 14:37:45 tcsl nnrpd[30642]: python interpreter initialized OK
Sep 11 14:37:45 tcsl nnrpd[30642]: python: nnrpd authentication class
instance created
Sep 11 14:37:45 tcsl nnrpd[30642]: python: authentication module
successfully hooked into nnrpd
Sep 11 14:37:45 tcsl nnrpd[30642]: some python methods defined. good.
Sep 11 14:37:45 tcsl nnrpd[30642]: ? cant gethostbyaddr 172.16.48.12
Unknown host -- using IP address for access
Sep 11 14:37:45 tcsl nnrpd[30642]: 172.16.48.12 connect
Sep 11 14:37:45 tcsl nnrpd[30642]: python authenticate_method (type
connect) succeeded, return code 200
Sep 11 14:37:45 tcsl nnrpd[30642]: 172.16.48.12 cannot stat backoff_db
'': No such file or directory
Sep 11 14:37:49 tcsl nnrpd[30643]: python interpreter initialized OK
Sep 11 14:37:49 tcsl nnrpd[30643]: python: nnrpd authentication class
instance created
Sep 11 14:37:49 tcsl nnrpd[30643]: python: authentication module
successfully hooked into nnrpd
Sep 11 14:37:49 tcsl nnrpd[30643]: some python methods defined. good.
Thank you for any assistance!
Re: nnrpd error: cannot stat backoff_db '': No such file or directory?
Author: Jeffrey M. Vinocur
Date: Wed, 11 Sep 2002 19:56
Date: Wed, 11 Sep 2002 19:56
24 lines
1785 bytes
1785 bytes
In article <40a8aa92.0209111149.3f2501c3@posting.google.com>, Daniel <insaney@ufl.edu> wrote: >What causes the nnrpd error: cannot stat backoff_db '': No such file >or directory? >How can I fix it? Did you enable backoff in inn.conf? (That is, are you sure your changes to the python script are responsible for the above error.) If you're not sure, show us the output from running `grep backoff ~news/etc/inn.conf`. >RH 7.2 using inn-2.3.2-5 SRPM, but changed configure flag in spec from >--with-perl to --with-python and rebuilt... >With this I replaced my existing inn-2.3.2-5 Note that 2.3.3 is released, and I would definitely recommend using that over 2.3.2 even if you have to compile it yourself. -- Jeffrey M. Vinocur jeff@litech.org
Re: nnrpd error: cannot stat backoff_db '': No such file or directory?
Author: Russ Allbery
Date: Wed, 11 Sep 2002 20:03
Date: Wed, 11 Sep 2002 20:03
15 lines
1489 bytes
1489 bytes
Daniel <insaney@ufl.edu> writes:
> What causes the nnrpd error: cannot stat backoff_db '': No such file
> or directory?
> How can I fix it?
Remove whatever line that sets backoff_db or backoffdb in inn.conf and
readers.conf.
--
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: nnrpd error: cannot stat backoff_db '': No such file or directory?
Author: Daniel
Date: Thu, 12 Sep 2002 11:35
Date: Thu, 12 Sep 2002 11:35
43 lines
2599 bytes
2599 bytes
Hopefully this own't dupe, google was timing out. I didn't change any of the backoff_db stuff. Here's a grep backoff inn.conf backoffauth: false backoffdb: backoffk: 1 backoffpostfast: 0 backoffpostslow: 1 backofftrigger: 10000 blockbackoff: 120 I see there's no directory for backoffdb, which must be what is causing nnrpd to die when it can't find the backoff_db, but the man page for inn.conf says: Exponential posting backoff will not be enabled unless backoffdb is set and backoffpostfast and backoffpostslow are set to something other than their default values. Each one of these is set to the default, and there is no path provided for backoffdb. So exponential backoff is not supposed to be enabled. Reason I thought it might have something to do with --with-python nnrpd_auth.py was because when nnrppythonauth is false in inn.conf and I just use readers.conf I do not see the cannot stat backoff_db error. But I need nnrpd_auth, and that's when I get this error. Thanks for your time! ~ Daniel jeff@litech.org (Jeffrey M. Vinocur) wrote in message news:<alo75m$5kn$1@puck.litech.org>... > In article <40a8aa92.0209111149.3f2501c3@posting.google.com>, > Daniel <insaney@ufl.edu> wrote: > >What causes the nnrpd error: cannot stat backoff_db '': No such file > >or directory? > >How can I fix it? > > Did you enable backoff in inn.conf? (That is, are you sure your > changes to the python script are responsible for the above > error.) If you're not sure, show us the output from running > `grep backoff ~news/etc/inn.conf`.
Re: nnrpd error: cannot stat backoff_db '': No such file or directory?
Author: Russ Allbery
Date: Thu, 12 Sep 2002 14:46
Date: Thu, 12 Sep 2002 14:46
30 lines
2157 bytes
2157 bytes
Daniel <insaney@ufl.edu> writes:
> I didn't change any of the backoff_db stuff. Here's a grep backoff
> inn.conf
> backoffauth: false
> backoffdb:
> backoffk: 1
> backoffpostfast: 0
> backoffpostslow: 1
> backofftrigger: 10000
> blockbackoff: 120
> I see there's no directory for backoffdb, which must be what is
> causing nnrpd to die when it can't find the backoff_db, but the man
> page for inn.conf says:
> Exponential posting backoff will not be enabled unless
> backoffdb is set and backoffpostfast and backoffpostslow
> are set to something other than their default values.
I bet you've got some trailing whitespace or the like on the ends of those
lines. Double-check that; some versions of INN don't deal with that very
well.
--
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: nnrpd error: cannot stat backoff_db '': No such file or directory?
Author: Daniel
Date: Fri, 13 Sep 2002 14:27
Date: Fri, 13 Sep 2002 14:27
66 lines
3688 bytes
3688 bytes
Russ Allbery <rra@stanford.edu> wrote in message news:<yllm67tgdh.fsf@windlord.stanford.edu>... > I bet you've got some trailing whitespace or the like on the ends of those > lines. Double-check that; some versions of INN don't deal with that very > well. Thanks for the tip. I checked that and there was no whitespace on any of the backoff lines :(. I recompiled the SRPM with both --with-perl and --with-python this time, instead of just --with-python. No better luck. This is an example of me posting to a newsgroup as an authenticated/authorized user: news.notice ends with: Sep 13 10:09:52 tcsl nnrpd[7630]: python authorize_method (post access) succeeded, refusion string: <empty> Sep 13 10:09:52 tcsl nnrpd[7630]: python: nnrpd_auth.py close method running. Sep 13 10:09:54 tcsl nnrpd[7620]: python: nnrpd_auth.py close method running. The first line indicates success, if there is no refusion string (it returned None) the post is allowed. The second and third line show things dieing, but there's nothing more in the notice log. news.err: Sep 13 10:09:52 tcsl nnrpd[7630]: 172.16.48.12 cannot stat backoff_db '': No such file or directory /var/log/messages: Sep 13 10:09:52 tcsl kernel: User process fault: interruption code 0x10 Sep 13 10:09:52 tcsl kernel: failing address: CD5000 Sep 13 10:09:52 tcsl kernel: CPU: 0 Sep 13 10:09:52 tcsl kernel: Process innd (pid: 7583, stackpage=07B49000) Sep 13 10:09:52 tcsl kernel: Sep 13 10:09:52 tcsl kernel: User PSW: 070dd000 c01336a6 Tainted: P Sep 13 10:09:52 tcsl kernel: task: 07b48000 ksp: 07b49d00 pt_regs: 07b49f68 Sep 13 10:09:52 tcsl kernel: User GPRS: Sep 13 10:09:52 tcsl kernel: 00000000 401e2200 0066fb68 00000001 Sep 13 10:09:52 tcsl kernel: 00000002 0066fb68 006661f8 401e21e8 Sep 13 10:09:52 tcsl kernel: 005dab01 00644bec 401e21f8 401e21e8 Sep 13 10:09:52 tcsl kernel: c01e41dc c0132d54 c0132bf4 7fffeb00 Sep 13 10:09:52 tcsl kernel: User ACRS: Sep 13 10:09:52 tcsl kernel: 401fbf40 00000000 00000000 00000000 Sep 13 10:09:52 tcsl kernel: 00000000 00000000 00000000 00000000 Sep 13 10:09:52 tcsl last message repeated 2 times Sep 13 10:09:52 tcsl kernel: User Code: Sep 13 10:09:52 tcsl kernel: 58 15 60 04 16 13 50 15 60 04 a7 f4 00 48 58 a0 50 08 58 00 the article is left in /var/spool/news/incoming I might go ahead and try the latest release of innd from source, this shouldn't be happening, but I don't know how much of it might be due to the fact that this was originally a RH RPM that I added a --with-python to. Maybe a clean slate is what I need. ~ Daniel
Re: nnrpd error: cannot stat backoff_db '': No such file or directory?
Author: Daniel
Date: Fri, 13 Sep 2002 15:16
Date: Fri, 13 Sep 2002 15:16
17 lines
1893 bytes
1893 bytes
Okay... I didn't start fresh. I got rid of the python filters the RPM put there and no longer is nnrpd or innd dieing like it used to. The RPM installed both perl and python filters, but the SRPM's ./configure disallowed interpreting the python ones before. So when I added --with-python into the mix it was able to parse the installed python filters, which I think was causing my innd/nnrpd crashes. So now it's using the perl filters the RPM installed, and no python filters that were installed (because I removed them), but using nnrpd_auth.py instead of readers.conf... and it isn't dieing. I do sometimes see the can't stat error when posts are denied, but it's not killing the nnrpd or innd processes so I'm happy. The behavior is still what I want... use nnrpd_auth.py and don't use backoff... and don't die :). ~ Daniel
Re: nnrpd error: cannot stat backoff_db '': No such file or directory?
Author: Jeffrey M. Vinocur
Date: Sat, 14 Sep 2002 23:46
Date: Sat, 14 Sep 2002 23:46
18 lines
1581 bytes
1581 bytes
In article <40a8aa92.0209130716.7f21557@posting.google.com>, Daniel <insaney@ufl.edu> wrote: > >I do sometimes see the can't stat error when posts are denied, >but it's not killing the nnrpd or innd processes so I'm happy. I think I figured it out. Try commenting out the backoffdb: line entirely, instead of setting it to blank. (Russ, if I'm right...is this a bug?) -- Jeffrey M. Vinocur jeff@litech.org
Re: nnrpd error: cannot stat backoff_db '': No such file or directory?
Author: Russ Allbery
Date: Sun, 15 Sep 2002 00:05
Date: Sun, 15 Sep 2002 00:05
21 lines
1880 bytes
1880 bytes
Jeffrey M Vinocur <jeff@litech.org> writes:
> Daniel <insaney@ufl.edu> wrote:
>> I do sometimes see the can't stat error when posts are denied,
>> but it's not killing the nnrpd or innd processes so I'm happy.
> I think I figured it out.
> Try commenting out the backoffdb: line entirely, instead of
> setting it to blank.
> (Russ, if I'm right...is this a bug?)
Yeah, definitely, although one that's probably fixed with the new parser.
--
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: nnrpd error: cannot stat backoff_db '': No such file or directory?
Author: Jeffrey M. Vinocur
Date: Sun, 15 Sep 2002 16:33
Date: Sun, 15 Sep 2002 16:33
28 lines
1927 bytes
1927 bytes
In article <ylhegs15i3.fsf@windlord.stanford.edu>,
Russ Allbery <rra@stanford.edu> wrote:
>Jeffrey M Vinocur <jeff@litech.org> writes:
>
>> Try commenting out the backoffdb: line entirely, instead of
>> setting it to blank.
>
>> (Russ, if I'm right...is this a bug?)
>
>Yeah, definitely, although one that's probably fixed with the new parser.
I'm not sure, actually. I mean, if you have
backoffdb: ""
surely the parser treats that differently than no value at all.
Anyway, better safe than sorry, I'll commit this:
curaccess->backoff_db = NULL;
- if (innconf->backoffdb)
+ if (innconf->backoffdb && *innconf->backoffdb != '\0')
curaccess->backoff_db = COPY(innconf->backoffdb);
--
Jeffrey M. Vinocur
jeff@litech.org
Re: nnrpd error: cannot stat backoff_db '': No such file or directory?
Author: Russ Allbery
Date: Sun, 15 Sep 2002 17:15
Date: Sun, 15 Sep 2002 17:15
29 lines
2189 bytes
2189 bytes
Jeffrey M Vinocur <jeff@litech.org> writes:
> Russ Allbery <rra@stanford.edu> wrote:
>> Yeah, definitely, although one that's probably fixed with the new parser.
> I'm not sure, actually. I mean, if you have
> backoffdb: ""
> surely the parser treats that differently than no value at all.
Well, yeah, true. If you go out of your way to break it... :)
> Anyway, better safe than sorry, I'll commit this:
> curaccess->backoff_db = NULL;
> - if (innconf->backoffdb)
> + if (innconf->backoffdb && *innconf->backoffdb != '\0')
> curaccess->backoff_db = COPY(innconf->backoffdb);
Sounds good to me. ("" is arguably a valid directory equivalent to "." on
some platforms, but I don't think we need to worry about that.)
--
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: nnrpd error: cannot stat backoff_db '': No such file or directory?
Author: Jeffrey M. Vinocur
Date: Sun, 15 Sep 2002 17:36
Date: Sun, 15 Sep 2002 17:36
36 lines
2284 bytes
2284 bytes
In article <yl8z23fa3r.fsf@windlord.stanford.edu>,
Russ Allbery <rra@stanford.edu> wrote:
>Jeffrey M Vinocur <jeff@litech.org> writes:
>> Russ Allbery <rra@stanford.edu> wrote:
>
>>> Yeah, definitely, although one that's probably fixed with the new parser.
>
>> backoffdb: ""
>
>> surely the parser treats that differently than no value at all.
>
>Well, yeah, true. If you go out of your way to break it... :)
I'm assuming that's what you get if you run a 'backoffdb:'
through innupgrade. What does the new parser do with a key with
no value?
>> - if (innconf->backoffdb)
>> + if (innconf->backoffdb && *innconf->backoffdb != '\0')
>
>Sounds good to me. ("" is arguably a valid directory equivalent to "." on
>some platforms, but I don't think we need to worry about that.)
I thought pretty hard about that. Especially since the error
message is correct (failed to open '') if not entirely helpful.
But it's a really obscure usage in this instance (why would you
put your backoff database in "."?), and clearly it doesn't work
on a perfectly sane platform.
--
Jeffrey M. Vinocur
jeff@litech.org
Re: nnrpd error: cannot stat backoff_db '': No such file or directory?
Author: Russ Allbery
Date: Sun, 15 Sep 2002 17:51
Date: Sun, 15 Sep 2002 17:51
26 lines
2227 bytes
2227 bytes
Jeffrey M Vinocur <jeff@litech.org> writes:
> Russ Allbery <rra@stanford.edu> wrote:
>> Well, yeah, true. If you go out of your way to break it... :)
> I'm assuming that's what you get if you run a 'backoffdb:' through
> innupgrade. What does the new parser do with a key with no value?
Comments it out. The old parser was supposed to turn such keys into NULL,
but was rather inconsistent about it.
> But it's a really obscure usage in this instance (why would you put your
> backoff database in "."?), and clearly it doesn't work on a perfectly
> sane platform.
Yup, agreed. (Although in the sanity department, I think POSIX requires
that "" be equivalent to "." or some such thing. I forget the details; it
was a hack to make sure that operations on directory/ did what people
expected them to do.)
--
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.
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