Tomcat logrotate error: tomcat:1 bad rotation count '7 compress missingok size 5M }'
3
votes
2
answers
1605
views
I have a standalone Tomcat installed on CentOS 8 and I am trying to rotate the
catalina.out
file.
I have created a file named /etc/logrotate.d/tomcat
with vim
and added the following line:
/opt/tomcat9/logs/catalina.out { copytruncate daily rotate 7 compress missingok size 5M }
However when I try to execute it manually I get the following error:
[root@dummy bin]# /usr/sbin/logrotate /etc/logrotate.conf
error: tomcat:1 bad rotation count '7 compress missingok size 5M }'
Can someone explain what I am doing wrong please?
Asked by user518510
(41 rep)
May 24, 2022, 06:40 AM
Last activity: Oct 17, 2023, 03:32 PM
Last activity: Oct 17, 2023, 03:32 PM