Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi,
I have NIS running on RHEL 7.2. One server is master, where we make all changes and add/delete and other one is slave. Suddenly few users are not able to login on few clients. I am not able to figure out, what caused it..
I observed, if I make any change in passwd or netgroup and then run 'make' to replicate, it throws error. I restarted ypserv, but no luck. Seems like some corruption, but I am not sure, how to fix it.
Clients, who are supposed to get authentication from master-server-prod, are also not able to login.
Code:
[root@master-server-prod /]# ypwhich
master-server-prod
[root@master-server-prod /]# cat /var/yp/ypservers
master-server-prod
slave-server-prod
[root@master-server-prod /]# service ypserv status
Redirecting to /bin/systemctl status ypserv.service
â ypserv.service - NIS/YP (Network Information Service) Server
Loaded: loaded (/usr/lib/systemd/system/ypserv.service; enabled; vendor preset: disabled)
Active: active (running) since Thu 2019-07-11 15:25:16 PDT; 20h ago
Main PID: 32764 (ypserv)
Status: "Processing requests..."
CGroup: /system.slice/ypserv.service
ââ32764 /usr/sbin/ypserv -f
Jul 11 15:25:16 master-server-prod systemd[1]: Starting NIS/YP (Network Information Service) Server...
Jul 11 15:25:16 master-server-prod ypserv[32764]: WARNING: no securenets file found!
Jul 11 15:25:16 master-server-prod systemd[1]: Started NIS/YP (Network Information Service) Server.
[root@master-server-prod /]# cd /var/yp
[root@master-server-prod yp]# vi maps/passwd
[root@master-server-prod yp]#
[root@master-server-prod yp]# make
gmake[1]: Entering directory `/var/yp/abc.def.com'
gmake[1]: `ypservers' is up to date.
gmake[1]: Leaving directory `/var/yp/abc.def.com'
gmake[1]: Entering directory `/var/yp/abc.def.com'
Updating netgroup...
makedbm: warning: malformed input data (ignored)
makedbm: warning: malformed input data (ignored)
netgroup->slave-server-prod: Callback timed out
gmake[1]: Leaving directory `/var/yp/abc.def.com'
[root@master-server-prod yp]#
It's been a while since I used NIS but your mention of master and slave reminded me that we'd seen outages caused when someone did the push from the slave rather than the master. This was because the slave is serving its copies of files from the master rather than its own files whereas the master serves the originals it has. The push from the master resends all the files with all the details whereas the push from the slave sends only its own files with significantly less detail.
Were you doing the update from the master or from the slave?
Your question may be "Why is there a slave if what you said is true?". The answer is the slave is serving all the detail because it was already pushed to it by the master. It can answer the questions clients ask but it doesn't have the raw data to recreate the data if it is mistakenly used to push.
P.S. At the job where we had this issue they quit using NIS because one admin made the mistake over and over. A more reasonable approach would have been to fire him IMHO.
So far, I was able to see any make command in history of salve, if I assume that it can be human error by some admin.
As per our process, we are always supposed to run make from master only. In above description, as you see, I ran 'make' from master-server-prod, which is our master server. I tried to search error "netgroup->slave-server-prod: Callback timed out" on internet, but I am not getting much clue, if this is indicating something.
Search instead for just:
netgroup-> Callback timed out
Presumably "slave-server-prod" is the name of your slave server rather than a generic output so it should be excluded from web searches.
If you do the search without "slave-server-prod" you'll see a fair number of hits.
Yes, that was my bad.
One solution suggests to tun ypinit and I did it from slave. Even though ypxfrd is running on salve as well on master, it is showing error
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.