1833780 Members
2492 Online
110063 Solutions
New Discussion

NIS problem

 
SOLVED
Go to solution
Annie_8
Occasional Contributor

NIS problem

I have one NIS master server and NIS slave server on my network. They are HPL1000 server, running on HP-UX11.00. I have almost 30 NIS clients, They are HP C3600 unix workstation, some of them running on hp-ux 10.20 and some of them running on hp-ux 11.00, some HP N4000 servers and Hp J series server, all the servers are runing on hp-ux 11.00. I found one stanger problem on some NIS clients. On some clients, when I type the command " ypcat ypservers". On some NIS clients, there are two servers listed, NIS master server and NIS slave server. But on some NIS clients, there is only one NIS server listed, sometimes they are nis master server and sometimes they are nis slave server. This happened both on hp-ux 10.20 and hp-ux 11.00. I don't know whether there is somebody met this problem, but this problem already bothered me for a very long time. I really hope to get some useful information from you.

Thanks in advance
Annie
Annie
9 REPLIES 9
Hartmut Lang
Trusted Contributor

Re: NIS problem

On both of your nis-servers (master and slave) go to the directory /var/yp/.
You should see the ypservers.dir and ypservers.pag files there.

Use /usr/sbin/makedbm - u ypservers to display the content of the ypservers-map on both servers (master and client). They should have the same content.

Hartmut
David Burgess
Esteemed Contributor

Re: NIS problem

Are they servers and clients on the same subnet? I've had problems when the boxes are on different subnets. I've got a feeling NIS doesn't work across subnets. Maybe someone can clarify this.

Regards,

Dave.
U.SivaKumar_2
Honored Contributor

Re: NIS problem

hi,
NIS will work across subnets provided gateway
forwards broadcasts. The NIS binding problems can arise because of high forwarding delay , in some gateways ( reasons being high load , less memory etc).
So it is generally recommended to place one NIS server per subnet. Or if you want your
serverin other subnet , use powerful routers
( gateways).

regards,
U.SivaKumar
Innovations are made when conventions are broken
David Burgess
Esteemed Contributor

Re: NIS problem

Makes sense.

Thanks,

Dave.
Annie_8
Occasional Contributor

Re: NIS problem

Hi everyone,

Thanks very much for your reply. But the problem is all the servers ( include NIS master and slave server, all NIS clients) are on one subnet. I also checked the nis server use the command "/usr/sbin/makedbm ypservers",
the output looks like this:
koalapcc koalapcc
whalepcc
YP_LAST_MODIFIED 1006761379
YP_MASTER_NAME koalapcc

by the way,koalapcc is my nis master server name and whalepcc is my nis slave server name.

Could anyone please give me some hints on this problem? whether there is some patch should be installed on NIS master,NIS slave or NIS clients?
Annie
U.SivaKumar_2
Honored Contributor

Re: NIS problem

hi,
i see as a binding problem only. I think for some clients master server answers first and for some servers slave server responds first. Is this problem is random on your NIS clients ?. what is the system load on your master server and slave server ?.

enable rpc.sprayd in /etc/inetd.conf on both servers .
#inetd -c
use spray command to throw packets on master
server and client server. whose response is
slow ?.
if you shutdown slave server , what does all the NIS clients show as NIS server now ?.

regards,
U.SivaKumar
Innovations are made when conventions are broken
Hartmut Lang
Trusted Contributor
Solution

Re: NIS problem

The content of your ypservers database looks strange to me. I would expect something like:
koalapcc koalapcc
whalepcc whalepcc YP_LAST_MODIFIED 1006761379 YP_MASTER_NAME koalapcc

You only have one "whalepcc" in the second line. I think that is not ok.
What is the output of "ypcat -k ypservers".
You should see:
koalapcc koalapcc
whalepcc whalepcc

This is how things look in my environment. Can someone validate this?

Hartmut
S.K. Chan
Honored Contributor

Re: NIS problem

What Hartmut said is correct, you should see 2 entries in ypservers as such ..

koalapcc koalapcc
whalepcc whalepcc

I would suggest you tweak/edit ypservers and re-push the map out.

# cd /var/yp/
# makedbm -u ypservers > ../nis-server-list
# vi ../nis-server-list
==> edit by adding another "whalepcc" entry
# makedbm ../nis-server-list ypservers
# /var/yp/ypmake
==> Push it out to the slaves.

On the slaves server, check the timestamp for ..
/var/yp//ypservers.dir
/var/yp/to make sure they are updated, if not manually push it from the master ..

# yppush -v ypservers
Annie_8
Occasional Contributor

Re: NIS problem

Hello everyone,

Thanks very much for your reply. Now this problem is sloved. I first use " /usr/sbin/makedbm -u ypservers > tempfile". and then edit tempfile like this
koalapcc koalapcc
whalepcc whalepcc
.........
.......
Then use the command "/usr/sbin/makedbm tempfile ypservers". Then it works.

and thanks very much for Hartmut instruction. and thanks everyone for your reply.

Have a nice day!
Annie
Annie