CentOS6上无法启动NFS服务
1、系统环境
- 物理机:
Windows 7(32位)
旗舰版 - 虚拟机:
CentOS 6.5
2、问题描述
安装好nfs
应用程序之后,打算启动nfs
服务,却出现以下的报错:
[root@promote ~]# service nfs start
启动 NFS 服务: [确定]
启动 NFS mountd: [失败]
启动 NFS 守护进程:rpc.nfsd: writing fd to kernel failed: errno 111 (Connection refused)
rpc.nfsd: unable to set any sockets for nfsd
[失败]
3、解决方法
[root@promote ~]# service rpcbind restart
停止 rpcbind: [失败]
正在启动 rpcbind: [确定]
[root@promote ~]# service nfs restart
关闭 NFS 守护进程: [失败]
关闭 NFS mountd: [失败]
启动 NFS 服务: [确定]
启动 NFS mountd: [确定]
启动 NFS 守护进程: [确定]
正在启动 RPC idmapd: [确定]
[root@promote ~]# ss -tnlp
State Recv-Q Send-Q Local Address:Port Peer Address:Port
LISTEN 0 64 :::2049 :::*
LISTEN 0 64 *:2049 *:*
LISTEN 0 128 :::54569 :::* users:(("rpc.mountd",2058,14))
LISTEN 0 128 :::39626 :::* users:(("rpc.mountd",2058,18))
LISTEN 0 50 *:3306 *:* users:(("mysqld",1193,10))
LISTEN 0 128 :::111 :::* users:(("rpcbind",1948,11))
LISTEN 0 128 *:111 *:* users:(("rpcbind",1948,8))
LISTEN 0 128 *:38130 *:* users:(("rpc.mountd",2058,8))
LISTEN 0 64 *:54772 *:*
LISTEN 0 128 *:49781 *:* users:(("rpc.mountd",2058,16))
LISTEN 0 128 :::22 :::* users:(("sshd",1048,4))
LISTEN 0 128 *:22 *:* users:(("sshd",1048,3))
LISTEN 0 128 *:44279 *:* users:(("rpc.mountd",2058,12))
LISTEN 0 64 :::23 :::* users:(("xinetd",1056,5))
LISTEN 0 100 ::1:25 :::* users:(("master",1291,13))
LISTEN 0 100 127.0.0.1:25 *:* users:(("master",1291,12))
LISTEN 0 128 :::43706 :::* users:(("rpc.mountd",2058,10))
LISTEN 0 64 :::47900 :::*
4、结语
至此,通过命令ss -tnlp
,我们已经看到nfs
服务已经打开。