Mailing List Archive

telnet hanging
I've installed rancid-2.2.2 on a Red Hat 7.2 system and have noticed a
problem where telnet (spawned from clogin) hangs on one particular router
(the first in router.db). When I check the router, the telnet session has
successfully logged in and is just sitting idle. I've seen it hung for as
much as an hour before I've killed the telnet process.

I did a quick search of the archive and didn't see anyone reporting
something similar. Anyone seen/solved this before?

----------------------------------------------------------------------
Jon Lewis *jlewis at lewis.org*| I route
System Administrator | therefore you are
Atlantic Net |
_________ http://www.lewis.org/~jlewis/pgp for PGP public key_________
telnet hanging [ In reply to ]
I've had problems with telnet and ssh hanging on certain routers for a while
now. Seems to get better or worse depending on what version of IOS we're
running. (Incidentally, I haven't seen any problems with Junipers). Last
week it started hanging on the same router about every other time I ran a diff.

I saw a note about a possible expect bug on Linux, but I couldn't get the older
version which was posted on the rancid page to build and I upgraded to the
newest versions of expect and tcl and it didn't fix it either.

I installed the same versions of rancid (2.2.2), expect (5.38) and tcl (8.3)
on a FreeBSD box last Friday and have been running diffs every hour since
without a problem.

- Matt


On Mon, Oct 14, 2002 at 05:19:27PM -0400, jlewis at lewis.org wrote:
> I've installed rancid-2.2.2 on a Red Hat 7.2 system and have noticed a
> problem where telnet (spawned from clogin) hangs on one particular router
> (the first in router.db). When I check the router, the telnet session has
> successfully logged in and is just sitting idle. I've seen it hung for as
> much as an hour before I've killed the telnet process.
>
> I did a quick search of the archive and didn't see anyone reporting
> something similar. Anyone seen/solved this before?
>
> ----------------------------------------------------------------------
> Jon Lewis *jlewis at lewis.org*| I route
> System Administrator | therefore you are
> Atlantic Net |
> _________ http://www.lewis.org/~jlewis/pgp for PGP public key_________
telnet hanging [ In reply to ]
[attribution removed since he didn't appear to cc: the list]
> I had the same problem with the version of expect that came stock with
> RH7.2. The following is mentioned on the RANCID site:
>
> Linux users with expect 5.32.* (or > 5.25.*); there appears to be a bug in
> tcl 8.3 that causes collections to hang often and likely all the time. Below

Doh! I should have scrolled down that page...it's actually been open in
one of my Opera tabs since I installed RANCID.

The Red Hat 7.3 expect rpm installed without any complaints, so I'll see
if that solves it.

Sorry for wasting everyone's time.

----------------------------------------------------------------------
Jon Lewis *jlewis at lewis.org*| I route
System Administrator | therefore you are
Atlantic Net |
_________ http://www.lewis.org/~jlewis/pgp for PGP public key_________
telnet hanging [ In reply to ]
Mon, Oct 14, 2002 at 06:31:55PM -0400, jlewis at lewis.org:
> [attribution removed since he didn't appear to cc: the list]
> > I had the same problem with the version of expect that came stock with
> > RH7.2. The following is mentioned on the RANCID site:
> >
> > Linux users with expect 5.32.* (or > 5.25.*); there appears to be a bug in
> > tcl 8.3 that causes collections to hang often and likely all the time. Below
>
> Doh! I should have scrolled down that page...it's actually been open in
> one of my Opera tabs since I installed RANCID.
>
> The Red Hat 7.3 expect rpm installed without any complaints, so I'll see
> if that solves it.

if you refresh that page, you'll also see:

Update: we're told that kernel 2.4.11 + expect-5.32.2-62 + tcl-8.3.3-65 are a
winning combination. We have not tested this ourselves.

seems odd that its just that one box. anyway, i'm sure we'll hear from
folks if these do not solve it.
telnet hanging [ In reply to ]
On Mon, 14 Oct 2002 jlewis at lewis.org wrote:

> The Red Hat 7.3 expect rpm installed without any complaints, so I'll see
> if that solves it.

Just upgrading expect and tcl to Red Hat 7.3's rpms didn't solve the
problem. I'm currently running

expect-5.32.2-67
tcl-8.3.3-67
kernel-2.4.9-13

Tomorrow, I'll try upgrading to kernel-2.4.18-10 and see if it makes a
difference. If not, I guess I'll try rebuilding an expect rpm with the
suggested patch.


----------------------------------------------------------------------
Jon Lewis *jlewis at lewis.org*| I route
System Administrator | therefore you are
Atlantic Net |
_________ http://www.lewis.org/~jlewis/pgp for PGP public key_________
telnet hanging [ In reply to ]
On Tue, 15 Oct 2002 jlewis at lewis.org wrote:

> Just upgrading expect and tcl to Red Hat 7.3's rpms didn't solve the
> problem. I'm currently running
>
> expect-5.32.2-67
> tcl-8.3.3-67
> kernel-2.4.9-13
>
> Tomorrow, I'll try upgrading to kernel-2.4.18-10 and see if it makes a
> difference. If not, I guess I'll try rebuilding an expect rpm with the
> suggested patch.

The kernel upgrade didn't help either. I ended up rebuilding the tcltk
src.rpm for Red Hat 7.2 with the suggested one line patch, and that seems
to have solved the telnet hanging problem.

Now I have another odd one that I hope isn't a FAQ. I've added a bunch of
cisco access-servers (5200's, 5300's, and a 5800) to my rancid setup, and
for some reason, these ciscos seem to vary the number of !'s separating
sections of the config from one 'write term' to the next even though
nobody has logged in and made changes to the config.

So I'm constantly being emailed diffs like:

ip classless
ip route 0.0.0.0 0.0.0.0 209.208.16.1
no ip http server
!
+ !
access-list 20 permit ...
access-list 20 permit ...
access-list 20 permit ...
access-list 20 deny any

followed by

ip classless
ip route 0.0.0.0 0.0.0.0 209.208.16.1
no ip http server
!
- !
access-list 20 permit ...
access-list 20 permit ...
access-list 20 permit ...
access-list 20 deny any

Obviously, this would appear to be more of a cisco problem than a rancid
one, but I suspect someone else must have run into this and wonder if
anyone's come up with a fix or knows how to get the cisco's to stop doing
this.

----------------------------------------------------------------------
Jon Lewis *jlewis at lewis.org*| I route
System Administrator | therefore you are
Atlantic Net |
_________ http://www.lewis.org/~jlewis/pgp for PGP public key_________
telnet hanging [ In reply to ]
Fri, Oct 18, 2002 at 10:33:23AM -0400, jlewis at lewis.org:
> On Tue, 15 Oct 2002 jlewis at lewis.org wrote:
>
> > Just upgrading expect and tcl to Red Hat 7.3's rpms didn't solve the
> > problem. I'm currently running
> >
> > expect-5.32.2-67
> > tcl-8.3.3-67
> > kernel-2.4.9-13
> >
> > Tomorrow, I'll try upgrading to kernel-2.4.18-10 and see if it makes a
> > difference. If not, I guess I'll try rebuilding an expect rpm with the
> > suggested patch.
>
> The kernel upgrade didn't help either. I ended up rebuilding the tcltk
> src.rpm for Red Hat 7.2 with the suggested one line patch, and that seems
> to have solved the telnet hanging problem.

with the same versions of expect and tcl listed above?

> Now I have another odd one that I hope isn't a FAQ. I've added a bunch of
> cisco access-servers (5200's, 5300's, and a 5800) to my rancid setup, and
> for some reason, these ciscos seem to vary the number of !'s separating
> sections of the config from one 'write term' to the next even though
> nobody has logged in and made changes to the config.

never seen this, but the attached patch ought to do it.

> So I'm constantly being emailed diffs like:
>
> ip classless
> ip route 0.0.0.0 0.0.0.0 209.208.16.1
> no ip http server
> !
> + !
> access-list 20 permit ...
> access-list 20 permit ...
> access-list 20 permit ...
> access-list 20 deny any
>
> followed by
>
> ip classless
> ip route 0.0.0.0 0.0.0.0 209.208.16.1
> no ip http server
> !
> - !
> access-list 20 permit ...
> access-list 20 permit ...
> access-list 20 permit ...
> access-list 20 deny any
>
> Obviously, this would appear to be more of a cisco problem than a rancid
> one, but I suspect someone else must have run into this and wonder if
> anyone's come up with a fix or knows how to get the cisco's to stop doing
> this.
>
> ----------------------------------------------------------------------
> Jon Lewis *jlewis at lewis.org*| I route
> System Administrator | therefore you are
> Atlantic Net |
> _________ http://www.lewis.org/~jlewis/pgp for PGP public key_________
-------------- next part --------------
Index: rancid.in
===================================================================
RCS file: /home/rancid/.CVS/rancid/bin/rancid.in,v
retrieving revision 1.119
diff -d -u -r1.119 rancid.in
--- rancid.in 2002/09/29 23:00:41 1.119
+++ rancid.in 2002/10/18 19:16:05
@@ -869,7 +869,7 @@
# This routine processes a "write term"
sub WriteTerm {
print STDERR " In WriteTerm: $_" if ($debug);
- my($lineauto) = 0;
+ my($lineauto,$comment) = (0,0);

while (<INPUT>) {
tr/\015//d;
@@ -897,6 +897,16 @@
# some versions have other crap mixed in with the bits in the
# block above
/^! (Last configuration|NVRAM config last)/ && next;
+
+ # skip multiple comment lines to avoid toggling extra comment on some
+ # access servers. grrr.
+ if (/^!/) {
+ next if ($comment);
+ ProcessHistory("","","",$_);
+ $comment++;
+ next;
+ }
+ $comment = 0;

# Dog gone Cool matches to process the rest of the config
/^tftp-server flash / && next; # kill any tftp remains
telnet hanging [ In reply to ]
On Fri, 18 Oct 2002, john heasley wrote:

> > > expect-5.32.2-67
> > > tcl-8.3.3-67
> > > kernel-2.4.9-13
> > >
> > The kernel upgrade didn't help either. I ended up rebuilding the tcltk
> > src.rpm for Red Hat 7.2 with the suggested one line patch, and that seems
> > to have solved the telnet hanging problem.
>
> with the same versions of expect and tcl listed above?

tcl-8.3.3-65rancid
expect-5.32.2-65rancid

These were built from the source rpm for tcltk that came with Red Hat 7.2.

> never seen this, but the attached patch ought to do it.

Cool. I'll give it a try.

----------------------------------------------------------------------
Jon Lewis *jlewis at lewis.org*| I route
System Administrator | therefore you are
Atlantic Net |
_________ http://www.lewis.org/~jlewis/pgp for PGP public key_________