LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 07-23-2015, 03:38 AM   #1
rickxz
LQ Newbie
 
Registered: Jul 2015
Posts: 1

Rep: Reputation: Disabled
Smile NFS: showmount error: 'clnt_create: RPC: errno 111', but mount success


I am using docker for export NFS, and I have already mapping all ports of NFS port to host OS.
I mount the NFS to client success, but when I try showmount failed.

root@ubuntu2:~# showmount 10.16.17.160
clnt_create: RPC: Port mapper failure - Unable to receive: errno 111 (Connection refused)
root@ubuntu2:~# mount -t nfs4 10.16.17.160:/mnt /mnt

NFS /etc/export
/mnt *(rw,sync,no_root_squash,no_subtree_check)

RPCInfo:
root@ubuntu2:~# rpcinfo -p 10.16.17.160
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
100003 2 tcp 2049 nfs
100003 3 tcp 2049 nfs
100003 4 tcp 2049 nfs
100227 2 tcp 2049
100227 3 tcp 2049
100003 2 udp 2049 nfs
100003 3 udp 2049 nfs
100003 4 udp 2049 nfs
100227 2 udp 2049
100227 3 udp 2049
100021 1 udp 4011 nlockmgr
100021 3 udp 4011 nlockmgr
100021 4 udp 4011 nlockmgr
100021 1 tcp 4011 nlockmgr
100021 3 tcp 4011 nlockmgr
100021 4 tcp 4011 nlockmgr
100005 1 udp 4002 mountd
100005 1 tcp 4002 mountd
100005 2 udp 4002 mountd
100005 2 tcp 4002 mountd
100005 3 udp 4002 mountd
100005 3 tcp 4002 mountd

iptables information:
root@ubuntu0:~# iptables-save
# Generated by iptables-save v1.4.21 on Thu Jul 23 08:33:20 2015
*nat
:PREROUTING ACCEPT [1126:180378]
:INPUT ACCEPT [732:120854]
:OUTPUT ACCEPT [0:0]
:POSTROUTING ACCEPT [1:60]
OCKER - [0:0]
-A PREROUTING -m addrtype --dst-type LOCAL -j DOCKER
-A OUTPUT ! -d 127.0.0.0/8 -m addrtype --dst-type LOCAL -j DOCKER
-A POSTROUTING -s 172.17.0.0/16 ! -o docker0 -j MASQUERADE
-A POSTROUTING -s 172.17.0.11/32 -d 172.17.0.11/32 -p tcp -m tcp --dport 4011 -j MASQUERADE
-A POSTROUTING -s 172.17.0.11/32 -d 172.17.0.11/32 -p tcp -m tcp --dport 4002 -j MASQUERADE
-A POSTROUTING -s 172.17.0.11/32 -d 172.17.0.11/32 -p tcp -m tcp --dport 4001 -j MASQUERADE
-A POSTROUTING -s 172.17.0.11/32 -d 172.17.0.11/32 -p tcp -m tcp --dport 4000 -j MASQUERADE
-A POSTROUTING -s 172.17.0.11/32 -d 172.17.0.11/32 -p tcp -m tcp --dport 2049 -j MASQUERADE
-A POSTROUTING -s 172.17.0.11/32 -d 172.17.0.11/32 -p tcp -m tcp --dport 111 -j MASQUERADE
-A DOCKER -d 10.16.17.160/32 ! -i docker0 -p tcp -m tcp --dport 4011 -j DNAT --to-destination 172.17.0.11:4011
-A DOCKER -d 10.16.17.160/32 ! -i docker0 -p tcp -m tcp --dport 4002 -j DNAT --to-destination 172.17.0.11:4002
-A DOCKER -d 10.16.17.160/32 ! -i docker0 -p tcp -m tcp --dport 4001 -j DNAT --to-destination 172.17.0.11:4001
-A DOCKER -d 10.16.17.160/32 ! -i docker0 -p tcp -m tcp --dport 4000 -j DNAT --to-destination 172.17.0.11:4000
-A DOCKER -d 10.16.17.160/32 ! -i docker0 -p tcp -m tcp --dport 2049 -j DNAT --to-destination 172.17.0.11:2049
-A DOCKER -d 10.16.17.160/32 ! -i docker0 -p tcp -m tcp --dport 111 -j DNAT --to-destination 172.17.0.11:111
COMMIT
# Completed on Thu Jul 23 08:33:20 2015
# Generated by iptables-save v1.4.21 on Thu Jul 23 08:33:20 2015
*filter
:INPUT ACCEPT [1953:293693]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [109:9696]
OCKER - [0:0]
-A INPUT -p tcp -m tcp --dport 2049 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 111 -j ACCEPT
-A FORWARD -o docker0 -j DOCKER
-A FORWARD -o docker0 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
-A FORWARD -i docker0 ! -o docker0 -j ACCEPT
-A FORWARD -i docker0 -o docker0 -j ACCEPT
-A DOCKER -d 172.17.0.11/32 ! -i docker0 -o docker0 -p tcp -m tcp --dport 4011 -j ACCEPT
-A DOCKER -d 172.17.0.11/32 ! -i docker0 -o docker0 -p tcp -m tcp --dport 4002 -j ACCEPT
-A DOCKER -d 172.17.0.11/32 ! -i docker0 -o docker0 -p tcp -m tcp --dport 4001 -j ACCEPT
-A DOCKER -d 172.17.0.11/32 ! -i docker0 -o docker0 -p tcp -m tcp --dport 4000 -j ACCEPT
-A DOCKER -d 172.17.0.11/32 ! -i docker0 -o docker0 -p tcp -m tcp --dport 2049 -j ACCEPT
-A DOCKER -d 172.17.0.11/32 ! -i docker0 -o docker0 -p tcp -m tcp --dport 111 -j ACCEPT
COMMIT
# Completed on Thu Jul 23 08:33:20 2015

Last edited by rickxz; 07-23-2015 at 04:17 AM. Reason: Add export file.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Error when mounting nfs -- mount: Permission denied / rpc.gssd ERROR: No credential intmail01 Linux - Server 1 04-20-2015 03:17 AM
mount to NFS server: RPC Error: Program not registered. joemonp Linux - General 5 10-09-2012 09:18 AM
Unable to NFS mount .ERROR (mount: RPC: Remote system error - Connection timed) pabba Linux - Networking 3 05-06-2010 12:09 PM
RPC: failed to contact portmap (errno -5). .... NFS hedpe Linux - Networking 4 12-14-2006 11:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:01 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration