After fixing mod_security issue as mentioned here with excellent help of @usmannasir , and @shoaibkk , my disk space started to increase and reached 100% from 54% just within 8-9 hours.
After reading few threads, I’ve deleted logs files by running the following command to clear some unwanted space:
rm -rf /usr/local/lsws/logs/*
This helped me to gain some more disk space which is what I wanted, but now, I am unable to start OpenLiteSpeed server nor able to access OpenLiteSpeed WebAdmin at :7080 port.
This is the error that I receive while starting OpenLiteSpeed.
Oct 31 09:02:57 ubuntu20 lswsctrl[31442]: 2021-10-31 09:02:57.418991 [ERROR] [config:server:basics:errorLog] missing <errorLog>
Oct 31 09:02:57 ubuntu20 lswsctrl[31417]: [ERROR] Failed to start litespeed!
I’ve read few threads but didn’t find any solution to this issue. These are the results that I receive when run ls -lah
under /usr/local/lsws/logs
directory.
drwxr-x--- 2 root nobody 4.0K Oct 31 09:01 .
drwxr-xr-x 26 root root 4.0K Oct 10 11:38 ..
-rw-r--r-- 1 nobody nogroup 0 Oct 31 06:01 access.log
-rw-r--r-- 1 root root 0 Oct 31 09:01 auditmodsec.log
-rw-r--r-- 1 nobody nogroup 1.8K Oct 31 06:11 error.log
-rw-r--r-- 1 root root 71K Oct 31 09:12 lsrestart.log
-rw-r--r-- 1 nobody nogroup 1.2M Oct 31 06:11 stderr.log
Any help will be much appreciated.
Thanks in advance.
_ CyberPanel is one of the best control panels I’ve used so far._ *
1 Like
dipakcg
October 31, 2021, 12:02pm
2
[SOLVED]
I’ve managed to fix this myself and would like to share a solution.
Somehow, httpd_config.conf file under /usr/local/lsws/conf was messed up even though I didn’t touch anything related and just deleted the logs folder as explained above. I’ve found that there was a httpd_config.conf.bak file inside that folder so I’ve copied httpd_config.conf.bak file to httpd_config.conf and tried to restart OpenLiteSpeed server which then worked immediately.
Commands I ran:
Let’s first backup httpd_config.conf before copying any contents from httpd_config.conf.bak:
cp /usr/local/lsws/conf/httpd_config.conf /usr/local/lsws/conf/httpd_config.conf.backup
Copy httpd_config.conf.bak to httpd_config.conf:
cp /usr/local/lsws/conf/httpd_config.conf.bak /usr/local/lsws/conf/httpd_config.conf
Restart OpenLiteSpeed server:
systemctl restart lsws
I hope this will help someone having a similar issue.
3 Likes
thank you for sharing your solution, I was not able today.
dipakcg:
systemctl restart lsws
systemctl restart lsws
Job for lshttpd.service failed because the control process exited with error code.
See "systemctl status lshttpd.service" and "journalctl -xe" for details.
For me , it wasent solved …
systemctl status lshttpd.service
● lshttpd.service - OpenLiteSpeed HTTP Server
Loaded: loaded (/etc/systemd/system/lshttpd.service; enabled; vendor preset: enabled)
Active: activating (start) since Thu 2022-04-14 18:54:46 UTC; 1s ago
Cntrl PID: 6696 (lswsctrl)
CGroup: /system.slice/lshttpd.service
├─6696 /bin/sh /usr/local/lsws/bin/lswsctrl start
└─6721 sleep 2
Apr 14 18:54:46 myserver systemd[1]: Starting OpenLiteSpeed HTTP Server...
Apr 14 18:54:46 myserver lswsctrl[6696]: /usr/local/lsws/bin/lswsctrl: 259: cannot create /usr/local/lsws/bin/../logs/lsrestart.log: Direct>
Apr 14 18:54:46 myserver lswsctrl[6696]: /usr/local/lsws/bin/lswsctrl: 260: cannot create /usr/local/lsws/bin/../logs/lsrestart.log: Direct>
Apr 14 18:54:47 myserver lswsctrl[6720]: 2022-04-14 18:54:47.023131 [ERROR] [config:server:basics:errorLog] log file is not writable - /usr>
Apr 14 18:54:47 myserver lswsctrl[6720]: 2022-04-14 18:54:47.023184 [ERROR] [config:server:basics:errorLog] failed to set up error log!
Apr 14 18:54:47 myserver lswsctrl[6696]: [ERROR] Failed to start litespeed!
lines 1-14/14 (END)
● lshttpd.service - OpenLiteSpeed HTTP Server
Loaded: loaded (/etc/systemd/system/lshttpd.service; enabled; vendor preset: enabled)
Active: activating (start) since Thu 2022-04-14 18:54:46 UTC; 1s ago
Cntrl PID: 6696 (lswsctrl)
CGroup: /system.slice/lshttpd.service
├─6696 /bin/sh /usr/local/lsws/bin/lswsctrl start
└─6721 sleep 2
Apr 14 18:54:46 myserver systemd[1]: Starting OpenLiteSpeed HTTP Server...
Apr 14 18:54:46 myserver lswsctrl[6696]: /usr/local/lsws/bin/lswsctrl: 259: cannot create /usr/local/lsws/bin/../logs/lsrestart.log: Directory nonex>
Apr 14 18:54:46 myserver lswsctrl[6696]: /usr/local/lsws/bin/lswsctrl: 260: cannot create /usr/local/lsws/bin/../logs/lsrestart.log: Directory nonex>
Apr 14 18:54:47 myserver lswsctrl[6720]: 2022-04-14 18:54:47.023131 [ERROR] [config:server:basics:errorLog] log file is not writable - /usr/local/ls>
Apr 14 18:54:47 myserver lswsctrl[6720]: 2022-04-14 18:54:47.023184 [ERROR] [config:server:basics:errorLog] failed to set up error log!
Apr 14 18:54:47 myserver lswsctrl[6696]: [ERROR] Failed to start litespeed!
~
~
~
~
~
~
~
~
~
lines 1-14/14 (END)
journalctl -xe
Apr 14 18:57:50 myserver multipathd[754]: sda: failed to get sgio uid: No such file or directory
Apr 14 18:57:58 myserver multipathd[754]: sda: add missing path
Apr 14 18:57:58 myserver multipathd[754]: sda: failed to get udev uid: Invalid argument
Apr 14 18:57:58 myserver multipathd[754]: sda: failed to get sysfs uid: Invalid argument
Apr 14 18:57:58 myserver multipathd[754]: sda: failed to get sgio uid: No such file or directory
Apr 14 18:57:59 myserver lswsctrl[7468]: /usr/local/lsws/bin/lswsctrl: 216: cannot create /usr/local/lsws/bin/../logs/lsrestart.log: Directory nonex>
Apr 14 18:58:00 myserver lswsctrl[7468]: /usr/local/lsws/bin/lswsctrl: 220: cannot create /usr/local/lsws/bin/../logs/lsrestart.log: Directory nonex>
Apr 14 18:58:00 myserver lswsctrl[7601]: 2022-04-14 18:58:00.161315 [ERROR] [config:server:basics:errorLog] log file is not writable - /usr/local/ls>
Apr 14 18:58:00 myserver lswsctrl[7601]: 2022-04-14 18:58:00.161387 [ERROR] [config:server:basics:errorLog] failed to set up error log!
Apr 14 18:58:00 myserver lswsctrl[7468]: [ERROR] Failed to start litespeed!
Apr 14 18:58:03 myserver postfix/anvil[1758]: statistics: max connection rate 1/60s for (smtp:117.66.241.77) at Apr 14 18:49:22
Apr 14 18:58:03 myserver postfix/anvil[1758]: statistics: max connection count 1 for (smtp:117.66.241.77) at Apr 14 18:49:22
Apr 14 18:58:03 myserver postfix/anvil[1758]: statistics: max cache size 1 at Apr 14 18:49:22
Apr 14 18:58:03 myserver multipathd[754]: sda: add missing path
Apr 14 18:58:03 myserver multipathd[754]: sda: failed to get udev uid: Invalid argument
Apr 14 18:58:03 myserver multipathd[754]: sda: failed to get sysfs uid: Invalid argument
Apr 14 18:58:03 myserver multipathd[754]: sda: failed to get sgio uid: No such file or directory
Apr 14 18:58:05 myserver sshd[7623]: Unable to negotiate with 195.58.38.215 port 57368: no matching key exchange method found. Their offer: diffie-h>
Apr 14 18:58:08 myserver multipathd[754]: sda: add missing path
Apr 14 18:58:08 myserver multipathd[754]: sda: failed to get udev uid: Invalid argument
Apr 14 18:58:08 myserver multipathd[754]: sda: failed to get sysfs uid: Invalid argument
Apr 14 18:58:08 myserver multipathd[754]: sda: failed to get sgio uid: No such file or directory
Apr 14 18:58:09 myserver lswsctrl[7545]: /usr/local/lsws/bin/lswsctrl: 216: cannot create /usr/local/lsws/bin/../logs/lsrestart.log: Directory nonex>
lines 2126-2148/2148 (END)
Apr 14 18:57:50 myserver multipathd[754]: sda: failed to get sgio uid: No such file or directory
Apr 14 18:57:58 myserver multipathd[754]: sda: add missing path
Apr 14 18:57:58 myserver multipathd[754]: sda: failed to get udev uid: Invalid argument
Apr 14 18:57:58 myserver multipathd[754]: sda: failed to get sysfs uid: Invalid argument
Apr 14 18:57:58 myserver multipathd[754]: sda: failed to get sgio uid: No such file or directory
Apr 14 18:57:59 myserver lswsctrl[7468]: /usr/local/lsws/bin/lswsctrl: 216: cannot create /usr/local/lsws/bin/../logs/lsrestart.log: Directory nonexistent
Apr 14 18:58:00 myserver lswsctrl[7468]: /usr/local/lsws/bin/lswsctrl: 220: cannot create /usr/local/lsws/bin/../logs/lsrestart.log: Directory nonexistent
Apr 14 18:58:00 myserver lswsctrl[7601]: 2022-04-14 18:58:00.161315 [ERROR] [config:server:basics:errorLog] log file is not writable - /usr/local/lsws/logs/error>
Apr 14 18:58:00 myserver lswsctrl[7601]: 2022-04-14 18:58:00.161387 [ERROR] [config:server:basics:errorLog] failed to set up error log!
Apr 14 18:58:00 myserver lswsctrl[7468]: [ERROR] Failed to start litespeed!
Apr 14 18:58:03 myserver postfix/anvil[1758]: statistics: max connection rate 1/60s for (smtp:117.66.241.77) at Apr 14 18:49:22
Apr 14 18:58:03 myserver postfix/anvil[1758]: statistics: max connection count 1 for (smtp:117.66.241.77) at Apr 14 18:49:22
Apr 14 18:58:03 myserver postfix/anvil[1758]: statistics: max cache size 1 at Apr 14 18:49:22
Apr 14 18:58:03 myserver multipathd[754]: sda: add missing path
Apr 14 18:58:03 myserver multipathd[754]: sda: failed to get udev uid: Invalid argument
Apr 14 18:58:03 myserver multipathd[754]: sda: failed to get sysfs uid: Invalid argument
Apr 14 18:58:03 myserver multipathd[754]: sda: failed to get sgio uid: No such file or directory
Apr 14 18:58:05 myserver sshd[7623]: Unable to negotiate with 195.58.38.215 port 57368: no matching key exchange method found. Their offer: diffie-hellman-group1>
Apr 14 18:58:08 myserver multipathd[754]: sda: add missing path
Apr 14 18:58:08 myserver multipathd[754]: sda: failed to get udev uid: Invalid argument
Apr 14 18:58:08 myserver multipathd[754]: sda: failed to get sysfs uid: Invalid argument
Apr 14 18:58:08 myserver multipathd[754]: sda: failed to get sgio uid: No such file or directory
Apr 14 18:58:09 myserver lswsctrl[7545]: /usr/local/lsws/bin/lswsctrl: 216: cannot create /usr/local/lsws/bin/../logs/lsrestart.log: Directory nonexistent
~
~
~
~
Please share the error logs compelete.
also did you tried the solution given above?
Yes I did , that was not worked,
I installed new ubuntu and then new cyberpanel but I have backup from that server (in esxi)
If you want full error logs , please tell me where is the location of thoes files , I will share here.