Article delegate-en/1029 of [1-5169] on the server localhost:119
  upper oldest olders older1 this newer1 newers latest
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]
Newsgroups: mail-lists.delegate-en

[DeleGate-En] Re: endless loop accessing News
20 Feb 2001 17:50:25 GMT (Yutaka Sato 佐藤豊)

Hi Steffen,

In message on 02/16/01(22:15:34) you Steffen Kaiser wrote:
 |On Fri, 16 Feb 2001, Yutaka Sato wrote:
 |Hello Yukato,

My name is Yutaka :p

 |... I'm replying directly, but through the list. I
 |don't want to let anybody of the universe download the log file ... .

And I'm replying to the list erasing the URL and etc, which contain
very useful information (thank you) to locate the problem(s).

First of all, problems were in DeleGate. The newsserver at Netscape
did nothing bad.

a. when merging multiple NNTP servers, DeleGate does not send initial
 command to any server until receiving opening messages (200 ... ready)
 from all of servers.
b. one server (on your site) timeouts in 10 seconds waiting an initial
 command from client (DeleGate in this case), and disconnect
 (sending 503 Timeout).
c. the Netscape server takes several seconds, possibly over 10 seconds,
 to send opening message when connected from your host.  The response
 seems to become slower when multiple NNTP-DeleGate processes are
 running parallelly on you host (possibly for retrying)
d. when DeleGate receives "503 Timeout" from a server, it tries to
 reconnect the server on demand if possible (when no pending request)
e. this retrial does not work before all of opening messages done.
 It make NNTP-DeleGate start initialization (DO_INIT) leaving
 unprocessed opening messages from servers not responding by the time.
f. the problem become more complex when non-responding server is
 with a filter (like FSV). Closing and opening new file descriptors
 to reconnect a server makes disconnection to another server with
 a filter, and file descriptor jamming.

The enclosed patch fixes a. by sending DATE command as an initial
command right after opening message, and f. by avoiding to close
filter process for a connection to another server.

Yutaka Sato <>   @ @ 
Computer Science Division, Electrotechnical Laboratory            ( - )
1-1-4 Umezono, Tsukuba, Ibaraki, 305-8568 Japan                  _<   >_

*** ../../delegate7.0.1/src/nntp.c	Thu Jan 25 20:28:36 2001
--- nntp.c	Wed Feb 21 02:15:34 2001
*** 3020,3025 ****
--- 3020,3032 ----
  	code = atoi(line);
  	if( code == 200 || code == 201 ){
+ 		if( 1 < nservers_remote() ){
+ 			char resp[256];
+ 			fprintf(ns->ns_wfp,"DATE\r\n");
+ 			fflush(ns->ns_wfp);
+ 			fgetsFS(resp,sizeof(resp),fs);
+ 			sv1log("#DATE> %s",resp);
+ 		}
  		if( nservers_remote() != 1 )
  			return 0;
*** 4443,4449 ****
--- 4450,4461 ----
  	NewsServer *ns;
  	if( ns->ns_wfp ){
+ 		Connection *Conn = ns->ns_Conn;
+ 		if( fileno(ns->ns_wfp) == ToS ){
+ 		}else{
+ 		/* don't close filter for another server */
+ 		}
  		fclose(ns->ns_wfp); ns->ns_wfp = NULL;
  		fclose(ns->ns_rfp); ns->ns_rfp = NULL;

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