NFSv3 fails to mount over TCP and NAT
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
nfs-utils (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: nfs-common
The NFS server (fob, running Solaris 9) allows only TCP connections (see rpcinfo output below). The client is an Ubuntu 8.04.3 LTS and is behind a SNAT gateway. When trying to mount a shared resource from behind the NAT gateway, NFS fails with 'mount.nfs: internal error'. Further debug information attached below. Our setup works perfectly with an old Debian 4.0 Etch so this must be somehow Ubuntu related. In my opinion this bug should be considered as critical.
# rpcinfo -p fob
program vers proto port
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
100011 1 udp 32775 rquotad
100024 1 udp 32776 status
100024 1 tcp 32771 status
100133 1 udp 32776
100133 1 tcp 32771
100021 1 udp 4045 nlockmgr
100021 2 udp 4045 nlockmgr
100021 3 udp 4045 nlockmgr
100021 4 udp 4045 nlockmgr
100021 1 tcp 4045 nlockmgr
100021 2 tcp 4045 nlockmgr
100021 3 tcp 4045 nlockmgr
100021 4 tcp 4045 nlockmgr
100005 1 udp 32786 mountd
100005 2 udp 32786 mountd
100005 3 udp 32786 mountd
100005 1 tcp 32781 mountd
100005 2 tcp 32781 mountd
100005 3 tcp 32781 mountd
100003 2 tcp 2049 nfs
100003 3 tcp 2049 nfs
100227 2 tcp 2049
100227 3 tcp 2049
# rpcdebug -m nfs -s mount
# mount -o rw,tcp,hard,intr fob:/export/volume3 /mnt/
causes the following error in dmesg:
[83815.508808] RPC: Registered udp transport module.
[83815.508812] RPC: Registered tcp transport module.
[83850.477548] rpcbind: server fob not responding, timed out
[84385.901595] NFS: nfs mount opts='tcp,
[84385.901601] NFS: parsing nfs mount option 'tcp'
[84385.901604] NFS: parsing nfs mount option 'hard'
[84385.901667] NFS: parsing nfs mount option 'intr'
[84385.901669] NFS: parsing nfs mount option 'addr=<myip>'
[84385.901676] NFS: sending MNT request for fob:/export/volume3
[84420.827957] rpcbind: server fob not responding, timed out
[84420.828047] NFS: failed to create RPC client, status=-5
[84420.828052] NFS: unable to mount server <myip>, error -5
Most likely the problem shows up because RPC binds to ports under 1024 while mounting nfs. This fails when the NFS server has unprivildged ports denied. Nfs shoud therefore be patched to not to bind to ports under the 1024 mark.