I found the reason.
I checked the kernel modules and found one missing on the Raspberry PI.
This is how it looks like on my working Ubuntu Client (Intel I3, Ubuntu 20.04):
lsmod | grep gss
returns
rpcsec_gss_krb5 40960 11
auth_rpcgss 94208 4 rpcsec_gss_krb5
sunrpc 397312 31 nfsv4,auth_rpcgss,lockd,nfsv3,rpcsec_gss_krb5,nfs_acl,nfs
And rpcsec_gss_krb5 is missing on the Raspberry PI. Currently I'm using kernel version 5.19.0-1011-raspi. rpcsec_gss.krb5.ko is missing here! If I look on packages.ubuntu.com it looks like the last version that included the rpcsec module was 5.19.0-1004-raspi.
Somehow they put the kernel module into an extra package which has to be installed manually obviously.
I just installed linux-modules-extra-5.19.0-1011-raspi and now rpcsec_gss.krb5.ko is available. I loaded it via modprobe. The nfs* kernel modules are also not present, but it turned out that they will be loaded when executing the mount command later on. Trying to mount the NFS server share does not result in
mount.nfs: mount(2): Invalid argument
any more.
Now I get
mount.nfs: mount(2): Permission denied
Somehow the contents of /etc/krb5.keytab seemed to be invalid.
I deleted it and regenerated it by using
sudo kinit some-kerberos-admin/admin
sudo kadmin -p some-kerberos-admin/admin
ktadd nfs/pi400.fritz.box
Now it is working.
To load the kernel module automatically during startup I added rpcsec_gss_krb5 to /etc/modules which is working very nicely now.
Finally added the mount command to /etc/fstab and I'm done.
Some more words to how I debugged the issue.
Add / uncomment the following entries in /etc/nfs.conf in the gssd section:
[gssd]
verbosity=9
rpc-verbosity=9
(BTW: I commented out again nearly all entries in nfs.conf as it was supplied by the package maintainer).
Having done this rpc.gssd will add a lot of output in the syslog. Besides this the following commands helped me because they enable log output from the kernel:
rpcdebug -m rpc -s all # sets all debug flags for RPC
rpcdebug -m nfs -s all # sets all debug flags for RPC
To inspect the log output I opened a new console window and monitored the syslog output with
journalctl -f
See also this Webpage from the ARCH Linux team which was really helpful:
NFS/Troubleshooting
I filed a bug report on launchpad:
Kerberized NFS mounts not working on Raspberry PI
Maybe this information is also useful for somebody else...
Regards
Martin