Linux – How to Fix clnt_create RPC Port mapper failure Unable to receive errno 113
I setup on SAP instance hostaname the NFS server without any issues. I’ve exported a local directory using exportfs and also check services: rpcbind and nfs – everything is running correctly. Unfortunatelly on the database host when I try check share using showmount command I receive error: “clnt_create: RPC: Port mapper failure – Unable to receive: errno 113 (No route to host)“.
Solution
Environment:
- server1 – SAP hostname
- server2 – DB hostname
Server1 shares directory /sapmnt/SID. On server2 I try check and mount this share.
-- server2
server2-># showmount -e server1
clnt_create: RPC: Port mapper failure - Unable to receive: errno 113 (No route to host)
Check connectivity between the server1 and server2:
server2-># ping server1
PING server1 (192.168.102.20) 56(84) bytes of data.
64 bytes from server1 (192.168.102.20): icmp_seq=1 ttl=63 time=0.276 ms
64 bytes from server1 (192.168.102.20): icmp_seq=2 ttl=63 time=0.349 ms
On the server2 execute the following, which will display the RPC information of the remote server1:
server2-># rpcinfo -p server1
rpcinfo: can't contact portmapper: RPC: Remote system error - No route to host
Unfortunatelly rpcinfo can’t contact portmapper. Surely the firewall blocking the connections. Check rpcinfo in the opposite direction:
server1-># rpcinfo -p server2
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 50857 status
100024 1 tcp 60452 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 32548 nlockmgr
100021 3 udp 32548 nlockmgr
100021 4 udp 32548 nlockmgr
100021 1 tcp 24564 nlockmgr
100021 3 tcp 24564 nlockmgr
100021 4 tcp 24564 nlockmgr
Now on server1 we open ports on firewall for portmapper (111 tcp/udp), mountd (20048 tcp/udp) and nfs (2049 tpc/udp):
server1-># firewall-cmd --add-port=111/tcp --permanent
server1-># firewall-cmd --add-port=2049/tcp --permanent
server1-># firewall-cmd --add-port=2049/udp --permanent
server1-># firewall-cmd --add-port=111/udp –permanent
server1-># firewall-cmd --add-port=20048/udp --permanent
server1-># firewall-cmd --add-port=20048/tcp --permanent
server1-># firewall-cmd --reload
-- to check Your firewall rules type:
server1-># firewall-cmd --list-all
At the moment everything works correctly. On server2 both commands: showmount and rpcinfo give the results:
server2-># showmount -e server1
Export list for server2:
/sapmnt/SID server2