rdbf
btraill
As Owl started sending alerts from multiple of our OLS servers and some of our resellers began to complain, we took some time to investigate the issue yesterday. Systemd is falsely detecting OpenLiteSpeed as failed and restarting it unnecessarily. The systemd restart counter (NRestarts) keeps increasing, making systemd think the service is failing even though it’s actually running fine.
Since OpenLiteSpeed itself is working, the issue seems to be with how systemd tracks its process. It looks like systemd loses track because the lswsctrl start
command exits too quickly, making it think OLS failed. Another possibility is that the PID file isn’t being read at the right moment, causing unnecessary restarts. We checked Enhance’s systemd configurations, including the override file, and everything seems to be correctly set up, so this isn’t an Enhance issue.
This is actually a known problem in the OLS community. It’s been reported several times:
Thread 1
Thread 2
Even LiteSpeed Enterprise has similar issue:
LiteSpeed running but systemd status shows inactive.
The quick fix is to force systemd to sync with the actual status of OLS by running:
/usr/local/lsws/bin/lswsctrl stop && systemctl restart lshttpd.service
Also, avoid using:
systemctl stop lshttpd
systemctl start lshttpd
Instead, always use:
systemctl restart lshttpd
That said, this is only a temporary fix. OLS will restart multiple times whenever .htaccess
files, OLS configs, or WAF configurations are updated, so sooner or later systemd will lose track again.
Fortunately, Owl now monitors systemd 24/7, so we made some changes to handle this automatically. Instead of constantly bugging you with false alarms about OLS being down, it will monitor systemd and sync it when needed. Only if OLS is actually down and cannot be restarted will you get a real alert. This will be included in the next version of cPFence.
Thomas_W
It is always recommended to whitelist all your server IPs (both IPv6 and IPv4) in the cPFence firewall on all your cluster servers to ensure uninterrupted communication for MonitorPro and other Enhance or cPFence functions.