Mar 252014

Having this error on a brand new install on fedora 20 I searched disparately on forums and on bugzilla.redhat.com… I found a bunch of posts about patching fedora 15 but none was relevant since I was using Fedora 20 and I had an updated version of ypbind…

From the logs (below) I figure out that the ypbind service could not start because the network was not ready. Coming from using RedHat Enterprise Linux 6.x I found weird this whole new init scheme been replaced by this new command systemctl. After the system finished booting and ypwhich did not return my domain name. Whenever I issue a restart command systemctl restart autofs ypbind it all then worked fine… but this needed to be a little bit more permanent than this!

I wondered for a short while with those new commands.

systemctl restart autofs ypbind

 
While it didn’t work I was trying to figure out dependencies and service boot order…

systemctl status ypbind
systemctl is-active ypbind
systemctl is-active autofs
systemctl list-dependencies ypbind | grep network
systemctl list-dependencies rpcbind.service
systemctl list-dependencies network.service

 

Mar 24 20:11:06 pcys29 ypbind: Binding NIS service
Mar 24 20:11:06 pcys29 ypbind: Binding took 0 seconds
Mar 24 20:11:06 pcys29 ypbind: NIS domain: grm, NIS server: grm.myzone.com
Mar 24 20:14:15 pcys29 ypbind: Binding NIS service
Mar 24 20:14:15 pcys29 ypbind: Binding took 0 seconds
Mar 24 20:14:15 pcys29 ypbind: NIS domain: grm, NIS server: grm.myzone.com
Mar 25 16:17:07 pcys29 ypbind[8602]: Lost connection to D-Bus
Mar 25 16:17:08 pcys29 ypbind[8602]: Connection to D-BUS system message bus failed: Failed to connect to socket /var/run/dbus/system_bus_socket: Connection refused.
Mar 25 16:17:09 pcys29 ypbind[8602]: Connection to D-BUS system message bus failed: Failed to connect to socket /var/run/dbus/system_bus_socket: Connection refused.
Mar 25 16:17:10 pcys29 ypbind[8602]: Connection to D-BUS system message bus failed: Failed to connect to socket /var/run/dbus/system_bus_socket: Connection refused.
…. and so on…
Mar 25 16:17:33 pcys29 ypbind[8602]: Connection to D-BUS system message bus failed: Failed to connect to socket /var/run/dbus/system_bus_socket: Connection refused.
Mar 25 16:17:34 pcys29 ypbind[8602]: Connection to D-BUS system message bus failed: Failed to connect to socket /var/run/dbus/system_bus_socket: Connection refused.
Mar 25 16:17:35 pcys29 ypbind[8602]: Connection to D-BUS system message bus failed: Failed to connect to socket /var/run/dbus/system_bus_socket: Connection refused.

and then the real error…

Mar 25 16:19:27 pcys29 ypbind: Host name lookup failure
Mar 25 16:19:27 pcys29 ypbind-pre-setdomain: Setting NIS domain: ‘grm’ (environment variable)
Mar 25 16:19:27 pcys29 ypbind: do_ypcall: clnt_call: RPC: Unable to send; errno = Network is unreachable

Mar 25 16:19:27 pcys29 ypbind: Binding NIS service
Mar 25 16:20:12 pcys29 ypbind: Binding took 45 seconds
Mar 25 16:20:12 pcys29 ypbind: NIS server for domain grm is not responding.
Mar 25 16:20:12 pcys29 ypbind: Killing ypbind with PID 656.
Mar 25 16:20:12 pcys29 ypbind: Try increase NISTIMEOUT in /etc/sysconfig/ypbind
Mar 25 16:20:12 pcys29 systemd: ypbind.service: control process exited, code=exited status=1
Mar 25 16:20:12 pcys29 systemd: Unit ypbind.service entered failed state.

I also looked at the man page… man ypbind I foudn something about delays but it did not work either.

User can increase the timeout by setting an environment variable NISTIMEOUT in /etc/sysconfig/ypbind. For example NISTIMEOUT=180 means ypbind will wait up to 180 seconds for binding to a NIS server.

I dedided the quickest way was to hack into /usr/libexec/ypbind-pre-setdomain and added a 10 second delay at the begining of the script… and it worked. I found it a bit dirty since an update can brake it but for now it does work and I got so much more other stuff to do.

echo “Rejean: ypbind is not ready… sleep 10 seconds…”
sleep 10

hope this help.
If you read this and found a better solution thanks for sharing it with me.
Rejean.

3 Responses to “Fedora 20 ypbind won’t start at boot. NIS logins unavailable immediately after boot (ypbind service NOT started).”

  1. systemctl enable NetworkManager-wait-online.service
    worked for me.

  2. Rejean says:

    Thank you Andreas! I definitely tested this and it also working just fine!

  3. ganesh patil says:

    Thanks man , it worked me like a charm thank you very much.

Leave a Reply

(required)

(required)