1 Jan 2012 02:47
Invalid 431 response when server is paused
River Tarnell <river <at> RT.UK.EU.ORG>
2012-01-01 01:47:35 GMT
2012-01-01 01:47:35 GMT
Hi,
While working on some news software I noticed something odd from a peer:
Jan 01 01:36:18 INFO: feeder: unit0[2001:470:933e::5]:nntp: expected
msg-id <4efed3fb$0$30390$a8266bb1 <at> newsreader.readnews.com> but got 431
Expiring process 3697
This server is running:
200 news.unit0.net InterNetNews server INN 2.5.2 ready (transit mode)
The problem seems to be the code for handling a paused server state in
innd/nc.c:
} else if (Mode == OMpaused) {
cp->Check_deferred++;
xasprintf(&buff, "%d %s", NNTP_FAIL_CHECK_DEFER, ModeReason);
ModeReason is set to "Expiring process %ld" while server expiry is
running.
I tested this on my own server and was able to reproduce the problem:
isis# ctlinnd pause 'testing'
Ok
harmony% telnet isis 433
Trying 2a01:348:65::3...
Connected to isis.RT.UK.EU.ORG.
Escape character is '^]'.
(Continue reading)
Thanks.
>Incidentally, does the feeder you are speaking about properly handle
>the 400 response code innd gives when paused and TAKETHIS is used?
It will handle it, but only in the same way it handles any unexpected[0]
response: it will disconnect, wait about 60 seconds, then reconnect and
try again with the same message-id. At the moment I never send a
TAKETHIS without a prior CHECK, so if TAKETHIS <a <at> b> replies with 400,
the next command in the new connection will be CHECK <a <at> b>.
[0] By which I mean "not 239 or 439".
>And, more subtle, does it handle 501 response codes?
No. Or rather, it does the same thing as 400: it will try to re-send
the article later. So if the remote server is more strict about
> Is nnrpd's IHAVE "*really* slow"? (I have not benchmarked it; I ask
> in case you already compared it to innd's IHAVE and had figures.)
Compared to INN's IHAVE, I don't know. But it's definitely much slower
than streaming. (Perhaps someone should add streaming to nnrpd, and do
away with innd entirely
RSS Feed