Logrotate not doing any rotation
- by blizz
I just set up LogRotate on my RHEL6 server so that it rotates my custom Apache log files. However, it doesn't do anything when i try manually running it.
I expect it to rotate the log files "access.log" and "err.log". They have been there for a few days and need to be rotated.
Here is the output:
[root@pc1 httpd]# logrotate -d -f /etc/logrotate.d/apache
reading config file /etc/logrotate.d/apache
reading config info for /var/log/httpd/*log
/var/www/html/NSLogs/access.log
/var/www/html/NSErrorLogs/err.log
Handling 1 logs
rotating pattern: /var/log/httpd/*log
/var/www/html/NSLogs/access.log
/var/www/html/NSErrorLogs/err.log
forced from command line (no old logs will be kept)
empty log files are rotated, old logs are removed
considering log /var/log/httpd/access_log
log needs rotating
considering log /var/log/httpd/error_log
log needs rotating
considering log /var/www/html/NSLogs/access.log
log needs rotating
considering log /var/www/html/NSErrorLogs/err.log
log needs rotating
rotating log /var/log/httpd/access_log, log->rotateCount is 0
dateext suffix '-20131023'
glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
glob finding old rotated logs failed
fscreate context set to unconfined_u:object_r:httpd_log_t:s0
renaming /var/log/httpd/access_log to /var/log/httpd/access_log-20131023
disposeName will be /var/log/httpd/access_log-20131023.gz
running postrotate script
running script with arg /var/log/httpd/access_log: "
/usr/bin/killall -HUP httpd
"
compressing log with: /bin/gzip
removing old log /var/log/httpd/access_log-20131023.gz
error: error opening /var/log/httpd/access_log-20131023.gz: No such file or directory
rotating log /var/log/httpd/error_log, log->rotateCount is 0
dateext suffix '-20131023'
glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
glob finding old rotated logs failed
fscreate context set to unconfined_u:object_r:httpd_log_t:s0
renaming /var/log/httpd/error_log to /var/log/httpd/error_log-20131023
disposeName will be /var/log/httpd/error_log-20131023.gz
running postrotate script
running script with arg /var/log/httpd/error_log: "
/usr/bin/killall -HUP httpd
"
compressing log with: /bin/gzip
removing old log /var/log/httpd/error_log-20131023.gz
error: error opening /var/log/httpd/error_log-20131023.gz: No such file or directory
rotating log /var/www/html/NSLogs/access.log, log->rotateCount is 0
dateext suffix '-20131023'
glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
glob finding old rotated logs failed
fscreate context set to unconfined_u:object_r:httpd_sys_rw_content_t:s0
renaming /var/www/html/NSLogs/access.log to /var/www/html/NSLogs/access.log-20131023
disposeName will be /var/www/html/NSLogs/access.log-20131023.gz
running postrotate script
running script with arg /var/www/html/NSLogs/access.log: "
/usr/bin/killall -HUP httpd
"
compressing log with: /bin/gzip
removing old log /var/www/html/NSLogs/access.log-20131023.gz
error: error opening /var/www/html/NSLogs/access.log-20131023.gz: No such file or directory
rotating log /var/www/html/NSErrorLogs/err.log, log->rotateCount is 0
dateext suffix '-20131023'
glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
glob finding old rotated logs failed
fscreate context set to unconfined_u:object_r:httpd_sys_rw_content_t:s0
renaming /var/www/html/NSErrorLogs/err.log to /var/www/html/NSErrorLogs/err.log-20131023
disposeName will be /var/www/html/NSErrorLogs/err.log-20131023.gz
running postrotate script
running script with arg /var/www/html/NSErrorLogs/err.log: "
/usr/bin/killall -HUP httpd
"
compressing log with: /bin/gzip
removing old log /var/www/html/NSErrorLogs/err.log-20131023.gz
error: error opening /var/www/html/NSErrorLogs/err.log-20131023.gz: No such file or directory