You are not logged in.

#1 2016-08-17 00:06:39

MountainX
Member
Registered: 2016-02-08
Posts: 371

Arch Linux NFS server does not like one client

My error is:

    mount.nfs4: access denied by server while mounting fileserver:/export/path/one

This error is on the client.

My question is:

where would the detailed log information (related to this nfs access denied error) be on the server?

I cannot find anything related to this in the client or server error logs. Since the server is denying access, I want to find more detailed information on the server. journalctl should nothing related to this. I don't have a /var/log/auth.log.

More information:

Our small LAN is running an Arch Linux NFS v4 file server. We have several clients running Arch Linux, Ubuntu 15.10 and Ubuntu 16.04. We have one client running Ubuntu 14.04. The 14.04 client will not connect to the file server. The others all connect fine. The settings are the same on all clients as far as I can see. And all clients are listed in /etc/exports on the server with the same settings.

The 14.04 client can ping the fileserver as well as log in via SSH. The user name / ID as well as group match. (I'm using the same user account / uid on both client and server. It is uid 1000.)

$ sudo mount -a (on client)

    mount.nfs4: access denied by server while mounting fileserver:/export/path/one
    mount.nfs4: access denied by server while mounting fileserver:/export/path/two
$ ping fileserver (on client)

    PING fileserver (192.168.1.1) 56(84) bytes of data.
    64 bytes from fileserver (192.168.1.1): icmp_seq=1 ttl=64 time=0.310 ms

Also, the fileserver can ping the client.

$ ssh fileserver (client successfully logs into the LAN-based fileserver)

    Last login: Tue Aug 16 14:38:26 2016 from 192.168.1.2
    [me@fileserver ~]$ 
$ showmount -e fileserver (on client)

    Export list for fileserver:
    /export/path/one/ 192.168.1.2
    /export/path/two/ 192.168.1.2,192.168.1.3
$ rpcinfo -p fileserver (on client)

    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
    100024    1   udp  58344  status
    100024    1   tcp  58561  status
    100005    1   udp  20048  mountd
    100005    1   tcp  20048  mountd
    100005    2   udp  20048  mountd
    100005    2   tcp  20048  mountd
    100005    3   udp  20048  mountd
    100005    3   tcp  20048  mountd
    100003    4   tcp   2049  nfs
    100003    4   udp   2049  nfs
$ sudo mount -vvv -t nfs4 fileserver:/export/path/one /path/one/

    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: spec:  "fileserver:/export/path/one"
    mount: node:  "/path/one/"
    mount: types: "nfs4"
    mount: opts:  "(null)"
    mount: external mount: argv[0] = "/sbin/mount.nfs4"
    mount: external mount: argv[1] = "fileserver:/export/path/one"
    mount: external mount: argv[2] = "/path/one/"
    mount: external mount: argv[3] = "-v"
    mount: external mount: argv[4] = "-o"
    mount: external mount: argv[5] = "rw"
    mount.nfs4: timeout set for Tue Aug 16 16:10:43 2016
    mount.nfs4: trying text-based options 'addr=192.168.1.1,clientaddr=192.168.1.2'
    mount.nfs4: mount(2): Permission denied
    mount.nfs4: access denied by server while mounting fileserver:/export/path/one
    mount: external mount: argv[3] = "-v"
    mount: external mount: argv[4] = "-o"
    mount: external mount: argv[5] = "rw"
    mount.nfs4: timeout set for Tue Aug 16 16:10:43 2016
    mount.nfs4: trying text-based options 'addr=192.168.1.1,clientaddr=192.168.1.2'
    mount.nfs4: mount(2): Permission denied
    mount.nfs4: access denied by server while mounting fileserver:/export/path/one

Last edited by MountainX (2016-08-17 03:22:29)

Offline

#2 2017-01-14 22:53:35

pgoetz
Member
From: Austin, Texas
Registered: 2014-02-21
Posts: 341

Re: Arch Linux NFS server does not like one client

I was having exactly the same problem, with both client and server Arch linux.  The solution was to use the hostname in `/etc/exports` instead of the IP address.  I changed this:

/srv/nfs 192.168.10(rw,fsid=root,no_subtree_check)
/srv/nfs/media 192.168.10(rw,no_subtree_check)
/srv/nfs/share 192.168.10(rw,no_subtree_check)

To this:

/srv/nfs iguana(rw,fsid=root,no_subtree_check)
/srv/nfs/media iguana(rw,no_subtree_check)
/srv/nfs/share iguana(rw,no_subtree_check)

This resulted in a slightly different problem:

[root@iguana data]# mount -t nfs4 frog:/srv/nfs/media /data/media
mount.nfs4: Protocol not supported

Apparently you are not supposed to include the NFS root path in the mount command.  This finally worked and mounted the volume:

[root@iguana data]# mount -t nfs4 frog:/media /data/media

This is extremely unclear in the NFS Troubleshooting Wiki entry; will fix.

Offline

#3 2017-01-15 05:25:16

MountainX
Member
Registered: 2016-02-08
Posts: 371

Re: Arch Linux NFS server does not like one client

pgoetz wrote:

I was having exactly the same problem, with both client and server Arch linux.  The solution was to use the hostname in `/etc/exports` instead of the IP address.

...

This is extremely unclear in the NFS Troubleshooting Wiki entry; will fix.

Fantastic. Thank you.

Offline

#4 2017-01-20 11:12:35

mattarch
Member
Registered: 2015-08-20
Posts: 5

Re: Arch Linux NFS server does not like one client

MountainX wrote:
pgoetz wrote:

I was having exactly the same problem, with both client and server Arch linux.  The solution was to use the hostname in `/etc/exports` instead of the IP address.

...

This is extremely unclear in the NFS Troubleshooting Wiki entry; will fix.

Fantastic. Thank you.

I got a new machine this week and have just been installing Arch, seems the NFS package has been updated which no longer uses the /etc/exports file...

Offline

Board footer

Powered by FluxBB