litespeed not working the next day, awstats errors

Discussion in 'Install/Configuration' started by aww, May 4, 2007.

  1. aww

    aww New Member

    Well after a successful test of litespeed yesterday evening onto my cpanel server (running on alternate port 1080) I came back this morning to discover that our external cpanel based awstats was giving errors on all domains (can't open server log permission denied)

    so I figured maybe litespeed had changed the permissions somehow on the logs and went to disable lightspeed

    strange thing is, it wasn't running anymore

    I also cannot restart it from the command line, it says its stopped and started with a new pid, but I can't get to the control panel and I cannot access any page through :1080
    (firewall ports are open)

    So where do I even begin to try to fix this?
  2. aww

    aww New Member

    I believe I have traced part of the problem in that the moment litespeed is started, it changes the ownership of all the domlogs to nobody.nobody - which messes up everything as it's supposed to be root.username

    But unfortunately, even after I stop lshttpd, and change the chown, awstats still gets permission denied.

    Also I need to know how to remove lshttp from automatically starting upon server reboot? Until I can get to stop changing the domlog ownership, it can't be allowed to run
  3. mistwang

    mistwang LiteSpeed Staff

    Please check the permission/ownership of /usr/local/apache/domlogs directory, maybe that is causing the permission problem.
    The ownership of the log file probably is not that important as long as it has been set to be world readable.

    To remove lshttpd rc script, just run "lsws/admin/misc/rc-uninst.sh"
  4. aww

    aww New Member

    Ah, you posted just as I figured it out.

    chmod 711 domlogs

    will fix it

    I'd rather not uninstall litespeed but learn how to fix it instead?

    Could you help me figure out why even when it runs I can no longer access the http port 1080 or the control panel 7080 ?
  5. mistwang

    mistwang LiteSpeed Staff

    Please check if the port is in use with command "netstat -an | grep <port>", It lists at least one listening port.

    And you can turn on debug logging by changing "debugLevel" to 10 in lsws/conf/httpd_config.xml, it will give more detail log in lsws/logs/error.log. You should be able to find some clues there. :)
  6. aww

    aww New Member

    Okay found the answer myself again by digging around :)

    http://litespeedtech.com/docs/webserver/troubleshoot/

    remove the /tmp/lshttpd directory if it exists already

    did just that, restarted it and bingo, everything is back

    Still wondering what caused it all to fail in the first place.
    If it doesn't happen again tonight, I won't worry.

    Some thoughts - can I setup an alias of some kind for the service command to start/stop lshttpd?

    ie.
    service lshttpd start

    I kinda got spoiled with that on apache.
    Also would be nice if you added lswsctrl status
  7. mistwang

    mistwang LiteSpeed Staff

    Looks like that's a permission problem for /tmp/lshttpd directory. Have you reinstall LSWS under another user account?

    Yes, the service command is available if the rc script has been installed.

    Code:
    service lsws start
  8. aww

    aww New Member

    No lsws was installed as root.

    But I did use the cpanel security script to secure tmp
    that might affect it?
    oooh! service lsws start

    I just didn't know what service name to call it. I figured it was lshttpd!

    many thanks for your help...

    my next challenge is somehow installing eacellerator at my more modest user knowledge level (used a 3rd party script for cpanel/apache)
  9. aww

    aww New Member

    By the way, the attributes reset again tonight.

    I had to do this to get awstats to run again without error:

    chmod -R 644 /usr/local/apache/domlogs
    chmod 711 /usr/local/apache/domlogs

    I hope I don't have to do that every night.

    Either cpanel is changing the attributes or lsws is.

    Any ideas where to look?
  10. mistwang

    mistwang LiteSpeed Staff

    cPanel does.
    What is permission mask and owner of domlogs that cPanel changes it to?

    We will change the owner of individual log files to nobody:username in next release, hope it will help.
  11. mistwang

    mistwang LiteSpeed Staff

  12. aww

    aww New Member

    Please forgive the dumb question but do I just run the regular install process
    with the above file and install it right over my existing install?
    My lsws control panel settings will remain?

    Will I have to re-run the phpa script install afterwards as well or does that remain untouched?

    I am very impressed how quickly improvements are made!
    Last edited: May 6, 2007
  13. mistwang

    mistwang LiteSpeed Staff

    Yes, it is.
  14. aww

    aww New Member

    Sigh, I have a bigger problem now.

    I just discovered I am somehow losing log data.

    There is virtually no traffic data in the current log, just a little leftover from yesterday and then for the start of today.

    Is there some process or setting that is truncating the logs?

    Oh wait, does the access.log rotation size also control the individual domlogs rotation size? Because I guess if that defaults to 10M then it might have deleted all the domlogs when it hit that point?

    From the timestamp I can tell all the logs in the domlogs folder were reset at 10:23pm. Very strange.
    Last edited: May 6, 2007
  15. mistwang

    mistwang LiteSpeed Staff

    LSWS will rotate the access log for apache vhost when the size reaches 2000MB to avoid server crashes. LSWS does not delete old log file when rotate it.

    We are investigating a problem related to access logging.
  16. aww

    aww New Member

    Okay I think I have it figured out now.

    I may have been accidentally destroying my own logs by trying to force awstats to run with the chmod changes.

    As soon as I did that and started awstats, litespeed would try to keep writing the logs, changing their permissions to "nobody:nobody" As soon as that happened, the logs get reset and truncated to 0, starting over again.

    The 3.1.1 upgrade does indeed correct the permissions but unfortunately I have lost 2-3 days worth of domlogs on a high activity site :(

    So far so good though, the logs seem to be "sticking" and awstats does not complain any further.
  17. Rodney-E2

    Rodney-E2 New Member

    Is anyone still having this issue? I keep getting this on one of our servers using litespeed every day, and have to re-run those permission changes listed on the first page, but I keep loosing stats for the time period that it is messed up.

    Got any ideas?
  18. aww

    aww New Member

    Rodney, once we upgraded to litespeed 3.1.1 (3.1.2 is also in testing now) the log problem went away as it will then write with the proper nobody:username owners/permissions.
  19. hichew

    hichew New Member

    is there a way to turn off the domlogs in litespeed?
    i have a very busy site.. it can generate 4-5 files (2 gig of logs for each file) every week.
    and sometime it make the site slow.
  20. mistwang

    mistwang LiteSpeed Staff

    Access logging can be turned off internally with vhosts configured via our web console, it cannot be turned off when LSWS read apache configuration.
    You can remove the log file with a cron job.

Share This Page