I have a small server running Fedora 41, and in the dmesg output I have this line:
[ 5.410928] (sd-exec-[496]: /usr/lib/systemd/system-generators/nfs-server-generator failed with exit status 1.
How can I figure out what is the problem, and how to fix that? Obviously, I’d like to get rid of the error message.
This error message appeared several weeks agon, without me doing any changes to NFS config. All NFS services are running fine, systemctl –all –failed lists nothing.
Not sure what I need to provide to help solving this, so please ask for any relevant info.
I would assume that it’s processing /etc/exports.
Maybe its unhappy with one of the entries? But in that case I would have hoped for a log.
Maybe selinux is triggering?
Sep 02 20:02:11 my.hostname.tld setroubleshoot[17093]: SELinux is preventing nfs-server-gene from add_name access on the directory nfs-server.service.d. For complete SELinux messages run: sealert -l d944b9e4-0011-42a5-a8ba-720939366dbb
Sep 02 20:02:11 my.hostname.tld setroubleshoot[17093]: SELinux is preventing nfs-server-gene from add_name access on the directory nfs-server.service.d.
Plugin catchall (100. confidence) suggests
If you believe that nfs-server-gene should be allowed add_name access on the nfs-server.service.d directory by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
ausearch -c ‘nfs-server-gene’ --raw | audit2allow -M my-nfsservergene
semodule -X 300 -i my-nfsservergene.pp
It will be generated by the generator as /run/systemd/generator/nfs-server.service.d/order-with-mounts.conf.
It is a plugin file for the nfs-server.service unit to ensure that the exported directory is available when starting the nfs service. The file contains appropriate RequiresMountsFor= lines for the exported file systems.
This system (that has the problem):
ls -axl /run/systemd/generator/nfs-server.service.d/
ls: cannot access ‘/run/systemd/generator/nfs-server.service.d/’: No such file or directory