[news.software.anu-news] Unable to use NNTP_TCPCMU

CCTR117@CANTERBURY.AC.NZ (Bryan Lawrence, CSC, Canterbury) (09/14/89)

Hi folks
     
I am presently trying to bring up the NNTP server/client stuff using TCP
as the connection layer (as I have to serve some unix systems).
     
We are running V5.8A news on Version 5.0-2 VMS.
     
My problem is that nothing will connect with my NNTP_TCPCMU port. If I compile
the code with DEBUG the logfile is modified, but nothing is written it. In this
case the client fails with
     
CANTVA_cc_1> r nntp_client
Node: cantva
Channel (TCP or DECNET)? [DECNET]: tcp
%NONAME-E-NOMSG, Message number 086380F2
%SYSTEM-F-ABORT, abort
     
a telnet/port=119 hangs, failing to make a connection.
     
If I dont compile the code with debug, and it doesnt try and write the log file
telnet will connect to the port (but see no response), and the client fails
with
     
CANTVA_cc_1> r nntp_client
Node: cucom
Channel (TCP or DECNET)? [DECNET]: tcp
%SYSTEM-F-ABORT, abort
     
Can anyone tell me
	1) why I cant get anything written to the log file,
 and/or	2) why it wont work.
     
The tcp$newsrv image is installed with SYSPRV and SYSNAM, and all the files
have w:rwe access (at least while I am debugging). I should add that I am
currently successfully operating as a TCP CLIENT of the Unix node which i want
to TCP SERVE.
     
... help ...
     
Bryan Lawrence
-------------------------------------------------------------------------------
[person with weird job description > Consultant := Programmer/Analyst]
Mail: Computer Services Centre,  University of Canterbury,  Christchurch,  N.Z.
Internet: b.lawrence@canterbury.ac.nz  Fax:(64)(3)642 999 Phone: (64)(3)642 336
-------------------------------------------------------------------------------

LUSGR@VAX1.CC.LEHIGH.EDU (STEVE ROSEMAN) (09/14/89)

>From: Geoff Huston <munnari!csc.anu.oz.au!gih900%UUNET.UU.NET@VM1.NoDak.EDU>
>Subject: RE: Unable to use NNTP_TCPCMU
     
>If anyone has a version of the NNTP_TCPCMU code which does make a successful
>call to TCP$INFO I'd be pleased to see it!!
>
>
>cheers,
>
>Geoff Huston
>gih900@csc.anu.oz.au
>
     
Here is a message I sent to Geoff this morning.  It includes the NNTP fixes we
have, including what I posted last week.
     
----------------------
     
Geoff,
     
	Did you see what I posted last week?  It follows this message.
     
	In addition, I have had to fix the following (in V5.8a).
     
	1.  In NNTP_TCPCMU, there are some  #ifdef DEBUG  statements, instead
	of #if DEBUG.  This causes some of the logging to be done all of the
	time (lots of sys$system:sys$error and sys$output files.)  (I am still
        getting the files, but at least they are empty.  There are other
	routines which 'may' write messages, so the files are still getting
	created.  Just no more 80k blocks in 1 week...)
     
	2. In NNTP_FEED, I changed the "YCMND" command sent out to the other
	end to a "STAT" command.  The 3b15 we are feeding was filling up it's
	error log from the bad commands.
     
	3. Also in NNTP_FEED, I changed the new_open_chan[20] to [32], as
	someone suggested to me at 5.7.  Otherwise, NNTP was opening a new
	connection for each message.
     
	4. Finally, I changed NNTP_MAX_OFFER to 10000 from 100.  I was hitting
	max messages sent (or whatever), feeding the 3b15.
     
Steve
     
------
X-NEWS: vax1.cc.lehigh.edu news.software.anu-news: 191
     
In article <ANU-NEWS%89083116270220@NDSUVM1>, LUSGR@VAX1.CC.LEHIGH.EDU (STEVE
 ROSEMAN) writes:
