NFS (RPC) troubleshooting

I’m trying to get NFS going on two Fedora 40 servers. NFS Server is at 192.168.2.101 and the client is at 192.168.2.100.

I have setup the NFS server and this is what I see at the showmount command:

root@dell-kvmhost:~# showmount -e 192.168.2.101
Export list for 192.168.2.101:
/data/nfs_share *

All good except for the fact it took 2 mins for this response to show

When I try to mount the share it times out

root@dell-kvmhost:~# sudo mount 192.168.2.101:/data/nfs_share /mnt/nfs_share
mount.nfs: Connection timed out for 192.168.2.101:/data/nfs_share on /mnt/nfs_share

Both servers are not really loaded and I have temporarily disabled the firewalls.

I can ping in both directions, rpcbind is running on the NFS server.

What are your suggestions to troubleshoot this?

Added f40 and removed workstation

hi, I’d start with a tcpdump and double checking that the firewalls are indeed disabled

1 Like

I had similar issues with 2 different hosts using the same IP address.
You can try using IPv6 to rule out possible IPv4 conflicts.

That should have been probed for before fedora used the ipv4 addresss.

What is in your /etc/exports on the server?
An example from my server (fender) is this:

$ cat /etc/exports
/shared/Downloads	172.16.2.0/24(rw,root_squash)

And this is the matching /etc/fstab line to mount that export:

fender:/shared/Downloads	/shared/Downloads	 nfs v3 0 0

Not sure of the defaults, try the v3 option maybe?

Edit: What is the output of exportfs on the server?

If everything went as it should, the OP’s problem would not have arisen in the first place, but here we are, and that delayed response is quite typical for network related issues.

For RFC 5227 to work properly, all involved hosts must support it, including server IPMI/BMC if any, otherwise it may fail due to race conditions.

Not familiar with tcpdump. Looking at that output how would I confirm the firewalls are shut down? I checked the service and it was inactive

I can ping both servers and both IP addresses are static. Is IPv6 still relevant in that case? I’m not using IPv6 on the LAN. How would I activate this?

cat /etc/exports

shows

/data/nfs_share 192.168.2.100(rw,sync,no_subtree_check)

I haven’t updated /etc/fstab yet as I can’t mount the share; i.e.
mount 192.168.2.101:/mnt/nfs_share /mnt/nfs_share times out and showmount takes about 2 mins to respond with the export list

How do I activate v3?

root@acer-bkp-server:~# exportfs
/data/nfs_share
                <world>

I think this will do it

mount -o v3

Assuming that the client and server are on the same network:

ADDR="fe80::e99d:ba6e:386e:8b97"
IFACE="eth0"
ping ${ADDR}%${IFACE}
sudo mount [${ADDR}%${IFACE}]:/data/nfs_share /mnt/nfs_share

This should be active and working by default unless explicitly disabled.

See also: Link-local address - Wikipedia

I get an access denied error

root@dell-kvmhost:~# sudo mount 192.168.2.101:/mnt/nfs_share /mnt/nfs_share -o v3
mount.nfs: access denied by server while mounting 192.168.2.101:/mnt/nfs_share

I have temporarily disabled firewalld on both the client and the server. Also temporarily disabled SELinux

No luck here

root@dell-kvmhost:~# ADDR="fe80::e99d:ba6e:386e:8b97"
IFACE="eno1"
ping ${ADDR}%${IFACE}
sudo mount [${ADDR}%${IFACE}]:/data/nfs_share /mnt/nfs_share
PING fe80::e99d:ba6e:386e:8b97%eno1 (fe80::e99d:ba6e:386e:8b97%eno1) 56 data bytes
^C
--- fe80::e99d:ba6e:386e:8b97%eno1 ping statistics ---
619 packets transmitted, 0 received, 100% packet loss, time 632865ms

mount.nfs: Network is unreachable for [fe80::e99d:ba6e:386e:8b97%eno1]:/data/nfs_share on /mnt/nfs_share

What does the server log when this happens?
Hopefully the error will guide us to a config change to fix this.

You mean this?

root@acer-bkp-server:~# sudo journalctl -u nfs-server.service
-- Boot 2cf493de239a42b8aa6e431fd02a9e10 --
Sep 29 23:57:30 acer-bkp-server systemd[1]: Starting nfs-server.service - NFS server and services...
Sep 29 23:57:31 acer-bkp-server systemd[1]: Finished nfs-server.service - NFS server and services.
Oct 01 22:12:36 acer-bkp-server systemd[1]: Stopping nfs-server.service - NFS server and services...
Oct 01 22:12:36 acer-bkp-server systemd[1]: nfs-server.service: Deactivated successfully.
Oct 01 22:12:36 acer-bkp-server systemd[1]: Stopped nfs-server.service - NFS server and services.
Oct 01 22:12:36 acer-bkp-server systemd[1]: Starting nfs-server.service - NFS server and services...
Oct 01 22:12:37 acer-bkp-server systemd[1]: Finished nfs-server.service - NFS server and services.
Oct 01 22:15:58 acer-bkp-server systemd[1]: Stopping nfs-server.service - NFS server and services...
Oct 01 22:15:58 acer-bkp-server systemd[1]: nfs-server.service: Deactivated successfully.
Oct 01 22:15:58 acer-bkp-server systemd[1]: Stopped nfs-server.service - NFS server and services.
Oct 01 22:15:58 acer-bkp-server systemd[1]: Starting nfs-server.service - NFS server and services...
Oct 01 22:15:59 acer-bkp-server systemd[1]: Finished nfs-server.service - NFS server and services.
root@acer-bkp-server:~#

I was hoping to see a reason why the mount was refused.
I would not limit to a single service in journal.
Check for messages from any service.

When I submit the mount command on the client I get this entry in the server log

Oct 1 23:29:12 acer-bkp-server rpc.mountd[10464]: authenticated mount request from 192.168.2.100:929 for /data/nfs_share (/data/nfs_share)

but nothing else when the mount times out; i.e. mount.nfs: Connection timed out for 192.168.2.101:/data/nfs_share on /mnt/nfs_share

And that time you did not see the permission issue?

Check both client and server:

ip -6 address show; ip -6 neighbor show