内容纲要
概要描述
Sophon_deps 组件的nfs角色启动失败, 后台查看pod 的logs 报错:
clnt_create: RPC: Program not registered
或者是
mount.nfs: requested NFS version or transport protocol is not supported
详细说明
问题原因
因为默认端口的问题,一个节点上面只能存在一个nfs服务,nfs服务有两个组件一个是nfs自身,另一个是rpcbind,如果存在两套nfs便会存在问题(操作系统安装的时候自带了一个, 重启服务器导致自带的启动了)
当前节点上面已经存在了一个rpcbind,如果去启动另一套nfs进程,nfs可以启动成功,但是rpcbind会因为端口占用启动失败
解决方案
注意:下面命令均在nfs 角色 所在节点操作
- 查看nfs 和rpcbind状态
systemctl status nfs systemctl status rpcbind - 如果都已经停止就在当前节点上面执行
netstat -nulp | grep :111 - 去查找rpcbind的进程,并杀死这个进程。
kill -9 rpcbing 《进程号》 - 如果有任意一个状态不是停止就去执行下面命令停掉对应服务
systemctl stop nfs systemctl stop rpcbind systemctl stop rpcbind.socket (rpcbind服务stop的时候有warn信息时再执行) systemctl disable rpcbind (禁止rpcbind自启动) - 关闭相关进程
kill -9 $(ps -ef | grep [[]nfsd[]]| awk '{print $2}')6.卸载rpcbind和nfs
yum remove nfs-utils rpcbind -y - 页面重启nfs角色