[BlueOnyx:26000] Re: Nightly logrotate errors

Michael Stauber mstauber at blueonyx.it
Fri Feb 24 13:33:52 -05 2023


Hi Darren,

> Every night, on a 5210r box, I get a cron email showing errors related 
> to log rotation.
> 
> This is todays:
> 
> Thisdir: /home/.sites/site1
> 
> Thisdir: /home/.sites/site1//var/logs
> 
> Thisdir: /home/.sites/site1//var/logs/2023
> 
> Thisdir: /home/.sites/site1//var/logs/2023/2
> 
> Thisdir: /home/.sites/site1//var/logs/2023/2/23

> This repeats for every site on the server.


In /usr/local/sbin/split_logs you apparently have debugging enabled.

Edit /usr/local/sbin/split_logs and find this line:

my $DEBUG = 1;

Change it to this and save the changes:

my $DEBUG = 0;

> At the end of that repeating section is:
> 
> error: error setting owner of /home/.sites/site47/var/logs/web.log to 
> uid 0 and gid 1009: Operation not permitted

Please check if that Vsite is over-quota. If it is, then that's the 
reason why that chown doesn't work.

> DEBUG: Not running GoAccess because either /tmp/.logrotate_apache_access 
> or /home/.sites/server//logs/2023/2/23/ do not exist!
That's fine, too. It just means that there wasn't a logfile for that 
Vsite in question.

 > I am entirely unfamiliar with the log rotation process, can someone
 > shed any light on what is going on?

Due to the involved statistics gathering for different services such as 
GoAccess, Webalizer, AWStats and what not we do a lot of post-processing 
for the logfile and /usr/local/sbin/split_logs lines up the ducks for 
that. To facilitate debugging it spits out a lot of info when debugging 
is enabled, such as in your case. Simply turn debugging off and you'll 
be fine.

-- 
With best regards

Michael Stauber



More information about the Blueonyx mailing list