When you restart your CentOS5.5 system today, suddenly NFS does not start, and the following error occurs when you manually start
#/etc/init.d/nfs Restart shutting down NFS mountd: [FAILED] shutting down NFS daemon: [FAILED] shutting down NFS quotas: [FAILED] Shutting down NFS services: [FAILED] Starting NFS services: [OK] starting NFS Quotas:cannot Register Service:RPC:Unab Le to receive; errno = Connection refused rpc.rquotad:unable to register (Rquotaprog, Rquotavers, UDP). [FAILED] Starting NFS daemon: [FAILED] #/etc/init.d/portmap Restart stopping portmap: [FAILED] Starting portmap:portmap:error WH Ile loading shared Libraries:libnsl.so.1:cannot Open Shared object file:no such file or directory
Started thinking it was the first two days of system upgrade, so reinstall the Portmap and related packages, and do the related configuration, but again the following error occurred
#/etc/init.d/nfs Restart shutting down NFS mountd: [FAILED] shutting down NFS daemon: [FAILED] shutting down NFS quotas: [FAILED] Shutting down NFS services: [FAILED] Starting NFS services: [OK] starting NFS Quotas:cannot Register Service:RPC:Unab Le to receive; errno = Connection refused rpc.rquotad:unable to register (Rquotaprog, Rquotavers, UDP). [FAILED] Starting NFS daemon:rpc.nfsd:error while loading shared libraries:libc.so.6:failed to map segment from shared object: Permission denied [FAILED]
There's no way to run the Restorecon command
# Restorecon-r/
Then reboot the machine again, and the problem is solved.
Later, I checked the manual of the Restorecon Order, which is as follows:
This are primarily used to set the security context (extended attributes) in one or more files.
It can be run in any time to correct errors, to add support for new policy, or with THE-N option it can just check
Whether the file contexts are all as to you expect.
So maybe you don't need to reinstall the package at the beginning, so run the command and get it done, but no more testing.