我在 上启动并运行了一个 NFS 服务器10.77.123.50
。但是,当我尝试挂载此服务器时,出现了 RPC 超时。
背景:服务器和客户端都是 CentOS 7.4.1708。iptables
两台机器上都停止了。/etc/hosts.*
两台机器上的文件都是空的。
步骤 1(来自客户端):showmount -e 10.77.123.50
rpc mount export: RPC: Timed out
第 2 步(来自客户端):我发现我的rpcbind
和nfs
服务与 自行运行良好systemctl status {rpcbind,nfs}
。
步骤 3(来自客户端):rpcinfo -p 10.77.123.50
program vers proto port service
100000 4 tcp 111 portmapper
100000 3 tcp 111 portmapper
100000 2 tcp 111 portmapper
100000 4 udp 111 portmapper
100000 3 udp 111 portmapper
100000 2 udp 111 portmapper
100024 1 udp 45198 status
100024 1 tcp 57197 status
100005 1 udp 20048 mountd
100005 1 tcp 20048 mountd
100005 2 udp 20048 mountd
100005 2 tcp 20048 mountd
100005 3 udp 20048 mountd
100005 3 tcp 20048 mountd
100003 3 tcp 2049 nfs
100003 4 tcp 2049 nfs
100227 3 tcp 2049 nfs_acl
100003 3 udp 2049 nfs
100003 4 udp 2049 nfs
100227 3 udp 2049 nfs_acl
100021 1 udp 51317 nlockmgr
100021 3 udp 51317 nlockmgr
100021 4 udp 51317 nlockmgr
100021 1 tcp 33107 nlockmgr
100021 3 tcp 33107 nlockmgr
100021 4 tcp 33107 nlockmgr
步骤 4(来自客户端):我能够访问服务器并通过 telnet 连接到它的两个 NFS 端口。
# ping 10.77.123.50
PING 10.77.123.50 (10.77.123.50) 56(84) bytes of data.
64 bytes from 10.77.123.50: icmp_seq=1 ttl=64 time=0.122 ms
# telnet 10.77.217.50 111
Trying 10.77.217.50...
Connected to 10.77.217.50.
# telnet 10.77.123.50 2049
Trying 10.77.123.50...
Connected to 10.77.123.50.
步骤 5(从服务器):tcpdump -i $INTERFACE host 10.77.123
我看到数据包通过随机端口(例如、、、)从客户端传入,并从59295
服务器的、和端口传出到客户端。以下是 3 秒时间范围内有 105 个数据包的示例:57291
40146
49933
.mountd
.sunrpc
.nfs
# first 9 packets
IP server.nfs > client.59295: Flags [P.], seq 1:29, ack 45, win 227, options [nop,nop,TS val 3265431829 ecr 10092752], length 28: NFS reply xid 1018070416 reply ok 24 null
IP client.59295 > server.nfs: Flags [.], ack 29, win 229, options [nop,nop,TS val 10092752 ecr 3265431829], length 0
IP client.59295 > server.nfs: Flags [F.], seq 45, ack 29, win 229, options [nop,nop,TS val 10092752 ecr 3265431829], length 0
IP server.nfs > client.59295: Flags [F.], seq 29, ack 46, win 227, options [nop,nop,TS val 3265431829 ecr 10092752], length 0
IP client.59295 > server.nfs: Flags [.], ack 30, win 229, options [nop,nop,TS val 10092752 ecr 3265431829], length 0
IP client.57291 > server.sunrpc: UDP, length 56
IP server.sunrpc > client.57291: UDP, length 28
IP client.40146 > server.mountd: UDP, length 40
IP server.mountd > client.48400: Flags [.], ack 46, win 227, options [nop,nop,TS val 3265431868 ecr 10092752], length 0
# last 7 packets
IP client.49933 > server.mountd: Flags [S], seq 1812867745, win 29200, options [mss 1460,sackOK,TS val 10095756 ecr 0,nop,wscale 7], length 0
IP server.mountd > client.49933: Flags [S.], seq 2225809285, ack 1812867746, win 28960, options [mss 1460,sackOK,TS val 3265434833 ecr 10095756,nop,wscale 7], length 0
IP client.49933 > server.mountd: Flags [.], ack 1, win 229, options [nop,nop,TS val 10095756 ecr 3265434833], length 0
IP client.49933 > server.mountd: Flags [P.], seq 1:45, ack 1, win 229, options [nop,nop,TS val 10095756 ecr 3265434833], length 44
IP client.49933 > server.mountd: Flags [P.], seq 1:45, ack 1, win 229, options [nop,nop,TS val 10095957 ecr 3265434833], length 44
IP client.49933 > server.mountd: Flags [P.], seq 1:45, ack 1, win 229, options [nop,nop,TS val 10096161 ecr 3265434833], length 44
IP client.49933 > server.mountd: Flags [P.], seq 1:45, ack 1, win 229, options [nop,nop,TS val 10096570 ecr 3265434833], length 44
我不知道我能从以上内容诊断出什么tcpdump
。我还能做什么来解决我的问题?