failed: RPC Error:RPC:程序未注册解决


failed: RPC Error:RPC:程序未注册解决
 
一、场景:
在Linux上操作命令: 
mount -t nfs -o rw xxx.xxx.xxx.xxx:/nfs /nfs 
出现错误提示:failed: RPC Error:RPC:程序未注册
 
二、分析步骤:
第1步:检查对方服务器是否做了连接限制
         登录到对方服务器 , 查看/etc/hosts.allow 和 /etc/hosts.deny 文件.其中hosts.deny 是拒绝了其中对应IP的主机的连接,hosts.allow 是允许其中对应IP主机的连接。
[root@lsxy ~]$ tail /etc/hosts.allow
#
# hosts.allow   This file describes the names of the hosts which are
#               allowed to use the local INET services, as decided
#               by the '/usr/sbin/tcpd' server.
#
[root@lsxy ~]$ tail /etc/hosts.deny
#
# hosts.deny    This file describes the names of the hosts which are
#               *not* allowed to use the local INET services, as decided
#               by the '/usr/sbin/tcpd' server.
#
# The portmap line is redundant, but it is left to remind you that
# the new secure portmap uses hosts.deny and hosts.allow.  In particular
# you should know that NFS uses portmap!
从里面内容可知,对方服务并未对他方主机的连接做任何限制。
 
第2步:是否是由相关服务未启动导致:
检查portmap服务、nfs服务。其中portmap服务是用来支持RPC连接,RPC被用于NFS以及NIS 等服务。
1、检查portmap服务的状态:
         [root@lsxy etc]# service portmap status
         portmap (pid 20862) 正在运行...
     说明portmap服务正常启动运行。
2、检查nfs服务的状态:
         [root@lsxy etc]# service nfs status
         rpc.mountd 已停
         nfsd 已停
         rpc.rquotad 已停
      问题应该差不多查找到了——nfs服务未启动导致。
 
三、解决方法:
1、启动nfs服务:
     [root@lsxy etc]# service nfs start
     启动 NFS 服务:                                            [  确定  ]
     关掉 NFS 配额:                                            [  确定  ]
     启动 NFS 守护进程:                                     [  确定  ]
     启动 NFS mountd:                                      [  确定  ]
 
2、重启portmap服务:
[root@lsxy etc]# service portmap reload
停止 portmap:                                             [  确定  ]
启动 portmap:                                             [  确定  ]
 
这时再去操作命令:mount -t nfs -o rw xxx.xxx.xxx.xxx:/nfs /nfs  就正常了。
    

相关内容

    暂无相关文章