Article delegate-en/812 of [1-5169] on the server localhost:119
  upper oldest olders older1 this newer1 newers latest
search
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]
[Reference:<3.0.5.32.20000512161836.007ec300@dekooi.nl>]
Newsgroups: mail-lists.delegate-en

[DeleGate-En] Re: nntp cacheing proxy
29 May 2000 04:59:48 GMT ysato@etl.go.jp (Yutaka Sato 佐藤豊)


Hi,

I dug a message from Gert-Jan out of my mail folder.  He noticed on the
error code (503) of timeout message from the server, which should be
recognized by NNTP-DeleGate to make "NNTP connection cache" work well.
I tested it like follows:

 % telnet newshost nntp
 Connected to newshost
 Escape character is '^]'.
 200 newshost InterNetNews NNRP server INN 2.2.2 13-Dec-1999 ready (posting ok).
 503 Timeout after 10 seconds, closing connection.
 Connection closed by foreign host.

 % telnet newshost nntp
 Connected to newshost
 Escape character is '^]'.
 200 newshost InterNetNews NNRP server INN 2.2.2 13-Dec-1999 ready (posting ok).
 help
 100 Legal commands
  authinfo user Name|pass Password|generic <prog> <args>
  ...
 Report problems to <usenet@news-server.etl.go.jp>
 .

 503 Timeout after 600 seconds, closing connection.
 Connection closed by foreign host.

Maybe there is no single common code to represent timeout occurred
in server, thus we should regard possible ones.  The code 503,
which is defined as "503 program fault - command not performed" in
RFC977, seems to be used in INN2.X on such timeout situations.
The enclosed patch, which is functionally the same with Gert-Jan's :-),
will cope with the problem.

Cheers,
Yutaka
--
Yutaka Sato <ysato@etl.go.jp> http://www.etl.go.jp/~ysato/   @ @ 
Computer Science Division, Electrotechnical Laboratory      ( - )
1-1-4 Umezono, Tsukuba, Ibaraki, 305-8568 Japan            _<   >_


*** ../../delegate6.1.11/src/nntp.c	Wed Jan 12 22:33:14 2000
--- nntp.c	Mon May 29 13:37:05 2000
***************
*** 3001,3007 ****
  		ns->ns_authERR = 1;
  	}
  
! 	if( code == 401 && QueueLeng == 0 ){
  		/* Connection is closed because the server has been idle for
  		 * long time. It is resumable closing caused by timeout
  		 * if command queue is empty (i.e. without pending status...)
--- 3001,3007 ----
  		ns->ns_authERR = 1;
  	}
  
! 	if( (code == 503 || code == 401) && QueueLeng == 0 ){
  		/* Connection is closed because the server has been idle for
  		 * long time. It is resumable closing caused by timeout
  		 * if command queue is empty (i.e. without pending status...)


In message <3.0.5.32.20000512161836.007ec300@dekooi.nl> on 05/12/00(23:18:36)
you Gert-Jan de Jonge <de_jonge@saturnus..nl> wrote:
 |--=====================_958133916==_
 |Content-Type: text/plain; charset="us-ascii"
 |
 |Hi ,
 |
 |I have been trying to find timeout problems as mentioned by me in the
 |news group. I think I have found a solution, but I wanted to send
 |it first to you instead of the newsgroup.
 |
 |As far as I can see, no nntpcc works correct on my news servers and
 |clients do not get disconnected.
 |
 |I made a patch agains delegate6.0.9 I only chagned one line so it
 |will propably work on every version.
 |
 |regards,
 |Gert-Jan de Jonge
 |
 |
 |--=====================_958133916==_
 |Content-Type: text/plain; charset="us-ascii"
 |Content-Disposition: attachment; filename="delegate-patch"
 |
 |--- delegate6.0.9/src/nntp.c    Wed Jan 12 14:33:13 2000
 |+++ ../delegate6.0.9/src/nntp.c Tue May  9 11:07:22 2000
 |@@ -3001,7 +3001,7 @@
 |                ns->ns_authERR = 1;
 |        }
 | 
 |-       if( code == 401 && QueueLeng == 0 ){
 |+       if( (code == 401 || code==503 ) && QueueLeng == 0 ){
 |                /* Connection is closed because the server has been idle for
 |                 * long time. It is resumable closing caused by timeout
 |                 * if command queue is empty (i.e. without pending status...)
 |
 |--=====================_958133916==_

  admin search upper oldest olders older1 this newer1 newers latest
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]
@_@V