[leafnode-list] tin: "Can't retrieve active" with 1.9.49.rel + 1.9.51.rel
Matthias Andree
matthias.andree at gmx.de
Wed Mar 31 18:10:53 CEST 2004
Martin Klaiber schrieb am 2004-03-31:
> > Are you running tin in NNTP mode?
>
> This means, I'm not reading from the spool? Yes.
OK.
> > I have just tried tin
>
> Which version?
Sorry, 1.6.2.
> Ok, there are some differences in the syslog. First the output of
> leafnode-1.9.51.rel (with tin-1.5.12):
> | Mar 31 16:45:30 wallace leafnode[13651]: connect from localhost (127.0.0.1) to localhost (127.0.0.1) (my fqdn: martinkl.dialup.fu-berlin.de)
> | Mar 31 16:45:30 wallace leafnode[13651]: rereading /var/spool/news/leaf.node/groupinfo
> | Mar 31 16:45:34 wallace leafnode[13651]: <LIST
> | Mar 31 16:45:34 wallace leafnode[13651]: >215 Newsgroups in form "group high low flags".
Looks bogus. Where's the "MODE READER" log line? I have this - with
tin-1.6.2 and leafnode-1.9.51.rel. Just tried it.
> That's it. Nothing more.
>
> And now the output of leafnode-1.9.43.rel with the same tin-version:
> | Mar 31 16:55:31 wallace leafnode[13959]: connect from localhost (127.0.0.1) to localhost (127.0.0.1) (my fqdn: martinkl.dialup.fu-berlin.de)
> | Mar 31 16:55:31 wallace leafnode[13959]: rereading /var/spool/news/leaf.node/groupinfo
> | Mar 31 16:55:35 wallace leafnode[13959]: <MODE READER
> | Mar 31 16:55:35 wallace leafnode[13959]: >200 Leafnode 1.9.43.rel, pleased to meet you!
> | Mar 31 16:55:35 wallace leafnode[13959]: <XOVER
> | Mar 31 16:55:35 wallace leafnode[13959]: >412 Use the GROUP command first
> | Mar 31 16:55:35 wallace leafnode[13959]: <LIST overview.fmt
> | Mar 31 16:55:35 wallace leafnode[13959]: >215 information follows
> | Mar 31 16:55:35 wallace leafnode[13959]: <LIST
> | Mar 31 16:55:35 wallace leafnode[13959]: >215 Newsgroups in form "group high low flags".
> | Mar 31 16:55:40 wallace leafnode[13959]: <GROUP bln.announce.fub
> | Mar 31 16:55:40 wallace leafnode[13959]: >211 1 283 283 bln.announce.fub group selected
It's interesting to see that there is no MODE READER or related stuff in
the 1.9.51 logs.
Did you really use debugmode = 3 on either version?
If you did, I have no idea what might be the problem. Could you try the
attached Perl program, run it as
perl delayforward.pl -P 119 -M localhost -l -d0 -p 2120 -m localhost >log
and then connect rtin to port 2120 (choose anything you like). This runs
a trivial TCP proxy that can do nothing but to delay and to log
connections. -d0 switches the delay off :)
Cheers,
Matthias
-------------- next part --------------
#! /usr/bin/perl -w
use Getopt::Std;
use Socket;
use Fcntl;
use IO::Handle;
use strict;
use Carp;
sub treatint() { print STDERR "caught interrupt\n";
close(SO); close(SI); close(SL); confess; };
$SIG{INT} = $SIG{TERM} = 'treatint';
sub opts() { return "d:p:P:m:M:l"; };
sub usage() {
print <<EOF;
Usage: $0 [options]
options are:
-p local port
-P remote port
-l log
-m local machine name
-M remote machine name
-d delay
EOF
exit 1;
}
my %args;
getopts("p:P:m:M:d:l", \%args) || die usage();
my $lport = $args{p} || 0;
my $rport = $args{P};
my $lhost = $args{m} || "0.0.0.0";
my $rhost = $args{M};
my $delay = $args{d} || 0.25;
my $log = $args{l};
my $timeout = 30;
my $proto = getprotobyname('tcp') or die "cannot get tcp number: $!";
my $rcvbuf = 4096;
sub cpy($$$) {
my ($ff, $ft, $logpfx) = @_;
my $l = sysread($ff, my $data, $rcvbuf);
die "sysread: $!" unless defined $l;
if ($logpfx) { print $logpfx, $data; }
my $w = syswrite($ft, $data, $l);
die "syswrite: $!" unless $w == $l;
return $l;
}
sub delay() {
select(undef,undef,undef,$delay);
}
socket(SL, PF_INET, SOCK_STREAM, $proto) or die "socket: $!";
my $sin = sockaddr_in($lport,scalar gethostbyname($lhost));
bind(SL,$sin) or die "bind: $!";
{
my ($listp, $listh) = unpack_sockaddr_in(getsockname(SL));
printf STDERR "listening on %s port %d\n", inet_ntoa($listh), $listp;
}
listen(SL,5) or die "listen: $!";
setsockopt SL,SOL_SOCKET,SO_REUSEADDR,1 or die "setsockopt: $!";
while (1) {
my ($rin, $rout) = ('','');
vec($rin, fileno(SL), 1) = 1;
select($rout=$rin, undef, undef, undef) or die "select: $!";
my $sout = sockaddr_in($rport,scalar gethostbyname($rhost));
{
my ($listp, $listh) = unpack_sockaddr_in($sout);
printflush
STDERR sprintf "connecting to %s port %d...",
inet_ntoa($listh), $listp;
}
socket(SO, PF_INET, SOCK_STREAM, $proto) or die "socket: $!";
delay();
connect(SO, $sout) or die "connect: $!";
print STDERR "done\n";
accept(SI,SL) or die "accept: $!";
{
my ($listp, $listh) = unpack_sockaddr_in(getpeername(SI));
printf STDERR "connect from %s port %d\n", inet_ntoa($listh), $listp;
}
delay();
my $run = 1;
($rin, $rout) = ('','');
vec($rin, fileno(SI), 1) = 1;
vec($rin, fileno(SO), 1) = 1;
while ($run) {
my ($nfound, $timeleft) = select($rout=$rin, undef, undef, $timeout);
last unless $nfound; # timeout
delay();
if (vec($rout, fileno(SI), 1)) { # got input on SI
if (!cpy(\*SI, \*SO, $log ? "<" : "")) {
$run = 0;
}
next;
}
if (vec($rout, fileno(SO), 1)) { # got input on SO
if (!cpy(\*SO, \*SI, $log ? ">" : "")) {
$run = 0;
}
next;
}
}
close(SO);
close(SI);
}
More information about the leafnode-list
mailing list