When the Remote end of a Telnet drops
martin at dc.cis.okstate.edu
Thu Jun 11 01:05:50 UTC 2009
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
Exactly a month ago, I upgraded the patch level on this
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
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
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
OSU Information Technology Department Telecommunications Services Group
More information about the freebsd-questions