Cpanel Stops but wont restart Litespeed

Geoff

Active Member
#1
Using the latest version of lightspeed.

Turned off apache and tried various options for how litespeed handles httpd requests.
The problem appears to be that cpanel has restricted access to "service" command, and the restart httpd script in /scripts/ tries to run "service lsws restart" when ever changes are made. If you run the script by hand it says there is no command "service", and if you restart httpd from CPANEL it kills the lsws process but just never restarts (you can see it killing the processes in the logs). Going into the plugin and clicking "start lsws" or what ever, starts it.

If i change the command to /etc/init.d/lsws restart it will do it once, then it over-writes the script and it goes back to the service command again.

Anyone got a suggestion? I've been googling for ages and my eyes are now hurtin.
 

Geoff

Active Member
#2
More information:

If I execute the restart httpd script manually from /scripts it says it fails on line 13, which is "service lsws restart" - the error is "command "service" not found".
 

Geoff

Active Member
#4
same thing happens using User Apache binary wrapper"

CPANEL has prevented access to "service", so the processes can be killed, but it fails on restart.
As i say, if i change the command to /etc/init.d/lsws restart - it works once, then it gets over written and fails.
 

Geoff

Active Member
#5
the httpd restart command in cpanel gives this:
Apache restart failed. Unable to load pid from pid file and no httpd process found in process list.

If apache restart reported success but it failed soon after, it may be caused by oddities with mod_ssl.

You should run /scripts/ssl_crt_status as part of your troubleshooting process. Pass it --help for more details.

Also be sure to examine apache's variouse log files.
Apache Restart Output:

Log:
And neither litespeed nor Apache are running.

The logs then show that it can not start litespeed because it cant find "service" to initiate the command to restart.
 

Geoff

Active Member
#6
OK, more information.

Forget the errors up to now, I have resolved most of them.

Now I get this error:

2010-03-19 15:22:48.515 [DEBUG] try to give up super user privilege!
2010-03-19 15:22:48.515 [NOTICE] [child: 30833] Successfully change current user to nobody
2010-03-19 15:22:48.515 [NOTICE] [Child: 30833] Core dump is enabled.
2010-03-19 15:22:48.515 [NOTICE] [Child: 30833] Setup swapping space...
2010-03-19 15:22:48.515 [NOTICE] [Child: 30833] LiteSpeed/4.0.13 Enterprise starts successfully!
2010-03-19 15:22:48.515 [NOTICE] [AutoRestarter] new child process with pid=30833 is forked!
2010-03-19 15:22:51.001 [NOTICE] [Child: 30832] Start shutting down gracefully ...
2010-03-19 15:22:51.001 [NOTICE] New lshttpd process is ready, stop listeners
2010-03-19 15:22:51.001 [INFO] Stop listener 127.0.0.1:443.
2010-03-19 15:22:51.001 [INFO] Stop listener 127.0.0.1:80.
2010-03-19 15:22:51.001 [INFO] Stop listener IP:443.
2010-03-19 15:22:51.001 [INFO] Stop listener IP:80.
2010-03-19 15:22:51.001 [INFO] Stop listener IP:443.
2010-03-19 15:22:51.001 [INFO] Stop listener IP:80.
2010-03-19 15:22:51.001 [INFO] Stop listener *:7080.
2010-03-19 15:22:51.001 [NOTICE] [Child: 30832] Shut down successfully!
2010-03-19 15:22:51.003 [NOTICE] [Child: 30833] Start shutting down gracefully ...
2010-03-19 15:22:51.003 [NOTICE] New lshttpd process is ready, stop listeners
2010-03-19 15:22:51.003 [INFO] Stop listener IP:443.
2010-03-19 15:22:51.003 [INFO] Stop listener IP:80.
2010-03-19 15:22:51.003 [INFO] Stop listener IP:443.
2010-03-19 15:22:51.004 [INFO] Stop listener IP:80.
2010-03-19 15:22:51.004 [INFO] Stop listener IP:443.
2010-03-19 15:22:51.004 [INFO] Stop listener IP:80.
2010-03-19 15:22:51.004 [NOTICE] [Child: 30833] Shut down successfully!
(IP removed by me)

The restart httpd command fails with:
"Apache restart failed. Unable to load pid from pid file and no httpd process found in process list."

Part of the problem was, CPANEL looks at the httpd/error_log rather than lsws/error_log, so changing it in the LS config to httpd worked.

However, now it still doesnt start. It appears to be looking for "httpd" and it IS there when lsws is started:

Code:
root     32336  0.0  0.3   5468  3592 ?        S<   15:32   0:00 ./lshttpd
root     32339  0.0  0.0   1676   348 ?        S<   15:32   0:00 httpd (lscgid)
nobody   32340  0.0  0.3   5436  3372 ?        S<   15:32   0:00 ./lshttpd
nobody   32341  0.0  0.3   5436  3380 ?        S<   15:32   0:00 ./lshttpd
But it isnt there afterwards. Its like the restart script is getting itself out of sequence or something

It seems to restart lsws, shutdown lsws again, start it, shut it down again, then complain that it cant find the process.
 
Last edited:

Geoff

Active Member
#9
nope, nothing special. We installed litespeed, and then cpanel later, which might have been our downfall.
The server is now spawning a gazillion lshttpd (or httpd if LS is off) processes.

Going to try the method mistwang suggested.
 

MikeDVB

Well-Known Member
#10
nope, nothing special. We installed litespeed, and then cpanel later, which might have been our downfall.
The server is now spawning a gazillion lshttpd (or httpd if LS is off) processes.

Going to try the method mistwang suggested.
Mistwang's directions should do the trick I would think as it would reinstall LiteSpeed (for cPanel) instead of for stand-alone.
 

Geoff

Active Member
#13
Ok, seems to have worked..

So, let that be a lesson, do not think that you can install litespeed and THEN install CPANEL (even on a freshly installed LAMP) - CPANEL does not like it.

Its been running for a few hours without spawning a gazillion processes.


Thanks mistwang
 
Top