I see this issue many times recently.
The OLS service has been running for a while, no change in its config. Suddenly, got a warning: litespeed.service is not active, cannot reload.
systemctl status confirm its status is inactive.
However, as shown in the log, the web service is still running. I can access websites without problem. But restarting lsws doesn't bring the service active. In the /var/log/httpd/error_log, there are some logs
I searched, found an old guide for the same issue, but it's not in my case. If I killed all OLS processes, then I can restart the service, again no change in its configuration.
I wonder what the reason is, and how to prevent it keep happening?
Thanks.
The OLS service has been running for a while, no change in its config. Suddenly, got a warning: litespeed.service is not active, cannot reload.
systemctl status confirm its status is inactive.
Code:
# systemctl status lsws
× litespeed.service - The OpenLiteSpeed HTTP Server
Loaded: loaded (/etc/systemd/system/litespeed.service; enabled; preset: disabled)
Active: failed (Result: exit-code) since Tue 2024-05-14 02:52:09 +07; 3s ago
Duration: 2.528s
Process: 1277417 ExecStart=/usr/local/lsws/bin/lswsctrl start (code=exited, status=0/SUCCESS)
Main PID: 1277434 (code=exited, status=1/FAILURE)
CGroup: /system.slice/litespeed.service
├─1274099 "openlitespeed (lshttpd - main)"
├─1274100 "openlitespeed (lscgid)"
├─1274466 "openlitespeed (lshttpd - #01)"
└─1274467 "openlitespeed (lshttpd - #02)"
May 14 02:52:04 server-name systemd[1]: Starting The OpenLiteSpeed HTTP Server...
May 14 02:52:05 server-name lswsctrl[1277417]: [OK] litespeed: pid=1277434.
May 14 02:52:07 server-name systemd[1]: Started The OpenLiteSpeed HTTP Server.
May 14 02:52:09 server-name systemd[1]: litespeed.service: Main process exited, code=exited, status=1/FAILURE
May 14 02:52:09 server-name systemd[1]: litespeed.service: Failed with result 'exit-code'.
May 14 02:52:09 server-name systemd[1]: litespeed.service: Unit process 1274099 (litespeed) remains running after unit stopped.
May 14 02:52:09 server-name systemd[1]: litespeed.service: Unit process 1274100 (litespeed) remains running after unit stopped.
May 14 02:52:09 server-name systemd[1]: litespeed.service: Unit process 1274466 (litespeed) remains running after unit stopped.
May 14 02:52:09 server-name systemd[1]: litespeed.service: Unit process 1274467 (litespeed) remains running after unit stopped.
May 14 02:52:09 server-name systemd[1]: litespeed.service: Unit process 1277438 (litespeed) remains running after unit stopped.
Code:
2024-05-14 02:45:32.091409 [ERROR] [1276485] HttpListener::start(): Can't listen at address adminListener: Address already in use!
2024-05-14 02:45:32.091482 [ERROR] [1276485] HttpServer::addListener(adminListener) failed to create new listener
2024-05-14 02:45:32.091487 [ERROR] [1276485] [config:admin:listener:adminListener] failed to start listener on address *:7080!
2024-05-14 02:45:32.091493 [ERROR] [1276485] [config:admin:listener] No listener is available for admin virtual host!
2024-05-14 02:45:32.112563 [ERROR] [1276485] Fatal error in configuration, exit!
I wonder what the reason is, and how to prevent it keep happening?
Thanks.