From owner-freebsd-hackers Fri Jul 14 16:11:13 1995 Return-Path: hackers-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id QAA04436 for hackers-outgoing; Fri, 14 Jul 1995 16:11:13 -0700 Received: from mailhost1.cac.washington.edu (mailhost1.cac.washington.edu [140.142.32.2]) by freefall.cdrom.com (8.6.10/8.6.6) with SMTP id QAA04430 for ; Fri, 14 Jul 1995 16:11:10 -0700 Received: from hope96.apl.washington.edu by mailhost1.cac.washington.edu (5.65+UW95.05/UW-NDC Revision: 2.33 ) id AA13020; Fri, 14 Jul 95 16:11:09 -0700 Received: from mac-pal.apl.washington.edu by apl.washington.edu (4.1/SMI-4.1) id AA18557; Fri, 14 Jul 95 16:11:07 PDT Message-Id: <9507142311.AA18557@apl.washington.edu> Date: Fri, 14 Jul 1995 16:09:43 -0800 From: kargl@apl.washington.edu (steve) To: freebsd-hackers@freebsd.org Subject: SOLVED: rsh/rlogin problems in 2.0.5-RELEASE Sender: hackers-owner@freebsd.org Precedence: bulk This was posted in the newsgroup. I thouhgt a core team member might want to investigate. > From: jdp@polstra.com (John Polstra) > Newsgroups: comp.unix.bsd.freebsd.misc > Subject: SOLVED: rsh/rlogin problems in 2.0.5-RELEASE > Date: 14 Jul 1995 10:37:58 -0700 > Organization: Polstra & Co., Seattle, WA > Lines: 53 > Message-ID: <3u6a1m$q30@seattle.polstra.com> > NNTP-Posting-Host: seattle.polstra.com > Summary: Caused by #comments in /etc/hosts.equiv > > Many people have posted accounts of long delays or hangs when trying to > use rsh or rlogin to a system running FreeBSD 2.0.5-RELEASE. Today I > discovered the cause of the problem, at least on my system. Once you > understand the cause, the fix is trivial. > > On attempts to rsh from a SVR4 machine into the FreeBSD-2.0.5 machine, I > was observing delays of almost exactly 2.5 minutes. Luckily, there is > also a third machine on the same ethernet, running SunOS. That machine > has a sniffer program called "etherfind". I ran it to observe what was > going on during the execution of rsh. Immediately, I saw that the long > delays were related to unanswered DNS queries that were being sent by the > FreeBSD machine to the SVR4 machine (which is the name server for the > local net). > > On the name server machine, I turned on debugging in the "in.named" > program. Here are the strange queries that were coming from the FreeBSD > machine: > > req: nlookup(#localhost) id 1280 type=1 > req: nlookup(#my_very_good_friend.domain) id 1536 type=1 > > These queries are of course bogus, and the name server (rightly or > wrongly) did not respond to them. On the FreeBSD side, the resolver > timed out and tried again, several times, adding up to (surprise) 2.5 > minutes of delay. > > A quick "grep my_very_good_friend /etc/*" took me straight to the > "/etc/hosts.equiv" file, which looked like this: > > #localhost > #my_very_good_friend.domain > > I had never touched this file, so it must be the default one that gets > installed when one installs FreeBSD 2.0.5-RELEASE. > > THE SOLUTION: Get rid of (or repair) that bogus "/etc/hosts.equiv" file. > That fixes the problem instantly. > > THE MORAL: Don't try to put comments into "/etc/hosts.equiv". (A quick > look at "/usr/src/lib/libc/net/rcmd.c" confirms that there is no comment > processing for this file.) > > A STRANGE OBSERVATION: Strangely, I had no problems with rsh or rlogin > until today. And I have not changed any of the relevant files, as far > as I know. So I suspect that the failure mode for this particular > problem depends in some way on the vagaries of the particular name > server that is being used. Even if you're not currently having > problems, you should repair your "/etc/hosts.equiv" file. > > -- > John Polstra jdp@polstra.com > John D. Polstra & Co., Inc. Seattle, Washington USA > "Self-knowledge is always bad news." -- John Barth