# HDFS NFS support for docker

**URL:** <https://forums.mobyproject.org/t/hdfs-nfs-support-for-docker/318>\
**Category:** Support\
**Created:** [August 8, 2018, 12:02pm UTC](https://forums.mobyproject.org/t/hdfs-nfs-support-for-docker/318 "2018-08-08T12:02:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mayank](https://avatars.discourse-cdn.com/v4/letter/m/bc8723/32.png) [@mayank](https://forums.mobyproject.org/u/mayank)\
**Post date:** [August 8, 2018, 12:02pm UTC](https://forums.mobyproject.org/t/hdfs-nfs-support-for-docker/318/1 "2018-08-08T12:02:27Z")

</div>

Hi,  
I am working on docker with HDFS NFS gateway. Docker “host” network I used for hadoop master and slave.

I have stopped host rpcbind and nfs, and then run hdfs nfs services inside container

‘rpcinfo -p localhost’ shows:  
program vers proto port service  
100005 3 udp 4242 mountd  
100005 1 tcp 4242 mountd  
100000 2 udp 111 portmapper  
100000 2 tcp 111 portmapper  
100005 3 tcp 4242 mountd  
100005 2 tcp 4242 mountd  
100003 3 tcp 2049 nfs  
100005 2 udp 4242 mountd  
100005 1 udp 4242 mountd

Then hadoop daemons are started, jps shows:  
1344 Portmap  
3345 NameNode  
3793 SecondaryNameNode  
4434 NodeManager  
4706 JobHistoryServer  
3525 DataNode  
1708 Nfs3  
4988 Jps  
4109 ResourceManager

Output of showmount -e is:  
Export list for master:  
/ \*

When I try to mount hdfs inside container, following error is thrown:  
$mount -o nolock,vers=3 localhost:/ /CHK -vvv  
mount: fstab path: “/etc/fstab”  
mount: mtab path: “/etc/mtab”  
mount: lock path: “/etc/mtab~”  
mount: temp path: “/etc/mtab.tmp”  
mount: UID: 0  
mount: eUID: 0  
mount: no type was given - I’ll assume nfs because of the colon  
mount: spec: “localhost:/”  
mount: node: “/CHK”  
mount: types: “nfs”  
mount: opts: “nolock,vers=3”  
final mount options: ‘nolock,vers=3’  
mount: external mount: argv[0] = “/sbin/mount.nfs”  
mount: external mount: argv[1] = “localhost:/”  
mount: external mount: argv[2] = “/CHK”  
mount: external mount: argv[3] = “-v”  
mount: external mount: argv[4] = “-o”  
mount: external mount: argv[5] = “rw,nolock,vers=3”  
mount.nfs: timeout set for Wed Aug 8 17:23:45 2018  
mount.nfs: trying text-based options ‘nolock,vers=3,addr=::1’  
mount.nfs: prog 100003, trying vers=3, prot=6  
mount.nfs: portmap query retrying: RPC: Unable to receive  
mount.nfs: prog 100003, trying vers=3, prot=17  
mount.nfs: portmap query failed: RPC: Unable to receive - Connection refused  
mount.nfs: trying text-based options ‘nolock,vers=3,addr=127.0.0.1’  
mount.nfs: prog 100003, trying vers=3, prot=6  
mount.nfs: trying 127.0.0.1 prog 100003 vers 3 prot TCP port 2049  
mount.nfs: prog 100005, trying vers=3, prot=17  
mount.nfs: trying 127.0.0.1 prog 100005 vers 3 prot UDP port 4242  
mount.nfs: mount(2): Input/output error  
mount.nfs: mount system call failed

How to resolve the above error while client mounting even on the same host?
