unix

How do I restart ypbind when it’s throwing a portmapper error?

If you cannot restart ypbind using the following command:

service ypbind restart

then one of the following is likely true:

    * The ypbind service is not configured to run
    * The portmap service is not running
    * NIS domain is not set

To configure the ypbind service to run:

1. Confirm that the ypbind service is not running:
# service ypbind status
ypbind is stopped

2. Check whether the service is expected to run:
# chkconfig –list ypbind
ypbind 0:off 1:off 2:off 3:off 4:off 5:off 6:off
“off” for all levels shows that ypbind is not configured to run.

3. Enable the ypbind service for the next reboot:
# chkconfig ypbind reset
# chkconfig ypbind on

4. Check whether the service is now enabled:
# chkconfig –list ypbind
ypbind 0:off 1:off 2:on 3:on 4:on 5:on 6:off

5. Start the ypbind service for the current uptime:
# service ypbind start

If the ypbind service fails to start with an error similar to the following, the portmap service might not be running.

# service ypbind start
Binding to the NIS domain: [ OK ]
Listening for an NIS domain server.rpcinfo: can’t contact portmapper: RPC: Remote system error – Connection refused
.rpcinfo: can’t contact portmapper: RPC: Remote system error – Connection refused

[FAILED]

To configure the portmap service to run:

1. Confirm that the portmap service is not running:
# service portmap status
portmap is stopped

2. Check whether portmap is expected to run:
# chkconfig –list portmap
portmap 0:off 1:off 2:off 3:off 4:off 5:off 6:off
“off” for all run levels shows that the portmap service is disabled and not expected to run.

3. Enable the portmap service for the next reboot:
# chkconfig portmap reset

4. Check whether the service is now enabled:
# chkconfig –list portmap
portmap 0:off 1:off 2:off 3:on 4:on 5:on 6:off

5. Start the portmap service for the current uptime:
# service portmap start
Starting portmapper: [ OK ]

6. Check whether the portmap service is running:
# service portmap status
portmap (pid 511) is running…

If the ypbind service is still not running, you can check whether the NIS domain is set by performing the following tasks:

1. Check whether ypbind failed silently because the NIS domain was not set:
# grep NISDOMAIN /etc/sysconfig/network
#
Empty output shows that the NIS domain is not set.

2. Enable NIS with the esxcfg-auth command using your site’s NIS domain and server names:
# esxcfg-auth –enablenis –nisdomain example.com –nisserver nisserver.example.com

3. Check the effects of running the esxcfg-auth command:
# grep -i domain /etc/sysconfig/network /etc/yp.conf
/etc/sysconfig/network:NISDOMAIN=example.com
/etc/yp.conf:domain vmware.com server nisserver.example.com

4. Start the ypbind service for the current uptime:
# service ypbind start
Setting NIS domain name vmware.com: [ OK ]
Binding to the NIS domain: [ OK ]
Listening for an NIS domain server.

5. Check whether the ypbind service is running:
# service ypbind status
ypbind (pid 11195) is running…

The portmap and ypbind services should now run and restart automatically the next time the server is rebooted.

Click to comment

Leave a Reply

Your email address will not be published. Required fields are marked *

To Top