[CentOS] Logrotate errors
C. L. Martinez
carlopmart at gmail.com
Fri Apr 11 05:38:39 UTC 2014
Yep, Marios and Steven are right ... I have changed dateformat for one
log file and I have done another test changing time rotations ... And
all works ok.
Many thanks for your help.
On Fri, Apr 11, 2014 at 12:09 AM, Steven Tardy <sjt5atra at gmail.com> wrote:
> http://svn.fedorahosted.org/svn/logrotate/tags/r3-8-5/logrotate.8
> shows "hourly" as a .conf option was added to 3.8.5...
>
> current centos 6 version is logrotate-3.7.8-17.el6.x86_64
>
> centos6$ man logrotate:
> dateformat format_string
> Specify the extension for dateext using the notation similar
> to
> strftime(3) function. Only %Y %m %d and %s specifiers
> are
> allowed.
>
> in your .conf try:
> dateformat -%s
>
>
>
> On Wed, Apr 9, 2014 at 2:45 AM, C. L. Martinez <carlopmart at gmail.com> wrote:
>
>> Hi all,
>>
>> I have a problem with logrotate and I don't know why. In
>> /var/log/messages appears these errors:
>>
>> Apr 8 15:01:01 plzfnsm02 logrotate: ALERT exited abnormally with [1]
>> Apr 8 16:01:01 plzfnsm02 logrotate: ALERT exited abnormally with [1]
>> Apr 8 17:01:01 plzfnsm02 logrotate: ALERT exited abnormally with [1]
>> Apr 8 18:01:01 plzfnsm02 logrotate: ALERT exited abnormally with [1]
>> Apr 8 19:01:01 plzfnsm02 logrotate: ALERT exited abnormally with [1]
>> Apr 8 20:01:02 plzfnsm02 logrotate: ALERT exited abnormally with [1]
>> Apr 8 21:01:01 plzfnsm02 logrotate: ALERT exited abnormally with [1]
>> Apr 8 22:01:01 plzfnsm02 logrotate: ALERT exited abnormally with [1]
>> Apr 8 23:01:01 plzfnsm02 logrotate: ALERT exited abnormally with [1]
>>
>> It seems the problem if with this logrotate.conf (executed every hour):
>>
>> create
>> dateext
>>
>> /srv/www2/logs/viewer.log {
>> size 512k
>> create 0640 www www
>> missingok
>> rotate 7
>> compress
>> delaycompress
>> copytruncate
>> notifempty
>> }
>>
>> Doing a debug:
>>
>> [root at www02 ~]# logrotate /data/config/etc/logrotate.conf -dv
>> reading config file /data/config/etc/logrotate.conf
>> reading config info for /nsm/moloch/logs/viewer.log
>>
>> Handling 1 logs
>>
>> rotating pattern: /srv/www2/logs/viewer.log 524288 bytes (7 rotations)
>> empty log files are not rotated, old logs are removed
>> considering log /srv/www2/logs/viewer.log
>> log needs rotating
>> rotating log /srv/www2/logs/viewer.log, log->rotateCount is 7
>> dateext suffix '-20140409'
>> glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
>> glob finding logs to compress failed
>> destination /srv/www2/logs/viewer.log-20140409 already exists, skipping
>> rotation
>>
>> According to this kb from redhat's website:
>>
>> https://access.redhat.com/site/solutions/39006
>>
>> problem could be selinux. But SElinux is disabled:
>>
>> [root at www02 ~]# sestatus
>> SELinux status: disabled
>> [root at www02 ~]#
>>
>> Any idea?? Could be a bug??
>>
>> Host is a CentOS 6.5 x86_64 fully patched.
>>
>> Thanks.
>> _______________________________________________
>> CentOS mailing list
>> CentOS at centos.org
>> http://lists.centos.org/mailman/listinfo/centos
>>
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> http://lists.centos.org/mailman/listinfo/centos
More information about the CentOS
mailing list