Suspend/resume virtual host in webadmin console does not work without manual lsws restart

gilles

Active Member
#1
I was trying to suspend/resume a virtual host from the webadmin console and it was not taking. The toggle only took after I did 'sudo service lsws restart' from the terminal. I am running lsws 1.7.4.

Let me know if this is a known problem or maybe there is an issue with my installation (permission?). Thank you.
 

Cold-Egg

Administrator
#4
Here's the example log I saw when I clicking the suspend button from web admin

Code:
tail -f /usr/local/lsws/logs/error.log
Code:
2020-09-10 01:49:12.117329 [NOTICE] [LocalWorker::workerExec] VHost:_AdminVHost suExec check uid 997 gid 33 setuidmode 2.
2020-09-10 01:49:12.117467 [INFO] [LocalWorker::workerExec] VHost:_AdminVHost suExec check uid 997 gid 33 setuidmode 2.
2020-09-10 01:49:12.117530 [NOTICE] [LocalWorker::workerExec] Config[AdminPHP]: suExec uid -1 gid -1 cmd /usr/local/lsws/admin/fcgi-bin/admin_php -c ../conf/php.ini, final uid 997 gid 33.
2020-09-10 01:49:12.117889 [NOTICE] [AdminPHP] add child process pid: 4861
2020-09-10 01:49:12.156917 [NOTICE] Virtual host Example is disabled!
2020-09-10 01:49:12.157437 [NOTICE] [AutoRestarter] new child process with pid=4862 is forked!
2020-09-10 01:49:12.157561 [NOTICE] [Child: 4859] Start shutting down gracefully ...
2020-09-10 01:49:12.157616 [NOTICE] Stop listener *:8088, fd 8.
2020-09-10 01:49:12.157669 [NOTICE] Stop listener *:7080, fd 9.
2020-09-10 01:49:12.157721 [NOTICE] Stop listener *:80, fd 11.
2020-09-10 01:49:12.157788 [NOTICE] Stop listener *:443, fd 12.
2020-09-10 01:49:12.159959 [INFO] [UDP:0.0.0.0:7080] initPacketsIn: allocated 100 packets
2020-09-10 01:49:12.160079 [INFO] [UDP:0.0.0.0:443] initPacketsIn: allocated 100 packets
2020-09-10 01:49:12.160292 [NOTICE] AIO is not supported on this machine!
2020-09-10 01:49:12.160385 [NOTICE] [child: 4862] Successfully change current user to www-data
2020-09-10 01:49:12.160429 [NOTICE] Child: 4862] Core dump is enabled.
2020-09-10 01:49:12.160512 [NOTICE] [Child: 4862] Setup swapping space...
2020-09-10 01:49:12.160615 [NOTICE] [Child: 4862] LiteSpeed/1.7.4 Open
        module versions:
        modgzip 1.1
        cache 1.62
        modinspector 1.1
        uploadprogress 1.1
        mod_security 1.3
 starts successfully!
2020-09-10 01:49:13.300211 [NOTICE] [Child: 4859] Shut down successfully!
2020-09-10 01:49:13.300369 [NOTICE] [AdminPHP] stop worker processes
2020-09-10 01:49:13.300444 [NOTICE] sendKillCmdToWatchdog: 'extappkill:4861:-3:0'.
2020-09-10 01:49:13.300554 [NOTICE] [4838] Cmd from child: [extappkill:4861:-3:0]
2020-09-10 01:49:13.300723 [INFO] [CLEANUP] Send signal: 15 to process: 4861
2020-09-10 01:49:13.301738 [NOTICE] [AutoRestarter] cleanup children processes and unix sockets belong to process 4859 !
2020-09-10 01:49:13.401983 [NOTICE] [AutoRestarter] child process with pid=4859 exited with status=0!
2020-09-10 01:49:14.510645 [NOTICE] [LocalWorker::workerExec] VHost:_AdminVHost suExec check uid 997 gid 33 setuidmode 2.
2020-09-10 01:49:14.510808 [INFO] [LocalWorker::workerExec] VHost:_AdminVHost suExec check uid 997 gid 33 setuidmode 2.
2020-09-10 01:49:14.510903 [NOTICE] [LocalWorker::workerExec] Config[AdminPHP]: suExec uid -1 gid -1 cmd /usr/local/lsws/admin/fcgi-bin/admin_php -c ../conf/php.ini, final uid 997 gid 33.
2020-09-10 01:49:14.511294 [NOTICE] [AdminPHP] add child process pid: 4863
 

gilles

Active Member
#5
That is definitely not happening for me. Now to figure out why.

Here are some unusual messages I see in my server log:

...​
2020-09-10 02:08:12.525802 [NOTICE] chroot is disabled.
...​
020-09-10 02:49:00.060799 [NOTICE] sendKillCmdToWatchdog: 'extappkill:1867:-3:0'.​
2020-09-10 02:49:00.060874 [NOTICE] [1147] Cmd from child: [extappkill:1867:-3:0]​
2020-09-10 02:49:00.060903 [INFO] Failed to get process [1867] start time, not running, skip killing.
2020-09-10 02:49:16.093975 [NOTICE] sendKillCmdToWatchdog: 'extappkill:1870:-3:0'.​
2020-09-10 02:49:16.094030 [NOTICE] [1147] Cmd from child: [extappkill:1870:-3:0]​
2020-09-10 02:49:16.094162 [INFO] [CLEANUP] Send signal: 15 to process: 1870​
...​

Nothing happens in the log when I click on suspend/resume. Then after a few seconds, the webadmin console kicks me out and I have to log back in. But the state of the virtual host is still the same.
 

gilles

Active Member
#6
Turns out it works if I use Safari instead of Chrome.

On a different note, the server error log webadmin console interface seems broken (in both browsers). On the dashboard page, nothing is displayed. And on the server log viewer page, nothing is displayed unless I select DEBUG and it keeps searching only 213 entries for some reason:

Searched 213 log entries and found 0 above level INFO​

No idea where that 213 number comes from as the log file currently has 71246 lines. I also cannot seem to change the time order to descending. Clicking on the caret down icon does nothing. Am I misunderstanding how the interface is supposed to work?

 

gilles

Active Member
#7
Oh I figured out I have to increase the length parameter. Now if there was a way to change the time display ordering to descending...
 

gilles

Active Member
#8
Apparently, it's this line in /usr/local/lsws/admin/html.open/view/logviewer.php:

$("#dash_logtbl").dataTable(
{"ordering": false, // <-- CHANGE to true
"lengthMenu":[[30,50,100,200],[30,50,100,200]]}
);

I cannot comprehend why this is not default. Who does not need ordering options?
 
Top