Apache Domain Logs not rotating ?

tdldp

Verified User
Joined
May 9, 2005
Messages
150
Hi all

I have a server with DA install that is acting weirdly...
I thought i had apache httpd logs (/var/log/httpd/domains/*) rotated daily, through the DA rotation mechanism, but this seems to be ok for approx 70 % of domains hosted on the box. (Approx 350 domains)

For the rest, i have /var/log/httpd/domains/ logfiles that keep growing, and some are now 2 gb big...
I have done a few echo tally, but with no effect on these files..

I have awstats that uses these logs to compute stats and what seems weird, is furthermore to the logrotation problem, there seems to be stats compute problems... Stats are not update automatically for these accounts, and i must click on manual update to see these stats finally calculated...

Could the 2 be linked. ?

Thanks for your advices

Yours
 
Last edited:
You might need to check the value of

Code:
logs_to_keep
rotation

in directadmin configs.

Also check directadmin logs on errors related to rotation.
 
I have in directadmin.conf (/usr/local/directadmin/data) under debian OS :

log_rotate_size=5
logdir=/var/log/directadmin
logger=/usr/local/directadmin/logger
loghostname=0
logs_to_keep=30

I tally all logs every 6 hours, due to high traffic sites...

In Logs :

directadmin error.log
Code:
2011:06:06-14:26:37: Socket write error: Unknown error
2011:06:07-07:26:50: Timeout from from [**IP**] : last flagged: Request::readAndProcess(*skt, [**IP**], [**IP**])
[**IP**]

Don't think this is in relation.​

directadmin system.log
Code:
2011:06:09-08:10:03: Tally All Begin
2011:06:09-08:10:03: Tally Reseller admin Begin
2011:06:09-08:10:03: Tally User user1 Begin
2011:06:09-08:10:26: Tally User user1 Complete 
[...]
2011:06:09-09:24:11: Tally Reseller admin Complete
2011:06:09-09:24:11: Tally Reseller interne Begin
2011:06:09-09:27:35: Tally User userx Begin
2011:06:09-09:28:20: Tally User userx Complete
[..]
2011:06:09-09:28:22: Tally Reseller interne Complete
2011:06:09-09:28:22: Tally Reseller suspendu Begin
2011:06:09-09:28:22: Tally User suspendu Begin
2011:06:09-09:28:24: Tally User suspendu Complete
2011:06:09-09:28:24: Tally Reseller suspendu Complete
2011:06:09-09:28:24: Tally All Complete

I have on 350 accounts approx 270 tally that work... All non working log rotate don't appear in this tally information log !!​

In errortaskq.log

I do happen to have random
2011:06:02-18:26:10: Error compressing file /home/[user]/domains/[domain]/logs/Jun-2011.8.tar.gz : /bin/tar: [domain].log: file changed as we read it
<br>
But this doesn't concern missing tally's, and those accounts have logs correctly rotated at final !


Thanks for your advices..
 
Continuing my searches, i've just discovered that after migration of these 80 accounts from another server to this one 3 months ago, that users affected by the problem although identified in the system as attached to reseller owner admin

ie :
Nom Propriétaire Bande Passante Utilisation Disque # de Domaines Bloqué IP Domaine(s) Selection
[user] admin 0 / 50000 1993.8 / 8000 1 / 1 No [IP] [domain]

were not in reality in the users.list of the admin reseller account files in :
/usr/local/directadmin/data/users/admin/users.list

What is weird is that these 80 accounts made the move with 150 other users who got correctly attached to admin users.list file

DA team : Is this a bug in server migration process ? How can i attach these missing accounts to their reseller correctly ? Will this solve my tally and logrotate problem ?

Thanks for answers...
 
Last edited:
Are logs for other users getting rotated? If so, then you might be right.

To add missing users to users.list, you can do it manually:

Open /usr/local/directadmin/data/users/<RESELLERNAME>/users.list and add missing usernames.
 
Are logs for other users getting rotated? If so, then you might be right.

To add missing users to users.list, you can do it manually:

Open /usr/local/directadmin/data/users/<RESELLERNAME>/users.list and add missing usernames.

Yes logs are getting rotated for the 150 other accounts that made the move...
I'd have preferred to have it added automatically and not manually...
Thanks for your return in any case
 
I don't know, what went wrong on your side, and why the usernames were not added to the list. Sure, they must have been added. What is more important for you now: to find reasons or a solution?

If I were you, I would fix the list and then do some researches in order to find the reasons.
 
I don't know, what went wrong on your side, and why the usernames were not added to the list. Sure, they must have been added. What is more important for you now: to find reasons or a solution?

If I were you, I would fix the list and then do some researches in order to find the reasons.

Ok for those interested :
I fixed the listing problem through the command found in KB :
grep creator=admin /usr/local/directadmin/data/users/*/user.conf | cut -d/ -f7 > /usr/local/directadmin/data/users/admin/users.list

WATCH OUT : This will Add all resellers to your users.list, process removing them from the users.list manually (in my case much easier, as i have 3 resellers, against 80 users to add)

Once the list is rebuilt, then a tally will recount all the stats.
echo "action=tally&value=all" >> /usr/local/directadmin/data/task.queue

Will tell you if all gets computed correctly afterwards..
 
Solved : Log rotate

Ok just for general information, log rotation has gone through all accounts this lunchhour. Problem was indeed in the users.list that was not uptodate for a reason i ignore..
Awstats statistics were computed all right...

Thanks for your help zEitEr

Tdldp
 
Back
Top