Article View: news.software.nntp
Article #956Re: NEWSBIN/maint/newsdaily discards old NNTP input archives
From: Simon J Gerraty
Date: Wed, 06 Feb 1991 00:18
Date: Wed, 06 Feb 1991 00:18
73 lines
3429 bytes
3429 bytes
In <1991Feb5.022948.3952@melb.bull.oz.au> sjg@melb.bull.oz.au (Simon J. Gerraty) writes: >This seems to apply to both NNTP and C news so I'm posting to >both groups. >My site gets its news feed via NNTP over a rather slow, and >unreliable X.25 link. I have been for some time getting >reports from newsdaily about old input files named "nntp.annnn" >where nnnn is the pid of the NNTP daemon that created them. >NNTP normally converts these files to all numeric names so that >newsrun will inject them into News. Obviously on my system, >NNTP is occasionally (some times frequently) terminating without >doing this. >As destributed newsdaily reports the names of the old input >files and discards them. The following patch, reports the names >and converts them to numeric names. In most cases the batches >inject into News without problem. If they end up in >in.coming/bad you at least had a second bite at them :-) >Perhaps it would be useful to distribute this patch (or similar) >with NNTP as obviously not all sites use NNTP - just as not all >sites use C news. _Sorry_, there is an error in the patch. Once the nntp.aXXXX file is mv'd it is still older than one day and gets removed (how embarrassing :-) This is a corrected version. Also I decided (perhaps unwisely) to try and save nspool.aXXXX files as well. Also, one reader suggested that NNTP does not simply rename the temp batches. The NNTP-1.5.10 that I run does and then just kicks off newsrun to do the processing. Refer to enqueue() in server/batch.c *** newsdaily.orig Mon Feb 4 16:28:41 1991 --- newsdaily Wed Feb 6 10:48:33 1991 *************** *** 62,67 **** --- 62,84 ---- # look for input anomalies cd $NEWSARTS/in.coming + # + # first look for any nntp.a files that should be enqueued + # we have been throwing these away! + # + find . \( -name 'nntp.a*' -o -name 'nspool.a*' \) -mtime +1 -print >$tmp + if test -s $tmp # old nntp archives + then + ( + echo 'NNTP archives left about:' + cat $tmp + echo 'These have been injected to News' + ) >> $gripes + # Now inject them - convert them to numeric names + # they will all appear as 6666nnnn so we can recognize them + # if they turn up in the bad batches + sed 's,.*n.*\.a\(.*\),touch &; mv & 6666\1,' $tmp | /bin/sh + fi find . -type f -mtime +1 -print | sed 's;^\./;;' | egrep -v '^bad/' >$tmp if test -s $tmp # old non-bad files lying about then If you think the nspool.aXXXX bit is a bad idea leave the find command as: find . -name 'nntp.a*' -mtime +1 -print >$tmp -- Simon J. Gerraty <sjg@melb.bull.oz.au> #include <disclaimer,_witty_comment>
Technical Details
Message-ID:
<1991Feb6.001819.8966@melb.bull.oz.au>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp!utzoo!utgpu!watserv1!watmath!att!linac!pacific.mps.ohio-state.edu!zaphod.mps.ohio-state.edu!samsung!know!ladcgw.ladc.bull.com!melb.bull.oz.au!sjgReferences:
<1991Feb5.022948.3952@melb.bull.oz.au>Show Full Headers
Complete Article Headers
Message-ID: <1991Feb6.001819.8966@melb.bull.oz.au> Subject: Re: NEWSBIN/maint/newsdaily discards old NNTP input archives Date: Wed, 06 Feb 1991 00:18:19 +0000 From: sjg@melb.bull.oz.au (Simon J Gerraty) References: <1991Feb5.022948.3952@melb.bull.oz.au> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp!utzoo!utgpu!watserv1!watmath!att!linac!pacific.mps.ohio-state.edu!zaphod.mps.ohio-state.edu!samsung!know!ladcgw.ladc.bull.com!melb.bull.oz.au!sjg Newsgroups: news.software.nntp,news.software.b Organization: Bull HN Information Systems Australia. Lines: 72