ypserv, yppasswdd or ypbind fails to start with timeout on system boot when rpcbind using hosts.allow is accessed from a remote host
Issue
-
ypserv, yppasswdd or ypbind fails to start with timeout on system boot when rpcbind using hosts.allow is accessed from a remote host
-
ypserv.service error in messages sample:
systemd[1]: ypserv.service start operation timed out. Terminating.
systemd[1]: ypserv.service stop-final-sigterm timed out. Killing.
systemd[1]: ypserv.service: main process exited, code=killed, status=9/KILL
systemd[1]: Failed to start NIS/YP (Network Information Service) Server.
- Reproducer sample:
(1) On a NIS server(hostname: ypsrv1):
# systemctl list-unit-files
UNIT FILE STATE
...
rpcbind.service enabled
ypbind.service enabled
ypserv.service enabled
# vim /etc/nsswitch.conf
...
hosts: files nis
# vim /etc/yp.conf
ypserver 127.0.0.1
# /var/yp/ypservers
ypsrv1.example.com
# vim /etc/hosts.allow
rpcbind: LOCAL
# vim /etc/hosts.deny
rpcbind: ALL
(2) On a remote host:
This host entry is not in ypsrv1's /etc/hosts.
For example, access to rpcbind on ypsrv1 as follows:
# for i in $(seq 1 100); do sleep 1; (rpcinfo -u ypsrv1 portmapper &) ; done
(3) Reboot ypsrv1:
It might be needed several or many times.
Environment
- Red Hat Enterprise Linux 7
- ypserv
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.