From owner-freebsd-questions@FreeBSD.ORG Thu Jun 18 23:32:07 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BF52A106570F for ; Thu, 18 Jun 2009 23:32:07 +0000 (UTC) (envelope-from bryant.eadon@gmail.com) Received: from qw-out-2122.google.com (qw-out-2122.google.com [74.125.92.26]) by mx1.freebsd.org (Postfix) with ESMTP id 739548FC35 for ; Thu, 18 Jun 2009 23:32:07 +0000 (UTC) (envelope-from bryant.eadon@gmail.com) Received: by qw-out-2122.google.com with SMTP id 3so739244qwe.7 for ; Thu, 18 Jun 2009 16:32:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:reply-to :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=EfRB5g58BoZ8XM3pIte/ocXBLz7MFokQyUG3gyQzIz8=; b=RnwvHBkr9IfuWNNhBq2mBX1a8rdQwww0N05SD5tTlniFrkSWRAo6y7W0Hh+3riT/Ow HBEDxOliiB8YRiAfnYBSwUUZgQe5QTyIm9/5Gi2PwCRL7ZwbVxT7l7JSMFRJViuI3FKc 9DpKx89Qqcfev0QaivedWUKZnO8QLfRB3NAp8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:reply-to:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=fhRWx27xO1FfSCpT+gXAnYi+iU3Q1r3kxUpGwyf/w+RIkr4+yYLvgEqXJicPAC+hJl wOoxc+fH9TKRAjPqngdomIxPJ+wBbknmI9kspYZrK/m7/AhKucA3pA+OunAN0122AHbE 12kHWw1q5nB8qDjci4SquCUUkHtKWONolkxhk= Received: by 10.224.45.203 with SMTP id g11mr1963613qaf.16.1245367926947; Thu, 18 Jun 2009 16:32:06 -0700 (PDT) Received: from ?192.168.1.4? (itsf207.itsnpt.com [64.119.85.207]) by mx.google.com with ESMTPS id 5sm171172qwg.45.2009.06.18.16.32.04 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 18 Jun 2009 16:32:05 -0700 (PDT) Message-ID: <4A3ACE66.60904@gmail.com> Date: Thu, 18 Jun 2009 19:31:50 -0400 From: Bryant Eadon User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) MIME-Version: 1.0 To: Martin McCormick References: <200906110105.n5B15XZc040275@dc.cis.okstate.edu> In-Reply-To: <200906110105.n5B15XZc040275@dc.cis.okstate.edu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: When the Remote end of a Telnet drops X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: bryant.eadon@gmail.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jun 2009 23:32:08 -0000 Martin McCormick wrote: > 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. > I suspect something is killing the idle TCP session between your hosts. If you're crossing the internet, you might ask if your ISP has modified something along those lines. Have you fiddled with sysctl settings, specifically net.inet.tcp.keepintvl yet ? more info at src/sys/netinet/tcp_timer.c -Bryant