logrotate not able to truncate catalina.out [duplicate]
Clash Royale CLAN TAG#URR8PPP
This question already has an answer here:
logrotate not working
2 answers
I'm running tomcat server in my centos machine. I've following content in my /etc/logrotate.d/tomcat
file:
/log/apache-tomcat/catalina.out
copytruncate
daily
size 256M
rotate 8
missingok
maxage 7
I tried to run the logrotate
command manually in debug mode.
/usr/sbin/logrotate -d /etc/logrotate.conf
In the logs, I found following content regarding the /log/apache-tomcat/catalina.out
file.
rotating pattern: /log/apache-tomcat/catalina.out 268435456 bytes (8 rotations)
empty log files are rotated, old logs are removed
considering log /log/apache-tomcat/catalina.out
log needs rotating
rotating log /log/apache-tomcat/catalina.out, log->rotateCount is 8
dateext suffix '-20190206'
glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
glob finding old rotated logs failed
copying /log/apache-tomcat/catalina.out to /log/apache-tomcat/catalina.out-20190206
truncating /log/apache-tomcat/catalina.out
But the file size didn't change after running the command. I'm not sure what went wrong here. This file size is keep on increasing and causing lot of issues.
centos logrotate tomcat
marked as duplicate by Jeff Schaller, Anthony Geoghegan, Christopher, Community♦ Feb 6 at 16:43
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
This question already has an answer here:
logrotate not working
2 answers
I'm running tomcat server in my centos machine. I've following content in my /etc/logrotate.d/tomcat
file:
/log/apache-tomcat/catalina.out
copytruncate
daily
size 256M
rotate 8
missingok
maxage 7
I tried to run the logrotate
command manually in debug mode.
/usr/sbin/logrotate -d /etc/logrotate.conf
In the logs, I found following content regarding the /log/apache-tomcat/catalina.out
file.
rotating pattern: /log/apache-tomcat/catalina.out 268435456 bytes (8 rotations)
empty log files are rotated, old logs are removed
considering log /log/apache-tomcat/catalina.out
log needs rotating
rotating log /log/apache-tomcat/catalina.out, log->rotateCount is 8
dateext suffix '-20190206'
glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
glob finding old rotated logs failed
copying /log/apache-tomcat/catalina.out to /log/apache-tomcat/catalina.out-20190206
truncating /log/apache-tomcat/catalina.out
But the file size didn't change after running the command. I'm not sure what went wrong here. This file size is keep on increasing and causing lot of issues.
centos logrotate tomcat
marked as duplicate by Jeff Schaller, Anthony Geoghegan, Christopher, Community♦ Feb 6 at 16:43
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
This question already has an answer here:
logrotate not working
2 answers
I'm running tomcat server in my centos machine. I've following content in my /etc/logrotate.d/tomcat
file:
/log/apache-tomcat/catalina.out
copytruncate
daily
size 256M
rotate 8
missingok
maxage 7
I tried to run the logrotate
command manually in debug mode.
/usr/sbin/logrotate -d /etc/logrotate.conf
In the logs, I found following content regarding the /log/apache-tomcat/catalina.out
file.
rotating pattern: /log/apache-tomcat/catalina.out 268435456 bytes (8 rotations)
empty log files are rotated, old logs are removed
considering log /log/apache-tomcat/catalina.out
log needs rotating
rotating log /log/apache-tomcat/catalina.out, log->rotateCount is 8
dateext suffix '-20190206'
glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
glob finding old rotated logs failed
copying /log/apache-tomcat/catalina.out to /log/apache-tomcat/catalina.out-20190206
truncating /log/apache-tomcat/catalina.out
But the file size didn't change after running the command. I'm not sure what went wrong here. This file size is keep on increasing and causing lot of issues.
centos logrotate tomcat
This question already has an answer here:
logrotate not working
2 answers
I'm running tomcat server in my centos machine. I've following content in my /etc/logrotate.d/tomcat
file:
/log/apache-tomcat/catalina.out
copytruncate
daily
size 256M
rotate 8
missingok
maxage 7
I tried to run the logrotate
command manually in debug mode.
/usr/sbin/logrotate -d /etc/logrotate.conf
In the logs, I found following content regarding the /log/apache-tomcat/catalina.out
file.
rotating pattern: /log/apache-tomcat/catalina.out 268435456 bytes (8 rotations)
empty log files are rotated, old logs are removed
considering log /log/apache-tomcat/catalina.out
log needs rotating
rotating log /log/apache-tomcat/catalina.out, log->rotateCount is 8
dateext suffix '-20190206'
glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
glob finding old rotated logs failed
copying /log/apache-tomcat/catalina.out to /log/apache-tomcat/catalina.out-20190206
truncating /log/apache-tomcat/catalina.out
But the file size didn't change after running the command. I'm not sure what went wrong here. This file size is keep on increasing and causing lot of issues.
This question already has an answer here:
logrotate not working
2 answers
centos logrotate tomcat
centos logrotate tomcat
edited Feb 6 at 17:28
Rui F Ribeiro
40.7k1479137
40.7k1479137
asked Feb 6 at 14:09
pkgajulapallipkgajulapalli
1266
1266
marked as duplicate by Jeff Schaller, Anthony Geoghegan, Christopher, Community♦ Feb 6 at 16:43
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
marked as duplicate by Jeff Schaller, Anthony Geoghegan, Christopher, Community♦ Feb 6 at 16:43
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
The problem got resolved after changing the permissions of /etc/logrotate.d/tomcat
file.
Before:
$ ls -lht /etc/logrotate.d/tomcat
-rwxr-xr-x 1 root root 308 Apr 25 2018 /etc/logrotate.d/tomcat
After:
$ sudo chmod -x /etc/logrotate.d/tomcat
$ ls -lht /etc/logrotate.d/tomcat
-rw-r--r-- 1 root root 308 Apr 25 2018 /etc/logrotate.d/tomcat
Got to know about it after checking verbose of logrotate
.
$ /usr/sbin/logrotate -v /etc/logrotate.conf
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
The problem got resolved after changing the permissions of /etc/logrotate.d/tomcat
file.
Before:
$ ls -lht /etc/logrotate.d/tomcat
-rwxr-xr-x 1 root root 308 Apr 25 2018 /etc/logrotate.d/tomcat
After:
$ sudo chmod -x /etc/logrotate.d/tomcat
$ ls -lht /etc/logrotate.d/tomcat
-rw-r--r-- 1 root root 308 Apr 25 2018 /etc/logrotate.d/tomcat
Got to know about it after checking verbose of logrotate
.
$ /usr/sbin/logrotate -v /etc/logrotate.conf
add a comment |
The problem got resolved after changing the permissions of /etc/logrotate.d/tomcat
file.
Before:
$ ls -lht /etc/logrotate.d/tomcat
-rwxr-xr-x 1 root root 308 Apr 25 2018 /etc/logrotate.d/tomcat
After:
$ sudo chmod -x /etc/logrotate.d/tomcat
$ ls -lht /etc/logrotate.d/tomcat
-rw-r--r-- 1 root root 308 Apr 25 2018 /etc/logrotate.d/tomcat
Got to know about it after checking verbose of logrotate
.
$ /usr/sbin/logrotate -v /etc/logrotate.conf
add a comment |
The problem got resolved after changing the permissions of /etc/logrotate.d/tomcat
file.
Before:
$ ls -lht /etc/logrotate.d/tomcat
-rwxr-xr-x 1 root root 308 Apr 25 2018 /etc/logrotate.d/tomcat
After:
$ sudo chmod -x /etc/logrotate.d/tomcat
$ ls -lht /etc/logrotate.d/tomcat
-rw-r--r-- 1 root root 308 Apr 25 2018 /etc/logrotate.d/tomcat
Got to know about it after checking verbose of logrotate
.
$ /usr/sbin/logrotate -v /etc/logrotate.conf
The problem got resolved after changing the permissions of /etc/logrotate.d/tomcat
file.
Before:
$ ls -lht /etc/logrotate.d/tomcat
-rwxr-xr-x 1 root root 308 Apr 25 2018 /etc/logrotate.d/tomcat
After:
$ sudo chmod -x /etc/logrotate.d/tomcat
$ ls -lht /etc/logrotate.d/tomcat
-rw-r--r-- 1 root root 308 Apr 25 2018 /etc/logrotate.d/tomcat
Got to know about it after checking verbose of logrotate
.
$ /usr/sbin/logrotate -v /etc/logrotate.conf
answered Feb 6 at 16:43
pkgajulapallipkgajulapalli
1266
1266
add a comment |
add a comment |