From owner-freebsd-questions@FreeBSD.ORG Thu Jul 8 20:44:21 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 550F216A4CE for ; Thu, 8 Jul 2004 20:44:21 +0000 (GMT) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0DC5643D39 for ; Thu, 8 Jul 2004 20:44:21 +0000 (GMT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.12.10/8.12.10) id i68KiIlO075968; Thu, 8 Jul 2004 15:44:18 -0500 (CDT) (envelope-from dan) Date: Thu, 8 Jul 2004 15:44:18 -0500 From: Dan Nelson To: Doug Hardie Message-ID: <20040708204417.GB58856@dan.emsphone.com> References: <200407081559.i68FxZfO043201@whoweb.com> <20040708164237.GH57155@dan.emsphone.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-OS: FreeBSD 5.2-CURRENT X-message-flag: Outlook Error User-Agent: Mutt/1.5.6i cc: FreeBSD Question List Subject: Re: NIS server selection X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jul 2004 20:44:21 -0000 In the last episode (Jul 08), Doug Hardie said: > I have NIS running on a few servers. I have had them configured with > the -S option with only their host name so they would use the local > resolver. However, after a few problems with ypserv dying I tried > adding additional servers to the -S list. Everything was as normal > till I killed ypserv on the local machine. Then it switched to the > first host listed after the local name in the -S list. Access to NIS > records worked fine. > > Then I tried to revert back to the local server. Restarting ypserv > had no effect. NIS requests were still sent to the other server. I > killed ypbind and restarted it with the full list. All requests were > still sent to the other server. I killed ypbind again and restarted > it with just the local server in the -S list. The request then were > split about half and half with the local server and other server. > How does ypbind know about the other server anymore? Running processes will talk to the server they originally made a connection to, until that connection fails. Only then will they contact their local ypbind and ask for another server. ypbind is not contacted on every lookup. > I had to kill ypserv on the other server, wait for some requests to > timeout (ypbind is a persistent bugger) and then it switched. Surely > there has to be an easier way to do this. I am trying to have ypbind > use the local server if its working and otherwise one of the other > servers. If the local ypbind gets restarted i would like it to revert > back to using it. The best you can do is make sure "ypwhich" points to the local machine so that subsequent processes will use it. You can't force existing processes to switch. -- Dan Nelson dnelson@allantgroup.com