NIS server selection

2004-07-08 Thread Doug Hardie
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?

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.

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: NIS server selection

2004-07-08 Thread Dan Nelson
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
[EMAIL PROTECTED]
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: NIS server selection

2004-07-08 Thread Doug Hardie
On Jul 8, 2004, at 13:44, Dan Nelson wrote:
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.
Thanks.  I have now set 3 servers in the -S list.  ypwhich shows the 
one currently being used.  I need to be able to change that.  It 
appears that ypset is the way to do that.  However, when I start ypbind 
with the -ypsetme argument I still get sorry, cannot ypset for domain 
NAME on host.  I am running ypset on that server.  That message comes 
from a request to rpc prog 14 which is registered to rpserv so I 
don't see how an argument to ypbind would help this.  I don't find any 
similar arguments to ypserv.  How do you make ypset work without 
opening it up to the entire world?

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: NIS server selection

2004-07-08 Thread Dan Nelson
In the last episode (Jul 08), Doug Hardie said:
 On Jul 8, 2004, at 13:44, Dan Nelson wrote:
 
 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.
 
 Thanks.  I have now set 3 servers in the -S list.  ypwhich shows the
 one currently being used.  I need to be able to change that.  It
 appears that ypset is the way to do that.  However, when I start
 ypbind with the -ypsetme argument I still get sorry, cannot ypset
 for domain NAME on host.  I am running ypset on that server.  That
 message comes from a request to rpc prog 14 which is registered
 to rpserv so I don't see how an argument to ypbind would help this. 
 I don't find any similar arguments to ypserv.  How do you make ypset
 work without opening it up to the entire world?

From looking at the source, the -S flag resets the -ypset and -ypsetme
flags. See if putting -ypsetme after the -S xxx arguments helps.

-- 
Dan Nelson
[EMAIL PROTECTED]
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: NIS server selection

2004-07-08 Thread Doug Hardie
On Jul 8, 2004, at 18:34, Dan Nelson wrote:
In the last episode (Jul 08), Doug Hardie said:
On Jul 8, 2004, at 13:44, Dan Nelson wrote:
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.
Thanks.  I have now set 3 servers in the -S list.  ypwhich shows the
one currently being used.  I need to be able to change that.  It
appears that ypset is the way to do that.  However, when I start
ypbind with the -ypsetme argument I still get sorry, cannot ypset
for domain NAME on host.  I am running ypset on that server.  That
message comes from a request to rpc prog 14 which is registered
to rpserv so I don't see how an argument to ypbind would help this.
I don't find any similar arguments to ypserv.  How do you make ypset
work without opening it up to the entire world?

From looking at the source, the -S flag resets the -ypset and -ypsetme
flags. See if putting -ypsetme after the -S xxx arguments helps.
That did it.  Somehow I missed that in the source.  Thanks.  I 
appreciate the assistance.

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]