Cpanel Stops but wont restart Litespeed

Discussion in 'Install/Configuration' started by Geoff, Mar 18, 2010.

  1. Geoff

    Geoff New Member

    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.
  2. Geoff

    Geoff New Member

    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".
  3. mistwang

    mistwang LiteSpeed Staff

  4. Geoff

    Geoff New Member

    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.
  5. Geoff

    Geoff New Member

    the httpd restart command in cpanel gives this:
    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.
  6. Geoff

    Geoff New Member

    OK, more information.

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

    Now I get this error:

    (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: Mar 19, 2010
  7. mistwang

    mistwang LiteSpeed Staff

  8. MikeDVB

    MikeDVB New Member

    Your issue is odd - have you done anything special beyond installing cPanel and then LiteSpeed?
  9. Geoff

    Geoff New Member

    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.
  10. MikeDVB

    MikeDVB New Member

    Mistwang's directions should do the trick I would think as it would reinstall LiteSpeed (for cPanel) instead of for stand-alone.
  11. Geoff

    Geoff New Member

    cool, i'll post back when I have done it and see what the result is.
  12. MikeDVB

    MikeDVB New Member

    Sounds good :)
  13. Geoff

    Geoff New Member

    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

Share This Page