PDA

View Full Version : litespeed not working the next day, awstats errors


aww
05-04-2007, 07:37 AM
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?

aww
05-04-2007, 09:05 AM
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

mistwang
05-04-2007, 09:21 AM
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"

aww
05-04-2007, 09:29 AM
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 ?

mistwang
05-04-2007, 09:52 AM
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. :)

aww
05-04-2007, 09:54 AM
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

mistwang
05-04-2007, 10:22 AM
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.

service lsws start

aww
05-04-2007, 10:29 AM
No lsws was installed as root.

But I did use the cpanel security script to secure tmp
that might affect it?
/scripts/securetmp
Would you like to secure /tmp & /var/tmp at boot time? (y/n) y
Would you like to secure /tmp & /var/tmp now? (y/n) y
Securing /tmp & /var/tmp

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)

aww
05-04-2007, 09:32 PM
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?

mistwang
05-05-2007, 01:03 PM
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.

mistwang
05-05-2007, 06:58 PM
Please try 3.1.1 release, this and the ErrorDocument issue should have been addressed.

http://www.litespeedtech.com/packages/3.0/lsws-3.1.1-std-i386-linux.tar.gz

aww
05-05-2007, 09:17 PM
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!

mistwang
05-05-2007, 09:22 PM
Yes, it is.

aww
05-05-2007, 09:37 PM
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.

mistwang
05-06-2007, 03:44 PM
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.

aww
05-06-2007, 08:40 PM
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.

Rodney-E2
05-22-2007, 09:33 AM
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?

aww
05-22-2007, 11:30 AM
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.

hichew
08-03-2007, 11:37 AM
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.

mistwang
08-03-2007, 02:58 PM
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.

hichew
08-04-2007, 01:24 AM
so if LSWS read apache configuration, how to turned that off?
can someone tell me how to do that please.

thankyou