hey guys,
i have running two openvpn servers on FreeBSD 11.2 and would like to have a log rotation as the messages get flooded.
In the newsyslog.conf there is an entry for log rotation every midnight and the process gets a SIGUSR1 signal to do a "softrestart" as described in the openvpn howto. This should have the effect to tell the openvpn service the logfile got removed/renamed, in our case zipped and moved.
openvpn documentation:
SIGUSR1 -- Conditional restart, designed to restart without root privileges
newsyslog.conf line: ("30" defines the SIGUSR1)
/var/log/openvpn 600 30 * @T00 JN /var/run/openvpn.pid 30
openvpn.conf line: (also tested with log-append)
log /var/log/openvpn
So far so good. I tested the logging and it worked fine, also when switching between both machines (carp).
Here is the problem:
As soon as the log rotation happens, a new logfile is created and the logging STOPS immediately. No logs in the new file.
I tried to send the SIGUSR1 signal manually and reset the openvpn service, but this doesn't have any affect. When I restart the service in the usual manner
service openvpn restart
the logging is working fine and writing the the new file.
Is there anything I might have missed? 🙂 Running out of ideas as I was pretty sure the SIGUSR1 in the log rotation would solve my problem after I figured it out.
Best,
Arthur