Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Jun 2009 20:05:33 -0500
From:      Martin McCormick <martin@dc.cis.okstate.edu>
To:        freebsd-questions@freebsd.org
Subject:   When the Remote end of a Telnet drops
Message-ID:  <200906110105.n5B15XZc040275@dc.cis.okstate.edu>

next in thread | raw e-mail | index | archive | help
In the last two weeks, we have suddenly begun having a problem
when telnetting to a telephone switch in order to manage it.
This device does not have ssh or we would sure be using that.

	We run an expect script to poll various registers on the
switch and the process is fairly simple. We ask for various
listings of registers. When done with a listing, the switch
sends a prompt which we see and then either go to the next poll
or end and log out.

Recently, output just stops at the end of a line with no
corruption of the text. There is even a Return character. The
telnet session just sits there for days if we don't stop it.

	It is tempting to point fingers at the switch and the
people closest to the switch say that it must be something with
the network, all that fun sort of stuff that happens when you
don't have undisputable proof and it doesn't happen every
day.

	Exactly a month ago, I upgraded the patch level on this
system to
FreeBSD 6.3-RELEASE-p10

	Does anybody know if there are any recent issues with telnet?

	As a test, I telnetted to a system and then literally
pulled the Ethernet plug on the remote system. The system I was
telnetting from sat for many minutes. I finally hit Enter and a
few minutes later, it figured out there was nothing on the
remote end. There was the usual "Connection closed by foreign
host." message.

	Is there a way to make telnet either more proactive
about detecting a loss of connection or of logging oddities if
the connection is flickering?

	One such stall happened on a weekend and the connection
appeared to be up for 4 days. A ps ax |grep telnet |grep -v grep
showed a connection still up at least until I killed it. At that
point, it logged "terminated" and ended.

	I can certainly put a timeout in expect but we have been
using this same script, etc, for around 6 years and never had
this problem before so a timeout would just hide whatever has
changed.

	My own gut feeling is that the FreeBSD system is fine as
we have no other problems with anything else.

Martin McCormick WB5AGZ  Stillwater, OK 
Systems Engineer
OSU Information Technology Department Telecommunications Services Group



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906110105.n5B15XZc040275>