I'm trying to set up Kerberized NFS with Debian Jessie on both the client (box1) and the server (box2). I'm stuck with the error message incorrect mount option when trying to mount with Kerberos. This is my configuration./etc/exports: (server)/nfs                    box1.mydomain.com(sec=krb5)/etc/idmapd.conf: (both on server and client)Domain = mydomain.com/etc/default/nfs-kernel-server (on server)RPCNFSDCOUNT=8RPCNFSDPRIORITY=0RPCMOUNTDOPTS=--manage-gidsNEED_SVCGSSD=YESRPCSVCGSSDOPTS=-vvv/etc/default/nfs-common (both on client and server)RPCGSSDOPTS=-vvvNEED_IDMAPD=YESNEED_GSSD=YESshowmount -e (on server):Export list for box2.mydomain.com:/nfs box1.mydomain.comBut when I'm running this: (on client)mount -t nfs4 -o sec=krb5 box2.mydomain.com:/nfs  /mnt/nfs4It fails with:mount.nfs4: an incorrect mount option was specifiedAfter running rpcdebug -m nfsd -s all on the server, it's /var/log/kern.log looks like this when trying to mount:box2 kernel: [14460.024373] nfsd_dispatch: vers 4 proc 0box2 kernel: [14460.025216] nfsd_dispatch: vers 4 proc 1box2 kernel: [14460.025228] nfsv4 compound op #1/1: 35 (OP_SETCLIENTID)box2 kernel: [14460.025236] renewing client (clientid 5939ed36/00000019)box2 kernel: [14460.025240] nfsv4 compound op ffff88029243f080 opcnt 1 #1: 35: status 0box2 kernel: [14460.025241] nfsv4 compound returned 0box2 kernel: [14460.025613] nfsd_dispatch: vers 4 proc 1box2 kernel: [14460.025619] nfsv4 compound op #1/1: 36 (OP_SETCLIENTID_CONFIRM)box2 kernel: [14460.025623] renewing client (clientid 5939ed36/00000019)box2 kernel: [14460.025624] renewing client (clientid 5939ed36/00000019)box2 kernel: [14460.025684] nfsv4 compound op ffff88029243f080 opcnt 1 #1: 36: status 0box2 kernel: [14460.025686] nfsv4 compound returned 0On the client, this is what /var/log/kern.log looks like after running rpcdebug -m nfs -s mount before the mount attempt:box1 kernel: [ 3367.868847] NFS: nfs mount opts='sec=krb5,addr=192.168.0.21,clientaddr=192.168.0.20'box1 kernel: [ 3367.868860] NFS:   parsing nfs mount option 'sec=krb5'box1 kernel: [ 3367.868870] NFS: parsing sec=krb5 option box1 kernel: [ 3367.868875] NFS:   parsing nfs mount option 'addr=192.168.0.21'box1 kernel: [ 3367.868886] NFS:   parsing nfs mount option 'clientaddr=192.168.0.20'box1 kernel: [ 3367.868895] NFS: MNTPATH: '/nfs' box1 kernel: [ 3367.868900] --> nfs4_try_mount()box1 kernel: [ 3367.868909] --> nfs4_create_server()box1 kernel: [ 3367.868927] --> nfs4_init_server()box1 kernel: [ 3367.868930] --> nfs4_set_client()box1 kernel: [ 3367.868934] --> nfs_get_client(box2,v4)box1 kernel: [ 3367.868949] NFS: get client cookie (0xffff8800b70e9400/0xffff8800b91cb628)box1 kernel: [ 3367.869031] nfs_create_rpc_client: cannot create RPC client. Error = -22box1 kernel: [ 3367.869513] --> nfs4_realloc_slot_table: max_reqs=1024, tbl->max_slots 0box1 kernel: [ 3367.869719] nfs4_realloc_slot_table: tbl=ffff8800364ea000 slots=ffff880139f02d00 max_slots=1024box1 kernel: [ 3367.869723] <-- nfs4_realloc_slot_table: return 0box1 kernel: [ 3367.869730] nfs_callback_create_svc: service created box1 kernel: [ 3367.869734] NFS: create per-net callback data; net=ffffffff818ba200box1 kernel: [ 3367.869767] NFS: Callback listener port = 33786 (af 2, net ffffffff818ba200)box1 kernel: [ 3367.869800] NFS: Callback listener port = 60690 (af 10, net ffffffff818ba200)box1 kernel: [ 3367.869966] nfs_callback_up: service started box1 kernel: [ 3367.869975] NFS: nfs4_discover_server_trunking: testing 'box2'box1 kernel: [ 3367.869986] NFS call  setclientid auth=UNIX, 'Linux NFSv4.0 192.168.0.20/192.168.0.21 tcp'box1 kernel: [ 3367.870380] NFS reply setclientid: 0box1 kernel: [ 3367.870386] NFS call  setclientid_confirm auth=UNIX, (client ID 36ed39591a000000)box1 kernel: [ 3367.870751] NFS reply setclientid_confirm: 0box1 kernel: [ 3367.870757] NFS: <-- nfs40_walk_client_list using nfs_client = ffff8800b70e9400 ({2})box1 kernel: [ 3367.870761] NFS: <-- nfs40_walk_client_list status = 0box1 kernel: [ 3367.870765] nfs4_schedule_state_renewal: requeueing work. Lease period = 5box1 kernel: [ 3367.870770] NFS: nfs4_discover_server_trunking: status = 0box1 kernel: [ 3367.870773] --> nfs_put_client({2})box1 kernel: [ 3367.870777] <-- nfs4_set_client() = 0 [new ffff8800b70e9400]box1 kernel: [ 3367.870830] nfs_init_server_rpcclient: couldn't create rpc_client!box1 kernel: [ 3367.870834] <-- nfs4_init_server() = -22box1 kernel: [ 3367.870837] --> nfs_free_server()box1 kernel: [ 3367.880263] --> nfs_put_client({1})box1 kernel: [ 3367.880373] NFS: destroy per-net callback data; net=ffffffff818ba200box1 kernel: [ 3367.884248] nfs_callback_down: service stopped box1 kernel: [ 3367.884254] nfs_callback_down: service destroyedbox1 kernel: [ 3367.884259] --> nfs_free_client(4)box1 kernel: [ 3367.884261] NFS: releasing client cookie (0xffff8800b70e9400/0xffff8800b91cb628)box1 kernel: [ 3367.884379] <-- nfs_free_client()box1 kernel: [ 3367.884387] <-- nfs_free_server()box1 kernel: [ 3367.884389] <-- nfs4_create_server() = error -22box1 kernel: [ 3367.884393] <-- nfs4_try_mount() = -22 [error]I do not understand the error, so any ideas are highly appreciated.
How to solve mount.nfs4: an incorrect mount option was specified in Debian?
debian;nfs;kerberos