After upgrading from CyberPanel 3.0.7 to 3.0.8, the Suspend/Unsuspend Website feature stopped working.
Server environment:
- Ubuntu 22.04 LTS
- CyberPanel 3.0.8
- OpenLiteSpeed 2.5.7
CyberPanel reports:
Suspension failed and automatic recovery failed: Web server configuration activation failed
Running:
/usr/local/lsws/bin/lshttpd -t
echo $?
Returns exit code 1, with only the following warnings:
[WARN] [cyberpanel_ols] License validation failed - module features disabled
[WARN] [vhost:Example] Uid smaller than minimum requirement 11
[WARN] [vhost:Example] Gid smaller than minimum requirement 10
OpenLiteSpeed itself starts correctly and active websites work normally.
The issue is in:
/usr/local/CyberCP/plogical/websiteSuspension.py
The _checked() function considers every non-zero exit code a fatal error:
if result.returncode:
raise RuntimeError(...)
However, OpenLiteSpeed can return exit code 1 for warnings, even when no configuration errors are reported.
This prevents CyberPanel from suspending or unsuspending websites.
Solution / Workaround
I applied a temporary patch to websiteSuspension.py.
The modified _checked() function:
- Accepts exit code
0normally. - Accepts exit code
1only during the OpenLiteSpeed configuration test (-t) and only when the output contains exactly the three known warnings. - Continues to reject unexpected warnings and actual errors.
- Preserves strict exit-code checking for the OpenLiteSpeed restart command.
Result: Website suspension and unsuspension now work correctly.
This suggests that CyberPanel should handle warning-only validation results separately from actual configuration errors.
A permanent fix should address the validation logic without ignoring all non-zero exit codes.
Additional issue: Suspension page returns 404
After the upgrade, the file:
/usr/local/CyberCP/websiteFunctions/suspension.html
was missing, causing suspended websites to display a 404 error.
Restoring the suspension page using the default template:
/usr/local/CyberCP/websiteFunctions/suspension-default.html
resolved the 404 issue.
Both issues have now been resolved locally, but the Python patch is a temporary workaround that may be overwritten by future CyberPanel updates.