Thread View: news.software.nntp
8 messages
8 total messages
Started by Fabien TASSIN
Tue, 23 Jul 1996 00:00
nnrpd and "strange" log entries (bug ?)
Author: Fabien TASSIN
Date: Tue, 23 Jul 1996 00:00
Date: Tue, 23 Jul 1996 00:00
64 lines
2616 bytes
2616 bytes
In the INN News daily report, I often have a lot of "Unknown entries from news
log file" :
Jul 15 17:24:00 news nnrpd[2263]: ? cant getpeername Connection reset by peer
Jul 15 17:24:00 news nnrpd[2263]: exit articles 0 groups 0
Jul 15 17:24:00 news nnrpd[2263]: times user 0.030 system 0.070 elapsed 0.013
In the last 2 lines, there's no hostname so the innlog script cannot understand
these lines.
The problem is in nnrpd. Follow the lines extracted from 1.4s (same as
unoff4).
in nnrpd/nnrpd.c :
STATIC void StartConnection(accesslist)
char *accesslist;
{
/* .... declarations ..... */
/* Get the peer's name. */
length = sizeof sin;
ClientAddr = NULL;
if (getpeername(STDIN, (struct sockaddr *)&sin, &length) < 0) {
if (!isatty(STDIN)) {
syslog(L_ERROR, "%s cant getpeername %m", "?");
Printf("%d I can't get your name. Goodbye.\r\n", NNTP_ACCESS_VAL);
ExitWithStats(1);
}
(void)strcpy(ClientHost, "stdin");
}
/* ...... */
}
the syslog() line produce :
Jul 15 17:24:00 news nnrpd[2263]: ? cant getpeername Connection reset by peer
ClientAddr stay NULL even inside ExitWithStats(). That's why there's no hostname
in the log file.
Follow my solution (to keep the log file clear) :
if (getpeername(STDIN, (struct sockaddr *)&sin, &length) < 0) {
if (!isatty(STDIN)) {
syslog(L_ERROR, "%s cant getpeername %m", "?");
===> (void)strcpy(ClientHost, "?");
Printf("%d I can't get your name. Goodbye.\r\n", NNTP_ACCESS_VAL);
ExitWithStats(1);
In fact, the "Printf" line isn't usefull because the connexion is already
closed. I really would like to know what's wrong with that kind of client
and how to find it/them.
[ note : INN-1.4xxx and Solaris 2.[4-5] ]
--
Fabien TASSIN - EERIE Nimes - CRI Rennes
tassin@eerie.fr - Fabien.Tassin@univ-rennes1.fr
Re: nnrpd and "strange" log entries (bug ?)
Author: Mike O'Connor
Date: Fri, 26 Jul 1996 00:00
Date: Fri, 26 Jul 1996 00:00
22 lines
1463 bytes
1463 bytes
In article <31F4D08C.46EF@eerie.fr>, Fabien TASSIN <tassin@eerie.fr> wrote: :In the INN News daily report, I often have a lot of "Unknown entries from news :log file" : : :Jul 15 17:24:00 news nnrpd[2263]: ? cant getpeername Connection reset by peer :Jul 15 17:24:00 news nnrpd[2263]: exit articles 0 groups 0 :Jul 15 17:24:00 news nnrpd[2263]: times user 0.030 system 0.070 elapsed 0.013 [...] :closed. I really would like to know what's wrong with that kind of client :and how to find it/them. My impression is that these are connections from sites which aren't properly mapped in the DNS -- reverses but no forwards. -- Michael J. O'Connor Internet: mjo@dojo.mi.org InterNIC WHOIS: MJO http://www.coast.net/~mjo "C'mon, Hobbes, if you lend me a buck I'll buy you a comic book." -Calvin
Re: nnrpd and "strange" log entries (bug ?)
Author: Fabien TASSIN
Date: Sat, 27 Jul 1996 00:00
Date: Sat, 27 Jul 1996 00:00
16 lines
1076 bytes
1076 bytes
Mike O'Connor wrote: > > :Jul 15 17:24:00 news nnrpd[2263]: ? cant getpeername Connection reset by peer > My impression is that these are connections from sites which aren't > properly mapped in the DNS -- reverses but no forwards. so, there's no way to find theses sites.. isn't it ? -- Fabien TASSIN - EERIE Nimes - CRI Rennes tassin@eerie.fr - Fabien.Tassin@univ-rennes1.fr
Re: nnrpd and "strange" log entries (bug ?)
Author: Tang Chee Kin
Date: Tue, 30 Jul 1996 00:00
Date: Tue, 30 Jul 1996 00:00
41 lines
2335 bytes
2335 bytes
Mike O'Connor (mjo@dojo.mi.org) wrote:
: In article <31F4D08C.46EF@eerie.fr>, Fabien TASSIN <tassin@eerie.fr> wrote:
: :In the INN News daily report, I often have a lot of "Unknown entries from news
: :log file" :
: :
: :Jul 15 17:24:00 news nnrpd[2263]: ? cant getpeername Connection reset by peer
: :Jul 15 17:24:00 news nnrpd[2263]: exit articles 0 groups 0
: :Jul 15 17:24:00 news nnrpd[2263]: times user 0.030 system 0.070 elapsed 0.013
: [...]
: :closed. I really would like to know what's wrong with that kind of client
: :and how to find it/them.
: My impression is that these are connections from sites which aren't
: properly mapped in the DNS -- reverses but no forwards.
:
: --
: Michael J. O'Connor Internet: mjo@dojo.mi.org
: InterNIC WHOIS: MJO http://www.coast.net/~mjo
: "C'mon, Hobbes, if you lend me a buck I'll buy you a comic book." -Calvin
Hi.. me too over at my site. I suspect it is the DNS entries according to
the FAQ. However, on our site, we do not use DNS. How do u eliminate such
error ?
Note: only the server uses DNS but it only has one entry that points its
to the feeder. We uses the /etc/hosts to contain all our gateways ip
addresses only(not all the individual PC, Mac, etc).
--
-----
/) Tel: 065-8691326 | SONY Precision (\
// Fax: 065-8691304 \|/ Engineering Center \\
*[XXXXX|}:>>>>>>>>>>>>>>>>>>>>>> --*-- <<<<<<<<<<<<<<<<<<<<<<<:{|XXXXX]*
\\ Software Engineering /|\ 52 Tuas Avenue 9 //
\) Department | Singapore 639193 (/
Email : cheekin@swl.spec.sony.com.sg
Re: nnrpd and "strange" log entries (bug ?)
Author: Rob Allen
Date: Wed, 31 Jul 1996 00:00
Date: Wed, 31 Jul 1996 00:00
31 lines
1789 bytes
1789 bytes
On 30 Jul 1996 03:09:37 GMT, cheekin@flash (Tang Chee Kin) wrote: >: :Jul 15 17:24:00 news nnrpd[2263]: ? cant getpeername Connection reset by peer >: :Jul 15 17:24:00 news nnrpd[2263]: exit articles 0 groups 0 >: :Jul 15 17:24:00 news nnrpd[2263]: times user 0.030 system 0.070 elapsed 0.013 >: [...] >: :closed. I really would like to know what's wrong with that kind of client >: :and how to find it/them. > >: My impression is that these are connections from sites which aren't >: properly mapped in the DNS -- reverses but no forwards. >: > >Hi.. me too over at my site. I suspect it is the DNS entries according to >the FAQ. However, on our site, we do not use DNS. How do u eliminate such >error ? > >Note: only the server uses DNS but it only has one entry that points its >to the feeder. We uses the /etc/hosts to contain all our gateways ip >addresses only(not all the individual PC, Mac, etc). I have written a few extra line in /etc/news/innlog.awk to take care of most of these errors, and report them in a readable manner with news.daily... If you would like to have the changes just email... -Rob roba@ntscom.com
Re: nnrpd and "strange" log entries (bug ?)
Author: Jacques Caron
Date: Fri, 02 Aug 1996 00:00
Date: Fri, 02 Aug 1996 00:00
39 lines
2136 bytes
2136 bytes
In article <31F4D08C.46EF@eerie.fr>, Fabien TASSIN <tassin@eerie.fr> wrote:
>In the INN News daily report, I often have a lot of "Unknown entries from news
>log file" :
>
>Jul 15 17:24:00 news nnrpd[2263]: ? cant getpeername Connection reset by peer
>Jul 15 17:24:00 news nnrpd[2263]: exit articles 0 groups 0
>Jul 15 17:24:00 news nnrpd[2263]: times user 0.030 system 0.070 elapsed 0.013
Same at my place, but I get "Operation not supported" insteead of
"Connection reset by peer"... Probably some difference in getpeername
between Solaris and FreeBSD...
[thanks for the patch].
>In fact, the "Printf" line isn't usefull because the connexion is already
>closed. I really would like to know what's wrong with that kind of client
>and how to find it/them.
So would I... Maybe clients aborting a connection that takes too long to
start (during a renumber or other such ctlinnd-generated long operations,
for instance, innd does not handle new connections)... When innd handles
these connections again, and passes them to nnrpd, it finally gets only
half-closed sockets, all grouped together in a few seconds...
>[ note : INN-1.4xxx and Solaris 2.[4-5] ]
INN-1.4xxx and FreeBSD 2.1.0.
Jacques.
--- Jacques Caron - Pressicom - jcaron@pressimage.net
Mail: 5/7 rue Raspail - 93108 Montreuil Cedex - France
Tel: +33 (1) 49 88 63 56 - Fax: +33 (1) 49 88 63 64
Planete.net: Bordeaux, Lille, Lyon, Marseille, Montreuil,
Nancy, Nantes, Rouen et Toulouse - http://www.planete.net
Re: nnrpd and "strange" log entries (bug ?)
Author: Tomasz R Surmacz
Date: Mon, 05 Aug 1996 00:00
Date: Mon, 05 Aug 1996 00:00
33 lines
1805 bytes
1805 bytes
Jacques Caron (jcaron@pressimage.net) wrote: :| In article <31F4D08C.46EF@eerie.fr>, Fabien TASSIN <tassin@eerie.fr> wrote: :| >In the INN News daily report, I often have a lot of "Unknown entries from news :| >log file" : :| > :| >Jul 15 17:24:00 news nnrpd[2263]: ? cant getpeername Connection reset by peer :| >Jul 15 17:24:00 news nnrpd[2263]: exit articles 0 groups 0 :| >Jul 15 17:24:00 news nnrpd[2263]: times user 0.030 system 0.070 elapsed 0.013 From my experience it seems that it happens mainly to dialup ppp/slip connections to ISPs which do not provide reverse DNS for such addresses. Not logging the hostname by nntpd is a bug in my opinion (it could log 'UNKNOWN' if it cannot get the name) as it breaks the log analyzing scripts used by news.daily. Anybody got fix for this? :| >[ note : INN-1.4xxx and Solaris 2.[4-5] ] :| INN-1.4xxx and FreeBSD 2.1.0. I would say inn-1.4* on all systems. Tomasz -- _________ (_ _' __) Tomasz R. Surmacz *-* E-mail: ts@apk.net, tsurmacz@ict.pwr.wroc.pl | (__ \ http://www.ict.pwr.wroc.pl/~tsurmacz/ *----* Home: ts@wroc.apk.net |__(____/ For PGP key finger tsurmacz@asic.ict.pwr.wroc.pl *---* irc: TomekS
Re: nnrpd and "strange" log entries (bug ?)
Author: Fabien TASSIN
Date: Tue, 06 Aug 1996 00:00
Date: Tue, 06 Aug 1996 00:00
54 lines
2497 bytes
2497 bytes
Tomasz R Surmacz wrote:
>
> :| >Jul 15 17:24:00 news nnrpd[2263]: ? cant getpeername Connection reset by peer
> :| >Jul 15 17:24:00 news nnrpd[2263]: exit articles 0 groups 0
> :| >Jul 15 17:24:00 news nnrpd[2263]: times user 0.030 system 0.070 elapsed 0.013
>
> From my experience it seems that it happens mainly to dialup ppp/slip
> connections to ISPs which do not provide reverse DNS for such addresses.
> Not logging the hostname by nntpd is a bug in my opinion (it could log
> 'UNKNOWN' if it cannot get the name) as it breaks the log analyzing
> scripts used by news.daily.
>
> Anybody got fix for this?
yes.
This will be corrected in INN 1.5 (thanx to ISC)
My small patch for INN 1.4* (to keep the log clean):
$ diff -c nnrpd/nnrpd.c.orig nnrpd/nnrpd.c
*** nnrpd.c.orig Tue Jul 23 11:26:56 1996
--- nnrpd.c Tue Jul 23 11:34:09 1996
***************
*** 4,9 ****
--- 4,16 ----
** This server doesn't do any real load-limiting, except for what has
** proven empirically necesary (i.e., look at GRPscandir).
*/
+
+
+ /* Changed by Fabien TASSIN (tassin@eerie.fr)
+ ** - problem with ClientAddr when getpeername() returns < 0
+ ** in StartConnect()
+ */
+
#define MAINLINE
#include <signal.h>
#include "nnrpd.h"
***************
*** 368,373 ****
--- 375,381 ----
if (getpeername(STDIN, (struct sockaddr *)&sin, &length) < 0) {
if (!isatty(STDIN)) {
syslog(L_ERROR, "%s cant getpeername %m", "?");
+ (void)strcpy(ClientHost, "?");
Printf("%d I can't get your name. Goodbye.\r\n", NNTP_ACCESS_VAL);
ExitWithStats(1);
}
--
Fabien TASSIN - EERIE Nimes - CRI Rennes
tassin@eerie.fr - Fabien.Tassin@univ-rennes1.fr
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads