免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 15473 | 回复: 11
打印 上一主题 下一主题

配置nfs,在client端mount时报RPC: Rpcbind failure - RPC: Timed out [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-06-18 16:40 |只看该作者 |倒序浏览
server端(1.1.6.6八)
修改 /etc/dfs/dfstab文件
# more /etc/dfs/dfstab
#       Place share(1M) commands here for automatic execution
#       on entering init state 3.
#
#       Issue the command '/etc/init.d/nfs.server start' to run the NFS
#       daemon processes and the share commands, after adding the very
#       first entry to this file.
#
#       share [-F fstype] [ -o options] [-d "<text>"] <pathname> [resource]
#       .e.g,
#       share  -F nfs  -o rw=engineering  -d "home dirs"  /export/home2
share  -F nfs  -o rw=1.1.1.3        /tmp
启动server nfs进程
#/etc/init.d/nfs.server start


client端(1.1.1.3)

#/etc/init.d/nfs.client start
#mount 1.1.6.68:/tmp /nfs
nfs mount: 1.1.6.68: : RPC: Rpcbind failure - RPC: Timed out
nfs mount: retrying: /nfs

查原因:

The rpcbind failure error
&:nfs mount: server1:: RPC: Rpcbind failure
RPC: Timed Out
nfs mount: retrying: /mntpoint
服务器负荷过重,资源已接近临界状态,或者是hosts数据库中的数据有误比如错误的IP地址或者是错误的主机名,或者是server 端的hosts数据库停止工作。

查看server端cpu负载,在客户端mount过程中,server端cpu负载的确是直线上升,但我总觉得负载大一点也不会就真的让服务都无法起来了啊!

# w
  4:31pm  up 338 day(s), 16:54,  6 users,  load average: 12.90, 8.07, 7.50
# w
#   4:31pm  up 338 day(s), 16:54,  6 users,  load average: 13.75, 8.27, 7.57
# w
#   4:31pm  up 338 day(s), 16:54,  6 users,  load average: 14.20, 8.38, 7.61
# w
  4:31pm  up 338 day(s), 16:54,  6 users,  load average: 15.80, 8.79, 7.75
# w
  4:31pm  up 338 day(s), 16:54,  6 users,  load average: 16.26, 8.93, 7.80

# w
  4:31pm  up 338 day(s), 16:54,  6 users,  load average: 17.12, 9.20, 7.89
# w
  4:31pm  up 338 day(s), 16:54,  6 users,  load average: 17.43, 9.32, 7.94


还有一个问题,启动nfs.client后,客户端的lockd和statd就会一直存在吗?

# pwd
/etc/init.d
# ./nfs.client stop
# ./nfs.client start
# ps -ef|grep nfs  
    root 15231     1  0 16:36:38 ?        0:00 /usr/lib/nfs/lockd
    root 15230     1  0 16:36:38 ?        0:00 /usr/lib/nfs/statd
    root 15242  4359  0 16:36:41 pts/1    0:00 grep nfs
但过了一会,statd自动消失了,不知道是为什么?
# ps -ef|grep nfs  
    root  7621     1  0 16:09:07 ?        0:00 /usr/lib/nfs/lockd
    root 15183  4359  0 16:36:22 pts/1    0:00 grep nfs

[ 本帖最后由 wangyl1977 于 2007-6-18 16:43 编辑 ]

论坛徽章:
0
2 [报告]
发表于 2007-06-18 22:43 |只看该作者
可能是防火墙的问题,网络连接方面的问题.


顺便宣传一下,,有空访问一下http://h50069.www5.hp.com/e-Deli ... f&Node=00020004
这里我是斑竹,哈哈

论坛徽章:
0
3 [报告]
发表于 2007-06-19 02:32 |只看该作者
1. On the NFS server, type: dfshares  Do you see /tmp being shared?
(By the way, you really shouldn't share /tmp, since it is the virtual swap space in Solaris)
2. On the server, dfsares 1.1.6.68   Do you see the shares?
3. On the client, can you ping 1.1.6.68 ?
4. On the client, can you telnet 1.1.6.68 111  ( see whether RPC is running or not)
5. On the client, dfshares 1.1.6.68, do you get nay result?

Don't worry about statd for now. It is not needed for mounting

论坛徽章:
0
4 [报告]
发表于 2007-06-19 09:30 |只看该作者
不可能的,我在同一个网段的两个机器上也试过的,结果也是如此!
我的OS都是7,8,没有sunscreen的防火墙的!

原帖由 woson 于 2007-6-18 22:43 发表
可能是防火墙的问题,网络连接方面的问题.


顺便宣传一下,,有空访问一下[url]http://h50069.www5.hp.com/e-Delivery3/Forum/WebUI/Messages/ShowForum.aspx?RID=ff821abd-2df2-4e68-99d0-daa34c67801f&Nod ...

论坛徽章:
0
5 [报告]
发表于 2007-06-19 09:31 |只看该作者
老大的分析太全面啦!
多谢!还想问一下,我的步骤基本正确吧?


原帖由 briangao 于 2007-6-19 02:32 发表
1. On the NFS server, type: dfshares  Do you see /tmp being shared?
(By the way, you really shouldn't share /tmp, since it is the virtual swap space in Solaris)
2. On the server, dfsares 1.1.6.6 ...

论坛徽章:
0
6 [报告]
发表于 2007-06-19 10:13 |只看该作者
配置没错,重启就好了,服务器端手工share一下
share  -F nfs  -o rw=1.1.1.3        /tmp

论坛徽章:
0
7 [报告]
发表于 2007-06-21 09:55 |只看该作者

是由于rpc未启动

server端
#dfshares
nfs dfshares:ginger: RPC: Rpcbind failure - RPC: Timed out
# ps -ef|grep rpc
    root 27921 14500  0 09:28:04 pts/1    0:00 grep rpc
# netstat -an|grep 111
肯定是由于rpc未启动(以前安全加固时把rpc给disable了)

# /etc/rc2.d/S71rpc start
starting rpc services: rpcbind keyserv done.
# dfshares
nfs dfshares:ginger: RPC: Program not registered

需要重起一下nfs.server.
# /etc/init.d/nfs.server stop
# /etc/init.d/nfs.server start
启动nfs.server 也就不到十秒钟,如果在没有启动rpc的情况下启动nfs.server就需要好几分钟.通过这也能判断出nfs启动是否有问题.
#  dfshares
RESOURCE                                  SERVER ACCESS    TRANSPORT
    host:/tmp                           host  -         -

client端(1.1.1.3)

#mount 1.1.6.68:/tmp /nfs
# df -k
Filesystem            kbytes    used   avail capacity  Mounted on
-----------------------------------------------------------------
1.1.6.68:/tmp         2481656  220904 2260752     9%    /nfs
成功

总结: solaris下启动nfs要在启动nfs服务之前先启动RPC服务(只需要server端运行),一定要保证rpc服务在运行,就象linux运行nfs时要先启动portmap,不过需要在server端和client端同时启动portmap
    以前有人总说solaris有些傻,以前不知道是什么意思, 现在稍有体会。Linux下不启动portmap而先启动nfs时会提示你启动失败,要你去启动rpc(详细请参见我的文章Linux下的NFS配置http://blog.chinaunix.net/u/2005/showart_322738.html). Solaris就没有这种提示,只是启动nfs.server会很慢。这也许就是linux越来越流行的一个原因吧。




原帖由 briangao 于 2007-6-19 02:32 发表
1. On the NFS server, type: dfshares  Do you see /tmp being shared?
(By the way, you really shouldn't share /tmp, since it is the virtual swap space in Solaris)
2. On the server, dfsares 1.1.6.6 ...

[ 本帖最后由 wangyl1977 于 2007-6-21 10:00 编辑 ]

论坛徽章:
0
8 [报告]
发表于 2007-06-21 10:23 |只看该作者
linux流行主要是硬件成本较低和应用软件的支持,跟NFS没什么关系吧

论坛徽章:
0
9 [报告]
发表于 2007-06-21 10:42 |只看该作者
是没啥关系,但配NFS时solaris也没有linux简便好用啊!
关键是提示信息不够!

原帖由 race 于 2007-6-21 10:23 发表
linux流行主要是硬件成本较低和应用软件的支持,跟NFS没什么关系吧

论坛徽章:
1
荣誉会员
日期:2011-11-23 16:44:17
10 [报告]
发表于 2007-06-21 13:38 |只看该作者
原帖由 wangyl1977 于 2007-6-21 09:55 发表
……
# ps -ef|grep rpc
    root 27921 14500  0 09:28:04 pts/1    0:00 grep rpc
# netstat -an|grep 111
肯定是由于rpc未启动(以前安全加固时把rpc给disable了) ...


这个是关键所在。
系统管理员对系统缺省设置做的改变应该记录备查,这样看到RPC:Rpcbind failure时,一查便知。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP