Bug 985165 - If no nfsvers option specified, mount.nfs can not negotiates a suitable version with the server.
If no nfsvers option specified, mount.nfs can not negotiates a suitable versi...
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: nfs-utils (Show other bugs)
6.4
All Linux
medium Severity high
: rc
: ---
Assigned To: Steve Dickson
Yin.JianHong
:
Depends On:
Blocks: 985167
  Show dependency treegraph
 
Reported: 2013-07-16 21:47 EDT by Yin.JianHong
Modified: 2017-03-30 05:53 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 985167 (view as bug list)
Environment:
Last Closed: 2014-07-08 11:42:30 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Yin.JianHong 2013-07-16 21:47:20 EDT
Description of problem:
If the nfs server just support v2 v3 UDP mode, and if no nfsvers option specified, autofs can not auto mount the directory exported.
  it should try all nfs version(v4 v3 v2, tcp+udp).

Version-Release number of selected component (if applicable):
client rhel6.4 autofs-5.0.5-73.el6
server rhel5.9 nfs-utils-1.0.9-66.el5
    (because some bug, rhel[6,7] can not disable nfs4 and tcp)

How reproducible:
100%

Steps to Reproduce:
1. at nfs server disble nfs4 and tcp support: in /etc/sysconfig/nfs
     RPCNFSDARGS="-N 4 --no-tcp"
     RPCMOUNTDOPTS="--no-tcp"
   export a dir $expdir
2. at client, config automount the $serverAddr:$expdir
   not specify the nfs mount option.
3. ls the mountpoint

Actual results:
automount fail

Expected results:
automount success

Additional info:
If I specify vers=3 or vers=2 in the auto.nfs, auto mount success.
Comment 2 Yin.JianHong 2013-07-16 23:34:16 EDT
if use the follow nfs config: auto mount success  (fail in RHEL7 bz985167)
# rpcinfo -p | egrep -w 'mountd|nfs'
    100003    2   udp   2049  nfs
    100003    2   tcp   2049  nfs
    100005    1   udp    785  mountd
    100005    2   udp    785  mountd
    100005    3   udp    785  mountd

use this config, also auto mount success.
# rpcinfo -p | egrep -w 'mountd|nfs'
    100003    2   udp   2049  nfs
    100003    3   udp   2049  nfs
    100003    2   tcp   2049  nfs
    100003    3   tcp   2049  nfs
    100005    1   udp    960  mountd
    100005    2   udp    960  mountd
    100005    3   udp    960  mountd
Comment 3 Ian Kent 2013-07-16 23:44:39 EDT
(In reply to Yin.JianHong from comment #0)
> 
> How reproducible:
> 100%

OK, I see a problem using the nfs server setting you specify
but I'm using different server and client.

> 
> Steps to Reproduce:
> 1. at nfs server disble nfs4 and tcp support: in /etc/sysconfig/nfs
>      RPCNFSDARGS="-N 4 --no-tcp"
>      RPCMOUNTDOPTS="--no-tcp"
>    export a dir $expdir
> 2. at client, config automount the $serverAddr:$expdir
>    not specify the nfs mount option.
> 3. ls the mountpoint
> 
> Actual results:
> automount fail

But what does that mean?
Describe the failure you are seeing so I can work out if we
are seeing the same problem.

An autofs debug log might also help to check we are seeing
the same problem.

Ian
Comment 4 Yin.JianHong 2013-07-17 00:55:31 EDT
Hi Ian

I open the debug flag in /etc/sysconfig/autofs, reproduce it. log info:
===BEGIN===
# time ls /expDir/systmp; sleep 5; pkill tcpdump
ls: cannot access /expDir/systmp: No such file or directory

real    2m5.051s
user    0m0.000s
sys     0m0.004s

# tail -f /var/log/messages
Jul 17 12:44:00 dhcp-13-188 kernel: device eth0 entered promiscuous mode
Jul 17 12:44:04 dhcp-13-188 automount[873]: handle_packet: type = 3
Jul 17 12:44:04 dhcp-13-188 automount[873]: handle_packet_missing_indirect: token 48, name systmp, request pid 891
Jul 17 12:44:04 dhcp-13-188 automount[873]: attempting to mount entry /expDir/systmp
Jul 17 12:44:04 dhcp-13-188 automount[873]: lookup_mount: lookup(file): looking up systmp
Jul 17 12:44:04 dhcp-13-188 automount[873]: lookup_mount: lookup(file): systmp -> -nobind,rw   10.66.13.16:/tmp
Jul 17 12:44:04 dhcp-13-188 automount[873]: parse_mount: parse(sun): expanded entry: -nobind,rw   10.66.13.16:/tmp
Jul 17 12:44:04 dhcp-13-188 automount[873]: parse_mount: parse(sun): gathered options: nobind,rw
Jul 17 12:44:04 dhcp-13-188 automount[873]: parse_mount: parse(sun): dequote("10.66.13.16:/tmp") -> 10.66.13.16:/tmp
Jul 17 12:44:04 dhcp-13-188 automount[873]: parse_mount: parse(sun): core of entry: options=nobind,rw, loc=10.66.13.16:/tmp
Jul 17 12:44:04 dhcp-13-188 automount[873]: sun_mount: parse(sun): mounting root /expDir, mountpoint systmp, what 10.66.13.16:/tmp, fstype nfs, options nobind,rw
Jul 17 12:44:04 dhcp-13-188 automount[873]: mount_mount: mount(nfs): nfs options="rw", nobind=1, nosymlink=0, ro=0
Jul 17 12:44:04 dhcp-13-188 automount[873]: get_nfs_info: called with host 10.66.13.16(10.66.13.16) proto tcp version 0x70
Jul 17 12:44:04 dhcp-13-188 automount[873]: get_nfs_info: called with host 10.66.13.16(10.66.13.16) proto udp version 0x70
Jul 17 12:44:04 dhcp-13-188 automount[873]: get_nfs_info: nfs v3 rpc ping time: 0.000360
Jul 17 12:44:04 dhcp-13-188 automount[873]: get_nfs_info: nfs v2 rpc ping time: 0.000265
Jul 17 12:44:04 dhcp-13-188 automount[873]: get_nfs_info: host 10.66.13.16 cost 312 weight 0
Jul 17 12:44:04 dhcp-13-188 automount[873]: prune_host_list: selected subset of hosts that support NFS3 over UDP
Jul 17 12:44:04 dhcp-13-188 automount[873]: mount_mount: mount(nfs): calling mkdir_path /expDir/systmp
Jul 17 12:44:04 dhcp-13-188 automount[873]: mount_mount: mount(nfs): calling mount -t nfs -s -o rw 10.66.13.16:/tmp /expDir/systmp
Jul 17 12:44:57 dhcp-13-188 automount[873]: st_expire: state 1 path /net
Jul 17 12:44:57 dhcp-13-188 automount[873]: expire_proc: exp_proc = 139975535851264 path /net
Jul 17 12:44:57 dhcp-13-188 automount[873]: expire_cleanup: got thid 139975535851264 path /net stat 0
Jul 17 12:44:57 dhcp-13-188 automount[873]: expire_cleanup: sigchld: exp 139975535851264 finished, switching from 2 to 1
Jul 17 12:44:57 dhcp-13-188 automount[873]: st_ready: st_ready(): state = 2 path /net
Jul 17 12:45:25 dhcp-13-188 automount[873]: st_expire: state 1 path /misc
Jul 17 12:45:25 dhcp-13-188 automount[873]: expire_proc: exp_proc = 139975535851264 path /misc
Jul 17 12:45:25 dhcp-13-188 automount[873]: expire_cleanup: got thid 139975535851264 path /misc stat 0
Jul 17 12:45:25 dhcp-13-188 automount[873]: expire_cleanup: sigchld: exp 139975535851264 finished, switching from 2 to 1
Jul 17 12:45:25 dhcp-13-188 automount[873]: st_ready: st_ready(): state = 2 path /misc
Jul 17 12:46:00 dhcp-13-188 automount[873]: st_expire: state 1 path /expDir
Jul 17 12:46:00 dhcp-13-188 automount[873]: expire_proc: exp_proc = 139975535851264 path /expDir
Jul 17 12:46:00 dhcp-13-188 automount[873]: expire_cleanup: got thid 139975535851264 path /expDir stat 0
Jul 17 12:46:00 dhcp-13-188 automount[873]: expire_cleanup: sigchld: exp 139975535851264 finished, switching from 2 to 1
Jul 17 12:46:00 dhcp-13-188 automount[873]: st_ready: st_ready(): state = 2 path /expDir
Jul 17 12:46:09 dhcp-13-188 automount[873]: >> mount.nfs: Connection timed out
Jul 17 12:46:09 dhcp-13-188 automount[873]: mount(nfs): nfs: mount failure 10.66.13.16:/tmp on /expDir/systmp
Jul 17 12:46:09 dhcp-13-188 automount[873]: dev_ioctl_send_fail: token = 48
Jul 17 12:46:09 dhcp-13-188 automount[873]: failed to mount /expDir/systmp
Jul 17 12:46:09 dhcp-13-188 automount[873]: handle_packet: type = 3
Jul 17 12:46:09 dhcp-13-188 automount[873]: handle_packet_missing_indirect: token 49, name systmp, request pid 891
Jul 17 12:46:09 dhcp-13-188 automount[873]: attempting to mount entry /expDir/systmp
Jul 17 12:46:09 dhcp-13-188 automount[873]: lookup_mount: lookup(file): looking up systmp
Jul 17 12:46:09 dhcp-13-188 automount[873]: dev_ioctl_send_fail: token = 49
Jul 17 12:46:09 dhcp-13-188 automount[873]: failed to mount /expDir/systmp
Jul 17 12:46:12 dhcp-13-188 automount[873]: st_expire: state 1 path /net
Jul 17 12:46:12 dhcp-13-188 automount[873]: expire_proc: exp_proc = 139975605958400 path /net
Jul 17 12:46:12 dhcp-13-188 automount[873]: expire_cleanup: got thid 139975605958400 path /net stat 0
Jul 17 12:46:12 dhcp-13-188 automount[873]: expire_cleanup: sigchld: exp 139975605958400 finished, switching from 2 to 1
Jul 17 12:46:12 dhcp-13-188 automount[873]: st_ready: st_ready(): state = 2 path /net
Jul 17 12:46:14 dhcp-13-188 kernel: device eth0 left promiscuous mode
Jul 17 12:46:40 dhcp-13-188 automount[873]: st_expire: state 1 path /misc
Jul 17 12:46:40 dhcp-13-188 automount[873]: expire_proc: exp_proc = 139975605958400 path /misc
Jul 17 12:46:40 dhcp-13-188 automount[873]: expire_cleanup: got thid 139975605958400 path /misc stat 0
Jul 17 12:46:40 dhcp-13-188 automount[873]: expire_cleanup: sigchld: exp 139975605958400 finished, switching from 2 to 1
Jul 17 12:46:40 dhcp-13-188 automount[873]: st_ready: st_ready(): state = 2 path /misc
Jul 17 12:47:15 dhcp-13-188 automount[873]: st_expire: state 1 path /expDir
Jul 17 12:47:15 dhcp-13-188 automount[873]: expire_proc: exp_proc = 139975605958400 path /expDir
Jul 17 12:47:15 dhcp-13-188 automount[873]: expire_cleanup: got thid 139975605958400 path /expDir stat 0
Jul 17 12:47:15 dhcp-13-188 automount[873]: expire_cleanup: sigchld: exp 139975605958400 finished, switching from 2 to 1
Jul 17 12:47:15 dhcp-13-188 automount[873]: st_ready: st_ready(): state = 2 path /expDir
Jul 17 12:47:27 dhcp-13-188 automount[873]: st_expire: state 1 path /net
Jul 17 12:47:27 dhcp-13-188 automount[873]: expire_proc: exp_proc = 139975605958400 path /net
Jul 17 12:47:27 dhcp-13-188 automount[873]: expire_cleanup: got thid 139975605958400 path /net stat 0
Jul 17 12:47:27 dhcp-13-188 automount[873]: expire_cleanup: sigchld: exp 139975605958400 finished, switching from 2 to 1
Jul 17 12:47:27 dhcp-13-188 automount[873]: st_ready: st_ready(): state = 2 path /net
Jul 17 12:47:55 dhcp-13-188 automount[873]: st_expire: state 1 path /misc
Jul 17 12:47:55 dhcp-13-188 automount[873]: expire_proc: exp_proc = 139975605958400 path /misc
Jul 17 12:47:55 dhcp-13-188 automount[873]: expire_cleanup: got thid 139975605958400 path /misc stat 0
Jul 17 12:47:55 dhcp-13-188 automount[873]: expire_cleanup: sigchld: exp 139975605958400 finished, switching from 2 to 1
Jul 17 12:47:55 dhcp-13-188 automount[873]: st_ready: st_ready(): state = 2 path /misc
Jul 17 12:48:30 dhcp-13-188 automount[873]: st_expire: state 1 path /expDir
Jul 17 12:48:30 dhcp-13-188 automount[873]: expire_proc: exp_proc = 139975605958400 path /expDir
Jul 17 12:48:30 dhcp-13-188 automount[873]: expire_cleanup: got thid 139975605958400 path /expDir stat 0
Jul 17 12:48:30 dhcp-13-188 automount[873]: expire_cleanup: sigchld: exp 139975605958400 finished, switching from 2 to 1
Jul 17 12:48:30 dhcp-13-188 automount[873]: st_ready: st_ready(): state = 2 path /expDir
Jul 17 12:48:42 dhcp-13-188 automount[873]: st_expire: state 1 path /net
Jul 17 12:48:42 dhcp-13-188 automount[873]: expire_proc: exp_proc = 139975605958400 path /net
Jul 17 12:48:42 dhcp-13-188 automount[873]: expire_cleanup: got thid 139975605958400 path /net stat 0
Jul 17 12:48:42 dhcp-13-188 automount[873]: expire_cleanup: sigchld: exp 139975605958400 finished, switching from 2 to 1
Jul 17 12:48:42 dhcp-13-188 automount[873]: st_ready: st_ready(): state = 2 path /net
Jul 17 12:49:10 dhcp-13-188 automount[873]: st_expire: state 1 path /misc
Jul 17 12:49:10 dhcp-13-188 automount[873]: expire_proc: exp_proc = 139975605958400 path /misc
Jul 17 12:49:10 dhcp-13-188 automount[873]: expire_cleanup: got thid 139975605958400 path /misc stat 0
Jul 17 12:49:10 dhcp-13-188 automount[873]: expire_cleanup: sigchld: exp 139975605958400 finished, switching from 2 to 1
Jul 17 12:49:10 dhcp-13-188 automount[873]: st_ready: st_ready(): state = 2 path /misc
Jul 17 12:49:45 dhcp-13-188 automount[873]: st_expire: state 1 path /expDir
Jul 17 12:49:45 dhcp-13-188 automount[873]: expire_proc: exp_proc = 139975605958400 path /expDir
Jul 17 12:49:45 dhcp-13-188 automount[873]: expire_cleanup: got thid 139975605958400 path /expDir stat 0
Jul 17 12:49:45 dhcp-13-188 automount[873]: expire_cleanup: sigchld: exp 139975605958400 finished, switching from 2 to 1
Jul 17 12:49:45 dhcp-13-188 automount[873]: st_ready: st_ready(): state = 2 path /expDir
Jul 17 12:49:57 dhcp-13-188 automount[873]: st_expire: state 1 path /net
Jul 17 12:49:57 dhcp-13-188 automount[873]: expire_proc: exp_proc = 139975605958400 path /net
Jul 17 12:49:57 dhcp-13-188 automount[873]: expire_cleanup: got thid 139975605958400 path /net stat 0
Jul 17 12:49:57 dhcp-13-188 automount[873]: expire_cleanup: sigchld: exp 139975605958400 finished, switching from 2 to 1
Jul 17 12:49:57 dhcp-13-188 automount[873]: st_ready: st_ready(): state = 2 path /net
Jul 17 12:50:25 dhcp-13-188 automount[873]: st_expire: state 1 path /misc
Jul 17 12:50:25 dhcp-13-188 automount[873]: expire_proc: exp_proc = 139975605958400 path /misc
Jul 17 12:50:25 dhcp-13-188 automount[873]: expire_cleanup: got thid 139975605958400 path /misc stat 0
Jul 17 12:50:25 dhcp-13-188 automount[873]: expire_cleanup: sigchld: exp 139975605958400 finished, switching from 2 to 1
Jul 17 12:50:25 dhcp-13-188 automount[873]: st_ready: st_ready(): state = 2 path /misc
Jul 17 12:51:00 dhcp-13-188 automount[873]: st_expire: state 1 path /expDir
Jul 17 12:51:00 dhcp-13-188 automount[873]: expire_proc: exp_proc = 139975605958400 path /expDir
Jul 17 12:51:00 dhcp-13-188 automount[873]: expire_cleanup: got thid 139975605958400 path /expDir stat 0
Jul 17 12:51:00 dhcp-13-188 automount[873]: expire_cleanup: sigchld: exp 139975605958400 finished, switching from 2 to 1
Jul 17 12:51:00 dhcp-13-188 automount[873]: st_ready: st_ready(): state = 2 path /expDir
Jul 17 12:51:12 dhcp-13-188 automount[873]: st_expire: state 1 path /net
Jul 17 12:51:12 dhcp-13-188 automount[873]: expire_proc: exp_proc = 139975605958400 path /net
Jul 17 12:51:12 dhcp-13-188 automount[873]: expire_cleanup: got thid 139975605958400 path /net stat 0
Jul 17 12:51:12 dhcp-13-188 automount[873]: expire_cleanup: sigchld: exp 139975605958400 finished, switching from 2 to 1
Jul 17 12:51:12 dhcp-13-188 automount[873]: st_ready: st_ready(): state = 2 path /net
Jul 17 12:51:40 dhcp-13-188 automount[873]: st_expire: state 1 path /misc
Jul 17 12:51:40 dhcp-13-188 automount[873]: expire_proc: exp_proc = 139975605958400 path /misc
Jul 17 12:51:40 dhcp-13-188 automount[873]: expire_cleanup: got thid 139975605958400 path /misc stat 0
Jul 17 12:51:40 dhcp-13-188 automount[873]: expire_cleanup: sigchld: exp 139975605958400 finished, switching from 2 to 1
Jul 17 12:51:40 dhcp-13-188 automount[873]: st_ready: st_ready(): state = 2 path /misc
Jul 17 12:52:15 dhcp-13-188 automount[873]: st_expire: state 1 path /expDir
Jul 17 12:52:15 dhcp-13-188 automount[873]: expire_proc: exp_proc = 139975605958400 path /expDir
Jul 17 12:52:15 dhcp-13-188 automount[873]: expire_cleanup: got thid 139975605958400 path /expDir stat 0
Jul 17 12:52:15 dhcp-13-188 automount[873]: expire_cleanup: sigchld: exp 139975605958400 finished, switching from 2 to 1
Jul 17 12:52:15 dhcp-13-188 automount[873]: st_ready: st_ready(): state = 2 path /expDir
===END===
Comment 5 Yin.JianHong 2013-07-17 01:02:51 EDT
Capture packets:
# tshark -tad -r eth0.pcap | grep  -i 'nfs '
Running as user "root" and group "root". This could be dangerous.
  8 2013-07-17 12:44:04.572875 10.66.13.188 -> 10.66.13.16  TCP 57128 > nfs [SYN] Seq=0 Win=14600 Len=0 MSS=1460 TSV=418925445 TSER=0 WS=6
 11 2013-07-17 12:44:04.573952  10.66.13.16 -> 10.66.13.188 TCP nfs > 57128 [RST, ACK] Seq=1 Ack=1 Win=0 Len=0
 12 2013-07-17 12:44:04.574096 10.66.13.188 -> 10.66.13.16  TCP 51901 > nfs [SYN] Seq=0 Win=14600 Len=0 MSS=1460 TSV=418925447 TSER=0 WS=6
 13 2013-07-17 12:44:04.574262  10.66.13.16 -> 10.66.13.188 TCP nfs > 51901 [RST, ACK] Seq=1 Ack=1 Win=0 Len=0
 38 2013-07-17 12:44:04.581109 10.66.13.188 -> 10.66.13.16  NFS V4 NULL Call
 39 2013-07-17 12:44:04.581352  10.66.13.16 -> 10.66.13.188 NFS V4 NULL Reply (Call In 38)
 44 2013-07-17 12:44:04.582665 10.66.13.188 -> 10.66.13.16  NFS V3 NULL Call
 45 2013-07-17 12:44:04.582951  10.66.13.16 -> 10.66.13.188 NFS V3 NULL Reply (Call In 44)
 50 2013-07-17 12:44:04.583823 10.66.13.188 -> 10.66.13.16  NFS V2 NULL Call
 51 2013-07-17 12:44:04.584016  10.66.13.16 -> 10.66.13.188 NFS V2 NULL Reply (Call In 50)
 52 2013-07-17 12:44:04.599593 10.66.13.188 -> 10.66.13.16  TCP netconfsoapbeep > nfs [SYN] Seq=0 Win=14600 Len=0 MSS=1460 TSV=418925472 TSER=0 WS=6
 53 2013-07-17 12:44:04.600000  10.66.13.16 -> 10.66.13.188 TCP nfs > netconfsoapbeep [RST, ACK] Seq=1 Ack=1 Win=0 Len=0
 56 2013-07-17 12:44:05.600527 10.66.13.188 -> 10.66.13.16  TCP 916 > nfs [SYN] Seq=0 Win=14600 Len=0 MSS=1460 TSV=418926473 TSER=0 WS=6
 57 2013-07-17 12:44:05.600727  10.66.13.16 -> 10.66.13.188 TCP nfs > 916 [RST, ACK] Seq=1 Ack=1 Win=0 Len=0
 65 2013-07-17 12:44:07.601333 10.66.13.188 -> 10.66.13.16  TCP 983 > nfs [SYN] Seq=0 Win=14600 Len=0 MSS=1460 TSV=418928474 TSER=0 WS=6
 66 2013-07-17 12:44:07.601611  10.66.13.16 -> 10.66.13.188 TCP nfs > 983 [RST, ACK] Seq=1 Ack=1 Win=0 Len=0
 71 2013-07-17 12:44:11.602199 10.66.13.188 -> 10.66.13.16  TCP 926 > nfs [SYN] Seq=0 Win=14600 Len=0 MSS=1460 TSV=418932475 TSER=0 WS=6
 72 2013-07-17 12:44:11.602466  10.66.13.16 -> 10.66.13.188 TCP nfs > 926 [RST, ACK] Seq=1 Ack=1 Win=0 Len=0
 90 2013-07-17 12:44:19.602970 10.66.13.188 -> 10.66.13.16  TCP rrh > nfs [SYN] Seq=0 Win=14600 Len=0 MSS=1460 TSV=418940476 TSER=0 WS=6
 91 2013-07-17 12:44:19.603222  10.66.13.16 -> 10.66.13.188 TCP nfs > rrh [RST, ACK] Seq=1 Ack=1 Win=0 Len=0
110 2013-07-17 12:44:29.604057 10.66.13.188 -> 10.66.13.16  TCP twamp-control > nfs [SYN] Seq=0 Win=14600 Len=0 MSS=1460 TSV=418950477 TSER=0 WS=6
111 2013-07-17 12:44:29.604368  10.66.13.16 -> 10.66.13.188 TCP nfs > twamp-control [RST, ACK] Seq=1 Ack=1 Win=0 Len=0
138 2013-07-17 12:44:39.605209 10.66.13.188 -> 10.66.13.16  TCP telnets > nfs [SYN] Seq=0 Win=14600 Len=0 MSS=1460 TSV=418960478 TSER=0 WS=6
139 2013-07-17 12:44:39.605457  10.66.13.16 -> 10.66.13.188 TCP nfs > telnets [RST, ACK] Seq=1 Ack=1 Win=0 Len=0
164 2013-07-17 12:44:49.606108 10.66.13.188 -> 10.66.13.16  TCP 1008 > nfs [SYN] Seq=0 Win=14600 Len=0 MSS=1460 TSV=418970478 TSER=0 WS=6
165 2013-07-17 12:44:49.606152  10.66.13.16 -> 10.66.13.188 TCP nfs > 1008 [RST, ACK] Seq=1 Ack=1 Win=0 Len=0
181 2013-07-17 12:44:59.606705 10.66.13.188 -> 10.66.13.16  TCP 936 > nfs [SYN] Seq=0 Win=14600 Len=0 MSS=1460 TSV=418980479 TSER=0 WS=6
182 2013-07-17 12:44:59.607044  10.66.13.16 -> 10.66.13.188 TCP nfs > 936 [RST, ACK] Seq=1 Ack=1 Win=0 Len=0
488 2013-07-17 12:45:09.607613 10.66.13.188 -> 10.66.13.16  TCP maitrd > nfs [SYN] Seq=0 Win=14600 Len=0 MSS=1460 TSV=418990480 TSER=0 WS=6
489 2013-07-17 12:45:09.607933  10.66.13.16 -> 10.66.13.188 TCP nfs > maitrd [RST, ACK] Seq=1 Ack=1 Win=0 Len=0
512 2013-07-17 12:45:19.608702 10.66.13.188 -> 10.66.13.16  TCP 768 > nfs [SYN] Seq=0 Win=14600 Len=0 MSS=1460 TSV=419000481 TSER=0 WS=6
513 2013-07-17 12:45:19.608996  10.66.13.16 -> 10.66.13.188 TCP nfs > 768 [RST, ACK] Seq=1 Ack=1 Win=0 Len=0
533 2013-07-17 12:45:29.609594 10.66.13.188 -> 10.66.13.16  TCP [TCP Port numbers reused] 1008 > nfs [SYN] Seq=0 Win=14600 Len=0 MSS=1460 TSV=419010482 TSER=0 WS=6
534 2013-07-17 12:45:29.609907  10.66.13.16 -> 10.66.13.188 TCP nfs > 1008 [RST, ACK] Seq=1 Ack=1 Win=0 Len=0
560 2013-07-17 12:45:39.610458 10.66.13.188 -> 10.66.13.16  TCP ftps-data > nfs [SYN] Seq=0 Win=14600 Len=0 MSS=1460 TSV=419020483 TSER=0 WS=6
561 2013-07-17 12:45:39.610646  10.66.13.16 -> 10.66.13.188 TCP nfs > ftps-data [RST, ACK] Seq=1 Ack=1 Win=0 Len=0
593 2013-07-17 12:45:49.611249 10.66.13.188 -> 10.66.13.16  TCP 978 > nfs [SYN] Seq=0 Win=14600 Len=0 MSS=1460 TSV=419030484 TSER=0 WS=6
594 2013-07-17 12:45:49.611524  10.66.13.16 -> 10.66.13.188 TCP nfs > 978 [RST, ACK] Seq=1 Ack=1 Win=0 Len=0
611 2013-07-17 12:45:59.612907 10.66.13.188 -> 10.66.13.16  TCP webster > nfs [SYN] Seq=0 Win=14600 Len=0 MSS=1460 TSV=419040485 TSER=0 WS=6
612 2013-07-17 12:45:59.613085  10.66.13.16 -> 10.66.13.188 TCP nfs > webster [RST, ACK] Seq=1 Ack=1 Win=0 Len=0
643 2013-07-17 12:46:09.613678 10.66.13.188 -> 10.66.13.16  TCP 889 > nfs [SYN] Seq=0 Win=14600 Len=0 MSS=1460 TSV=419050486 TSER=0 WS=6
644 2013-07-17 12:46:09.613968  10.66.13.16 -> 10.66.13.188 TCP nfs > 889 [RST, ACK] Seq=1 Ack=1 Win=0 Len=0
[root@dhcp-13-188 ~]#
Comment 7 Jeff Layton 2013-07-17 06:34:36 EDT
Doesn't quite sound like a autofs problem, but rather an issue with nfs-utils, so moving this bug to that component. Taking a quick look...

# mount -v dhcp-13-16.nay.redhat.com:/tmp /mnt/nfs
mount.nfs: timeout set for Wed Jul 17 06:26:43 2013
mount.nfs: trying text-based options 'vers=4,addr=10.66.13.16,clientaddr=192.168.122.137'
mount.nfs: mount(2): Connection refused
mount.nfs: trying text-based options 'vers=4,addr=10.66.13.16,clientaddr=192.168.122.137'
mount.nfs: mount(2): Connection refused
[...]

I believe ECONNREFUSED is considered to be a temporary error, and mount.nfs will keep trying the same options until it times out. It won't fall back to others at that point.

The problem we have is that the mount version/proto attempts are based on heuristics. How do we know whether the server is saying -ECONNREFUSED because it brought up the interface but hasn't started listening on the NFS port yet, or whether it just doesn't support TCP?

Even if we come up with a way to do that properly, the next question is -- do we care enough about servers that don't support TCP to make this work automatically?
Comment 8 J. Bruce Fields 2013-07-17 10:05:06 EDT
(In reply to Jeff Layton from comment #7)
> Even if we come up with a way to do that properly, the next question is --
> do we care enough about servers that don't support TCP to make this work
> automatically?

That does seem like a pretty obscure setup.

I'm unclear whether this is a recent regression or is this how it's always worked?
Comment 9 Steve Dickson 2013-08-14 13:45:13 EDT
I believe this is the same problem as bz984899
Comment 10 RHEL Product and Program Management 2013-10-13 23:07:40 EDT
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.
Comment 13 Steve Dickson 2014-07-08 11:42:30 EDT
(In reply to Yin.JianHong from comment #0)
> Description of problem:
> If the nfs server just support v2 v3 UDP mode, and if no nfsvers option
> specified, autofs can not auto mount the directory exported.
This being broken is probably good :-) UDP mount are a simply
not a good idea.... 99% of all modern day NFS server support
TCP so for those 1% I would suggest added nfsvers to the 
/etc/nfsmount.conf file to make things work.

In the end I would rather spend our limit resource on issues
our customers are more apt to find...
Comment 14 Yongcheng Yang 2017-03-30 05:53:07 EDT
Moving to "Current Release" as it can work with latest nfs-utils-1.2.3-75.el6
-----------------------------------------------------------------------------
# cat /etc/sysconfig/nfs
RPCNFSDARGS="-N 4 --no-tcp"
RPCMOUNTDOPTS="--no-tcp"
# service nfs restart
Shutting down NFS daemon: [  OK  ]
Shutting down NFS mountd: [  OK  ]
Shutting down NFS quotas: [  OK  ]
Shutting down RPC idmapd: [  OK  ]
Starting NFS services:  [  OK  ]
Starting NFS quotas: [  OK  ]
Starting NFS mountd: [  OK  ]
Starting NFS daemon: [  OK  ]
Starting RPC idmapd: [  OK  ]
# exportfs -v
/export_test  	<world>(rw,wdelay,no_root_squash,no_subtree_check,sec=sys,rw,no_root_squash,no_all_squash)
# mount -vvv $HOSTNAME:/export_test/ /mnt/mnt_test/
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:  "hostname.redhat.com:/export_test/"
mount: node:  "/mnt/mnt_test/"
mount: types: "nfs"
mount: opts:  "(null)"
final mount options: '(null)'
mount: external mount: argv[0] = "/sbin/mount.nfs"
mount: external mount: argv[1] = "hostname.redhat.com:/export_test/"
mount: external mount: argv[2] = "/mnt/mnt_test/"
mount: external mount: argv[3] = "-v"
mount: external mount: argv[4] = "-o"
mount: external mount: argv[5] = "rw"
mount.nfs: timeout set for Thu Mar 30 05:49:23 2017
mount.nfs: trying text-based options 'vers=4,addr=10.73.194.69,clientaddr=10.73.194.69'
mount.nfs: mount(2): Connection refused
mount.nfs: trying text-based options 'addr=10.73.194.69'
mount.nfs: prog 100003, trying vers=3, prot=6
mount.nfs: portmap query retrying: RPC: Program not registered
mount.nfs: prog 100003, trying vers=3, prot=17
mount.nfs: trying 10.73.194.69 prog 100003 vers 3 prot UDP port 2049
mount.nfs: prog 100005, trying vers=3, prot=17
mount.nfs: trying 10.73.194.69 prog 100005 vers 3 prot UDP port 40193
hostname.redhat.com:/export_test/ on /mnt/mnt_test type nfs (rw)
# echo $?
0
# nfsstat -m
/mnt/mnt_test from hostname.redhat.com:/export_test/
 Flags:	rw,relatime,vers=3,rsize=32768,wsize=32768,namlen=255,hard,proto=udp,timeo=11,retrans=3,sec=sys,mountaddr=10.73.194.69,mountvers=3,mountport=40193,mountproto=udp,local_lock=none,addr=10.73.194.69

# umount /mnt/mnt_test/
# rpm -q nfs-utils
nfs-utils-1.2.3-75.el6.x86_64

Note You need to log in before you can comment on or make changes to this bug.