> I am trying to install News 5.8 with the 5.8A patches on a VAXstation 3100
> running VMS 5.1-B, Vax C 3.0, and CPU/TEK TCP/IP V6.4.  With the various
> fixes (changes of 1 << PRV$V to PRV$M, copy v5maildef.h, etc.), I got
> everything compiled, and NEWS seems to work.
>
> However, when I try to connect to the server (via TELNET/port=119,
> NNTP_FEED, or using the NNTP_CLIENT), the connection opens, the disk
> drive defined as NEWS_ROOT is accessed a few times, and the connection
> closes.
> ...
     
Well, the following changes seem to fix the problems.  The first was a
misplaced io status check, the second problems with the getremhost code.
     
************
File LU$LIB:[ANU_V5P8.NEWS.NEWS_SRC]NNTP_TCPCMU.C;6
  234       cks(sys$qiow(0,f,IO$_CREATE,iosb,0,0,0,0,119,0,0,0));
  235       cks(*i_o_sts);
  236       return(1);
******
File LU$LIB:[ANU_V5P8.NEWS.NEWS_SRC]NNTP_TCPCMU.C-SAV;1
  234       cks(*i_o_sts);
  235       cks(sys$qiow(0,f,IO$_CREATE,iosb,0,0,0,0,119,0,0,0));
  236       return(1);
************
************
File LU$LIB:[ANU_V5P8.NEWS.NEWS_SRC]NNTP_TCPCMU.C;6
  267       short fill_0;
  268       unsigned short fport;
******
File LU$LIB:[ANU_V5P8.NEWS.NEWS_SRC]NNTP_TCPCMU.C-SAV;1
  267       unsigned short fport;
************
************
File LU$LIB:[ANU_V5P8.NEWS.NEWS_SRC]NNTP_TCPCMU.C;6
  282
 cks(sys$qiow(0,f,IO$_MODIFY,iosb,0,0,&info_buffer,sizeof(info_buffer),0,0,0,0))
 ;
  283           cks(*i_o_sts);
******
File LU$LIB:[ANU_V5P8.NEWS.NEWS_SRC]NNTP_TCPCMU.C-SAV;1
  281           cks(sys$qiow(0,f,IO$_MODIFY,iosb,0,0,&info_buffer,26,0,0,0,0));
  282           cks(*i_o_sts);
************
     
Number of difference sections found: 3
Number of difference records found: 4
     
DIFFERENCES /IGNORE=()/MERGED=1/OUTPUT=LU$LIB:[ANU_V5P8.NEWS.NEWS_BUILD]A.A;1-
    LU$LIB:[ANU_V5P8.NEWS.NEWS_SRC]NNTP_TCPCMU.C;6-
    LU$LIB:[ANU_V5P8.NEWS.NEWS_SRC]NNTP_TCPCMU.C-SAV;1
     
Steve
     
--
-------------------------------------------------------------------------
Steve Roseman
Lehigh University Computing Center
LUSGR@VAX1.CC.Lehigh.EDU

gih900@UUNET.UU.NET (Geoff Huston) (09/15/89)

There have been a number of recent mail messages re problems with NNTP and the
CMU/Tek implementation of TCP, including:
     
> Can anyone tell me
>	1) why I cant get anything written to the log file,
> and/or	2) why it wont work.
>
     
Some answers on this, as I had the same problem locally.....
     
a) make sure that the WKS: entry in the config file gives SYSPRV to the server
process.
     
b) (and this is the real fix!!) change NNTP_TCPCMU as follows:
     
b1- set DEBUG to 0 (or remove the whole DEBUG conditional compiled code) -
there's a bug in the first attempt to write out the current time which causes
an accvio inside main().
     
b2- the call to getremhost is not healthy - It worked originally, and then
caused problems -- after looking at the CMU definitions of the relevant arg
blocks it mucks around with aligned fields within the info record. The easiest
solution is to rip all that code out and replace it with the following:...
     
/*
 *  getremhost
 *
 *  Return the remote host name
 */
     
