Solved NFSv4 User Mapping Issues

I'm running FreeBSD14.0-CURRENT on both my client and my server, and I export some ZFS directories via NFSv4.

I've been having a weird issue with things such as vscode, where the file is not automatically refreshing (and this means I need to manually refresh git, and it leads to a lot of file save conflicts) - I'm unsure if this is relevant to this issue, but it's the only thing I can think of.

Whenever I manually open and then save a file with vim (on the client, but the file is stored on the NFS share), I get No name and/or group mapping for uid,gid:(1000,1000). My user is 1000:1000 on both the client and the server, this was confirmed inside of /etc/passwd.

My server's /etc/exports is as follows:
Code:
/share/code            192.168.0.25

V4: /                192.168.0.25

and the relevant /etc/rc.conf settings are:
Code:
nfs_server_enable="YES"
nfsv4_server_enable="YES"
nfsuserd_enable="YES"
mountd_enable="YES"

On my client, I mount the NFS shares with this /etc/fstab entry:
Code:
192.168.0.26:/share/code /mnt/code nfs rw,bg,failok,nfsv4 0 0

these are the client's relevant /etc/rc.conf settings:
Code:
nfs_client_enable="YES"
nfs_client_flags="-n 4"
nfscbd_enable="YES"

I have tried using -mapall=1000:1000 (and the same with the username) in the server's exports, to no avail. I have also tried manually specifying the UID and GID within the client's /etc/fstab, also to no avail. The latter actually mapped me to nobody:nobody, which was odd.

I think it's also worth noting that I found this error in /var/log/messages:
Code:
nfsuserd (jid 0, uid 0) exited on signal 4


The user does own all of the directory that is being exported, so I don't think that's the issue. I'm running out of ideas at this point. Any help would be greatly appreciated :)
 
Add nfsuserd_enable="YES" to your client's rc.conf.
This still gave me the same No name and/or group mapping for uid,gid:(1000,1000) error, even after starting the service and re-mounting the shares.

On the server, in /var/log/messages, it alerts that nfsuserd(8) exited on signal 4 again, and service nfsuserd status shows that it is no longer running.

I feel this may be the cause of my issue, although I'm not too sure why it keeps crashing.

EDIT: On further attempts, running nfsuserd(8) by typing its name as a command allows it to run, at least for now momentarily.
 
Back
Top