执行/etc/cron.daily/logrotate命令时,logrotate会报错

我正在使用logrotate。 我正在使用/etc/logrotae.conf的以下结构:

/var/log/messages { daily size=1G rotate 1 postrotate service rsyslog restart > /dev/null endscript rotate 4 } 

而我正在执行以下命令:

 /etc/cron.daily/logrotate 

我得到了以下错误:

 error: /etc/logrotate.conf:33 duplicate log entry for /var/log/messages 

我正在使用centOS。 有什么能帮我弄明白吗?

Logrotate使用/etc/logrotate.conf和/etc/logrrotate.d作为configuration源。

search所有规则,你肯定有2个规则匹配/ var / log / messages