CWP Successful login keeps redirecting back to the login page

A strange problem with the CentOS Web panel was caused by 100% disk usage. The user gets redirected to the login page despite the fact that the login was successful.

According to cwpsrv status the error is: Failed to parse PID from file /usr/local/cwpsrv/var/run/ Invalid argument

Again, this is odd because just Apache is installed… However, I googled the error and found that it is a known issue with nginx on Ubuntu:

But, in my case the disk usage was full since the user had enabled local backups:

So, I first removed all files in the /backups directory and restarted cwpsrv.

rm -rf /bvackup/* && sh /scripts/restart_cwpsrv

Since this still gave the same error: Failed to parse PID from file /usr/local/cwpsrv/var/run/ Invalid argument I followed this workaround for above mentioned bug on nginx:

mkdir /etc/systemd/system/nginx.service.d
printf "[Service]\nExecStartPost=/bin/sleep 0.1\n" > /etc/systemd/system/nginx.service.d/override.conf
systemctl daemon-reload
systemctl restart cwpsrv

After which I was able to log into the CWP admin account and disable backups.

Stefan Pejcic
Join the discussion

I enjoy constructive responses and professional comments to my posts, and invite anyone to comment or link to my site.