Nxlog can't start after server reboot on Linux
Hi,
we are using nxlog-ce-3.0.2272 on Linux (CentOS 7), after a server reboot nxlog is not started. The error message in nxlog logfile is: ERROR: couldn't open pidfile /run/nxlog/nxlog.pid.
After the reboot of the server the directory /run/nxlog is missing, which seems to cause the error.
The directory is created when nxlog-ce is installed on the server and nxlog is started OK.
If I manually create the directory /run/nxlog and then start nxlog it also works.
Is this a known error or have missed something ?
BR Joakim
Hi,
the issue seems to be that the directories below /run are removed when a server is rebooted, and need to be recreated when the server starts up.
A possible solution is to modify the nxlog.service file.
I have added the below to ==> /usr/lib/systemd/system/nxlog.service <== in the "Service section"
[Service] ... RuntimeDirectory=nxlog RuntimeDirectoryMode=0770
then the nxlog directory is created after a server reboot and also after a stop / start of the nxlog service.
br Joakim