mount failed with rc=32 err=mount.nfs: Operation not permitted mount.nfs: access denied by server while mounting :/file-path-of-shareChoose one of the following methods to resolve the mount failure:
Reference: https://knowledge.broadcom.com/external/article/373284
insecure flag to the export options for the specific NAT IP addresses.insecure flag to the export options for the specific NAT IP address or subnet used by the Kubernetes cluster.rw,sync,no_root_squash,insecureIf the above troubleshooting doesn't resolve the issue, perform the below troubleshooting steps in order to understand where the issue is happening from:
1. Test Network Reachability (Port Check) Confirm if the NFS server is reachable on the required ports (2049 for NFS, 111 for rpcbind/mountd). Test TCP connectivity:
nc -vz <NFS_SERVER_IP> 2049
nc -vz <NFS_SERVER_IP> 111
Failure: Indicates a network/firewall issue blocking basic communication.
Success: The network path is open, but the application/protocol layer may still be failing due to port translation or export permissions.
2. Verify NFS Exports Use the showmount command to verify if the NFS server recognizes the worker node and is exporting the intended path.
showmount -e <NFS_SERVER_IP>
Expected output: A list of available exports.
Failure (Timeout or "Access Denied"): The NFS server is likely configured to reject the worker node's IP or the NAT-translated IP.
3. Perform a Manual Mount (Capture Detailed Error) Attempt to mount the share manually using the same options the Kubernetes node uses to surface specific error messages.
mount -t nfs -o vers=3,hard <NFS_SERVER_IP>:/<EXPORT_PATH> /mnt
(Replace vers=3 with vers=4 if using NFS v4).
Monitor System Logs: Run tail -f /var/log/messages (or journalctl -f) on the worker node while running the mount command above.
mount.nfs: Operation not permitted (rc=32): Confirms the "insecure port" translation issue.
Access Denied: Confirms the server is rejecting the specific IP address.
4. Check for NAT Interference (Diagnostic) If NAT/port translation is suspected, execute a packet capture from the underlying node to observe traffic leaving the node.
tcpdump -i any host <NFS_SERVER_IP> and port 2049
If outgoing traffic is present but receives no response, or if the NFS server logs indicate the connection originates from an unexpected random high port, this confirms that SNAT/Port Address Translation is altering the traffic.