centos 7 ldap nfs 挂载失败,提示 No route to host 排查过程

栏目: 服务器 · 发布时间: 5年前

内容简介:服务端 172.10.100.129客户端 172.10.100.133首先,ping 没有问题,说明网络是通的

服务端 172.10.100.129

客户端 172.10.100.133

报错

[root@client ~]# vim /etc/exports
[root@client ~]# mount -t nfs -v -o vers=3 172.10.100.129:/home/ldapuser /mnt/
mount.nfs: timeout set for Sun May 21 07:50:28 2017
mount.nfs: trying text-based options 'vers=3,addr=172.10.100.129'
mount.nfs: prog 100003, trying vers=3, prot=6
mount.nfs: portmap query failed: RPC: Remote system error - No route to host
mount.nfs: trying text-based options 'vers=3,addr=172.10.100.129'
mount.nfs: prog 100003, trying vers=3, prot=6
mount.nfs: portmap query failed: RPC: Remote system error - No route to host
mount.nfs: trying text-based options 'vers=3,addr=172.10.100.129'
mount.nfs: prog 100003, trying vers=3, prot=6
mount.nfs: portmap query failed: RPC: Remote system error - No route to host
^C
[root@client ~]#

首先,ping 没有问题,说明网络是通的

[root@client ~]# ping 172.10.100.129
PING 172.10.100.129 (172.10.100.129) 56(84) bytes of data.
64 bytes from 172.10.100.129: icmp_seq=1 ttl=64 time=14.7 ms
64 bytes from 172.10.100.129: icmp_seq=2 ttl=64 time=0.221 ms
64 bytes from 172.10.100.129: icmp_seq=3 ttl=64 time=0.153 ms
64 bytes from 172.10.100.129: icmp_seq=4 ttl=64 time=0.194 ms
^C
--- 172.10.100.129 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3019ms
rtt min/avg/max/mdev = 0.153/3.839/14.789/6.322 ms

既然报路由错误,就查下路由表吧,也没问题

[root@client ~]# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         172.10.100.2    0.0.0.0         UG    100    0        0 ens34
0.0.0.0         172.10.100.2    0.0.0.0         UG    101    0        0 ens33
172.10.100.0    0.0.0.0         255.255.255.0   U     100    0        0 ens34
172.10.100.0    0.0.0.0         255.255.255.0   U     101    0        0 ens33
192.168.122.0   0.0.0.0         255.255.255.0   U     0      0        0 virbr0

服务端自己挂载下 nfs,看看是否起的来,发现没有任何问题

[root@server ~]# exportfs -rv
exporting *:/home/ldapuser
[root@server ~]# clear
[root@server ~]# mount -t nfs -v -o vers=3  172.10.100.129:/home/ldapuser /mnt/
mount.nfs: timeout set for Sun May 21 07:50:04 2017
mount.nfs: trying text-based options 'vers=3,addr=172.10.100.129'
mount.nfs: prog 100003, trying vers=3, prot=6
mount.nfs: trying 172.10.100.129 prog 100003 vers 3 prot TCP port 2049
mount.nfs: prog 100005, trying vers=3, prot=17
mount.nfs: trying 172.10.100.129 prog 100005 vers 3 prot UDP port 20048
[root@server ~]# cd /mnt/
[root@server mnt]# ls
lduser1  lduser2  lduser3  lduser4  lduser5  lduser6

服务端和客户端防火墙和 selinux 状态

[root@server mnt]# getenforce
Disabled
[root@server mnt]# systemctl status firewalld.service
● firewalld.service
   Loaded: masked (/dev/null; bad)
   Active: inactive (dead)
[root@server mnt]#

客户端

[root@client ~]# getenforce
Disabled
[root@client ~]# systemctl status firewalld.service
● firewalld.service - firewalld - dynamic firewall daemon
   Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)
   Active: inactive (dead)
     Docs: man:firewalld(1)

服务端 nfs 重启

[root@server mnt]# systemctl status nfs-server.service
● nfs-server.service - NFS server and services
   Loaded: loaded (/usr/lib/systemd/system/nfs-server.service; enabled; vendor preset: disabled)
   Active: active (exited) since Sun 2017-05-21 07:44:12 CST; 9min ago
  Process: 3113 ExecStopPost=/usr/sbin/exportfs -f (code=exited, status=0/SUCCESS)
  Process: 3109 ExecStopPost=/usr/sbin/exportfs -au (code=exited, status=0/SUCCESS)
  Process: 3108 ExecStop=/usr/sbin/rpc.nfsd 0 (code=exited, status=0/SUCCESS)
  Process: 3125 ExecStart=/usr/sbin/rpc.nfsd $RPCNFSDARGS (code=exited, status=0/SUCCESS)
  Process: 3124 ExecStartPre=/usr/sbin/exportfs -r (code=exited, status=0/SUCCESS)
 Main PID: 3125 (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/nfs-server.service

May 21 07:44:12 server systemd[1]: Starting NFS server and services...
May 21 07:44:12 server systemd[1]: Started NFS server and services.

客户端

[root@client ~]# showmount -e 172.10.100.129
clnt_create: RPC: Port mapper failure - Unable to receive: errno 113 (No route to host)
[root@client ~]# rpcinfo -p localhost
   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  37925  status
    100024    1   tcp  54522  status

解决办法

老子信了你的邪。现在可以确定服务端没问题,那么问题就在客户端,我要使用运维三大法宝了,重启、重装软件、重装系统,在装个系统模拟客户端试试。

2017年5月21日 11点17分记录 经过一上午的折腾 终于搞定了


以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

C++编程思想

C++编程思想

埃克尔(美) / 刘宗田/等 / 机械工业出版社 / 2000-01 / 39.00

一起来看看 《C++编程思想》 这本书的介绍吧!

图片转BASE64编码
图片转BASE64编码

在线图片转Base64编码工具

html转js在线工具
html转js在线工具

html转js在线工具

RGB HSV 转换
RGB HSV 转换

RGB HSV 互转工具