getremhost(remhost,remuser,unit)
    char *remhost, *remuser;
    int unit;
{
  if (remhost) strcpy(remhost,"tcp");
  if (remuser) strcpy(remuser,"nntp");
}
     
If anyone has a version of the NNTP_TCPCMU code which does make a successful
call to TCP$INFO I'd be pleased to see it!!
     
     
cheers,
     
Geoff Huston
gih900@csc.anu.oz.au

gih900@UUNET.UU.NET (Geoff Huston) (09/15/89)

In answer to Steve Roseman's mail
     
>	In addition, I have had to fix the following (in V5.8a).
>
>	1.  In NNTP_TCPCMU, there are some  #ifdef DEBUG  statements, instead
>	of #if DEBUG.  This causes some of the logging to be done all of the
>	time (lots of sys$system:sys$error and sys$output files.)  (I am still
>        getting the files, but at least they are empty.  There are other
>	routines which 'may' write messages, so the files are still getting
>	created.  Just no more 80k blocks in 1 week...)
     
I looked at my versions of this and I couldn't see this - more than likely I
made the changes a while ago and have long since forgotten!
     
>	2. In NNTP_FEED, I changed the "YCMND" command sent out to the other
>	end to a "STAT" command.  The 3b15 we are feeding was filling up it's
>	error log from the bad commands.
     
Good idea - also make the same change in NEWSREMCLIENT.C - the intent of
sending a command was simply to ping the server to see if it was still there
and hadn't timed out - any command with a 1 line output which does not change
the context of the server is fine.
     
>	3. Also in NNTP_FEED, I changed the new_open_chan[20] to [32], as
>	someone suggested to me at 5.7.  Otherwise, NNTP was opening a new
>	connection for each message.
     
My version has this set to 128
     
>	4. Finally, I changed NNTP_MAX_OFFER to 10000 from 100.  I was hitting
>	max messages sent (or whatever), feeding the 3b15.
     
Again here I'm using 500 in the distributed code - 10000 is a bit high!
     
As to the suggested alterations:...
     
>************
>File LU$LIB:[ANU_V5P8.NEWS.NEWS_SRC]NNTP_TCPCMU.C;6
>  234       cks(sys$qiow(0,f,IO$_CREATE,iosb,0,0,0,0,119,0,0,0));
>  235       cks(*i_o_sts);
>  236       return(1);
>******
>File LU$LIB:[ANU_V5P8.NEWS.NEWS_SRC]NNTP_TCPCMU.C-SAV;1
>  234       cks(*i_o_sts);
>  235       cks(sys$qiow(0,f,IO$_CREATE,iosb,0,0,0,0,119,0,0,0));
>  236       return(1);
>************
     
agreed
     
but the next one is still doen't work for me at the moment... I looked at
network.req for the definition of the info block, and it looked like some of
the fields have to be fullword aligned, which is more a matter of luck with
the compiler options more than design of the code round here!!
     
************
File LU$LIB:[ANU_V5P8.NEWS.NEWS_SRC]NNTP_TCPCMU.C;6
  267       short fill_0;
  268       unsigned short fport;
******
File LU$LIB:[ANU_V5P8.NEWS.NEWS_SRC]NNTP_TCPCMU.C-SAV;1
  267       unsigned short fport;
************
     
>************
>File LU$LIB:[ANU_V5P8.NEWS.NEWS_SRC]NNTP_TCPCMU.C;6
>  282
>
 cks(sys$qiow(0,f,IO$_MODIFY,iosb,0,0,&info_buffer,sizeof(info_buffer),0,0,0,0))
> ;
>  283           cks(*i_o_sts);
>******
>File LU$LIB:[ANU_V5P8.NEWS.NEWS_SRC]NNTP_TCPCMU.C-SAV;1
>  281           cks(sys$qiow(0,f,IO$_MODIFY,iosb,0,0,&info_buffer,26,0,0,0,0));
>  282           cks(*i_o_sts);
>************
     
agreed
     
     
Geoff Huston
gih900@csc.anu.oz.au