gaps in apache log files / awstats

15 posts / 0 new
Last post
#1 Tue, 09/23/2008 - 14:52
terryh

gaps in apache log files / awstats

Hi I'm running:

Virtualmin version 3.61.gpl (GPL) Webmin version 1.430 Debian Linux 4.0

I seem to be getting gaps in the apache log files for 2 and 3 days at a time. It's now the 24th of Sept. I have no log entries at all for the 22nd, 23rd and so far the 24th. I'm also missing logs for the 15th and 16th of Sept. I know for sure that apache is serving up pages. What could cause this type of behaviour? It looks like this is the case for all the virtual severs on the system, not just one.

I have recently upgraded from 3.53 to 3.61 I'm pretty sure all was ok before that.

Any ideas? Thanks for any help offered.

Regards Terry.

Tue, 09/23/2008 - 17:47
terryh

I found the problem I think.

Docroot /var/www/ was assigned a specific IP rather than "any".
I changed that and logging seems to have commecnced in the proper places for each VirtualServer now.

Wed, 09/24/2008 - 10:28 (Reply to #2)
sciallo

I checked and my /etc/apache2/sites-enabled/000-default file has
NameVirtualHost *:80
<VirtualHost *:80>
for the /var/www virtualhost no other entries anywhere, I'm guessing my problem lays somewhere else. Any hint anyone?

Wed, 09/24/2008 - 14:44 (Reply to #3)
ronald
ronald's picture

<VirtualHost *:80>

as far as I have learned not having an IP in there is not good.
<VirtualHost 123.123.123.123:80> so that apache knows where to listen

Wed, 09/24/2008 - 15:31 (Reply to #4)
terryh

Picture was too big.
Re-trying.... [img size=625]http://www.virtualmin.com/components/com_fireboard/uploaded/images/apach...

Wed, 09/24/2008 - 17:16 (Reply to #5)
sciallo

hmm, I'm not sure. In my setup the only virtual hosts that *don't* have 'any' in the ip address are the ones that have a dedicated IP address. Default server has 'Automatic' for the document root and 'Any' for the port all other ports are set to 80 or 443, I don't have any entry with Automatic for the server name. (And I still fail to understand how this would affect the logs of each of my virtual servers.

Thu, 09/25/2008 - 16:44 (Reply to #6)
terryh

I also could not see how the change I made would make any difference to the virtual servers, but I have 2 full days of stats now on every virtual server, and no errors from apache trying to write logs to directories that don't exist.

Mon, 09/29/2008 - 09:33 (Reply to #7)
terryh

It seems I have been totally wrong about this. My logs just stopped working again!!!
I have tracked it to the time when my logs get rotated. I'm not sure what's happening exactly, but whatever it is, it's dead on rotation time @ 06:27
I'm still digging, but the stuff I posted previously is nothing to do with it. Sorry.

Mon, 10/06/2008 - 01:23 (Reply to #8)
terryh

since adding the sleep commands, I've had unbroken logs for 6 days now. I think that's a record for me. :-)
Hopefully after a couple more days I'll be happy to call it fixed.
Fingers crossed.

Regards Terry.

Sat, 10/11/2008 - 03:34 (Reply to #9)
terryh

Hi Sciallo. How's your stats. I now have 11 days of uninterrupted stats. I think the sleep command fixed mine. It's the longest period I've had with no gaps. :-)

Sat, 10/11/2008 - 07:03 (Reply to #10)
sciallo

They've been working since.

All I did is change the logrotate configurations to use `/etc/init.d/apache2 restart` to restart apache after rotation.

Wed, 09/24/2008 - 10:08
sciallo

Please confirm that was the problem, I also have BIG gaps in my logs and have had them for a long time. ( http://rpwebworks.com/awstats ) I will try to look at what you mentioned, but I fail to understand why that would cause all the individual logs for virtual servers to be incorrect.

Wed, 09/24/2008 - 15:29
terryh

It's been about 24 hours since I made the change mentioned in post #2. I have 16 virtual servers, not all of them have traffic, but the ones that do are now being logged to the correct places /home/sitename/logs

Hopefully there's a picture attached. It shows 2 lines assigned to ANY address, ANY port. When the logging was not working correctly, there was an IP address in the line that has the document root set as "/var/www"

I have no idea how or why the change I made has fixed the logging errors, but it seems that it has.

Previously, apache was trying to write logs to /htdocs
I don't think there are any directories named htdocs on my server.

Mon, 09/29/2008 - 10:36
sciallo

See if what's on this issue ticket applies to you.
http://www.virtualmin.com/index.php?option=com_flyspray&do=details&a...

I am still watching my stats, it is currently working right, but then... sometimes they work for a few days then stop, so I'll call it solved once I see it working for a while :-)

Mon, 09/29/2008 - 10:49 (Reply to #14)
terryh

Hi. I'm pretty sure my problem is almost the same. Log rotation occurs, then no logs for a period, then I get some days of logs, then gone again.
I also was thinking that apache restarting may be the problem. I am currently tinkering with the sleep command in the hope it will give things time to settle for apache restarting.
I'm kind'a clutching at straws to be honest. I'll see how this works out, and get back to you. I will also try what is suggested in the ticket you linked to. Thanks.

I shall call mine solved once I get > 7 days of logs. I'm on weekly rotations.

Regards Terry.