1 (edited by hoho 2011-09-19 15:13:15)

Topic: iredapd.log logrotate problem

==== Provide basic information to help troubleshoot ====
- iRedMail version:
- Linux/BSD distribution name and version:
- Any related log? Log is helpful for troubleshooting.
====

iRedMail: 0.7.3
CentOS 5.4

I found that the iredapd.log is 0 byte after logrotate every time.

I try to reboot the iRedMail server and found that the iredapd.log back to normal on 17 Sept. and some record can write inside the log file but after mid-night corn job of logrotate, the log file had been compressed and than a new log file had been created but there are no more record anymore...

-rw------- 1 root   root         0 Sep 17 00:02 iredapd.log
-rw------- 1 root   root        14 Sep  8 00:02 iredapd.log.10.bz2
-rw------- 1 root   root        14 Sep  7 00:02 iredapd.log.11.bz2
-rw------- 1 root   root        14 Sep  6 00:02 iredapd.log.12.bz2
-rw------- 1 root   root        14 Sep  5 00:02 iredapd.log.13.bz2
-rw------- 1 root   root        14 Sep  4 00:02 iredapd.log.14.bz2
-rw------- 1 root   root        14 Sep  3 00:02 iredapd.log.15.bz2
-rw------- 1 root   root        14 Sep  2 00:02 iredapd.log.16.bz2
-rw------- 1 root   root        14 Sep  1 00:02 iredapd.log.17.bz2
-rw------- 1 root   root        14 Aug 31 00:02 iredapd.log.18.bz2
-rw------- 1 root   root        14 Aug 30 00:02 iredapd.log.19.bz2
-rw------- 1 root   root      4055 Sep 17 00:02 iredapd.log.1.bz2
-rw------- 1 root   root        14 Aug 29 00:02 iredapd.log.20.bz2
-rw------- 1 root   root        14 Aug 28 00:02 iredapd.log.21.bz2
-rw------- 1 root   root        14 Aug 27 00:02 iredapd.log.22.bz2
-rw------- 1 root   root        14 Aug 26 00:02 iredapd.log.23.bz2
-rw------- 1 root   root        14 Aug 25 00:02 iredapd.log.24.bz2
-rw------- 1 root   root        14 Aug 24 00:02 iredapd.log.25.bz2
-rw------- 1 root   root        14 Aug 23 00:02 iredapd.log.26.bz2
-rw------- 1 root   root        14 Aug 22 00:02 iredapd.log.27.bz2
-rw------- 1 root   root        14 Aug 21 00:02 iredapd.log.28.bz2
-rw------- 1 root   root        14 Aug 20 00:02 iredapd.log.29.bz2
-rw------- 1 root   root        14 Sep 16 00:02 iredapd.log.2.bz2
-rw------- 1 root   root        14 Aug 19 00:02 iredapd.log.30.bz2
-rw------- 1 root   root        14 Sep 15 00:02 iredapd.log.3.bz2
-rw------- 1 root   root        14 Sep 14 00:02 iredapd.log.4.bz2
-rw------- 1 root   root        14 Sep 13 00:02 iredapd.log.5.bz2
-rw------- 1 root   root        14 Sep 12 00:02 iredapd.log.6.bz2
-rw------- 1 root   root        14 Sep 11 00:02 iredapd.log.7.bz2
-rw------- 1 root   root        14 Sep 10 00:02 iredapd.log.8.bz2
-rw------- 1 root   root        14 Sep  9 00:02 iredapd.log.9.bz2

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: iredapd.log logrotate problem

Could you please paste /etc/logrotate.d/iredapd?

3

Re: iredapd.log logrotate problem

# cat /etc/logrotate.d/iredapd
/var/log/iredapd.log {
    compress
    daily
    rotate 30
    missingok

    # Use bzip2 for compress.
    compresscmd /usr/bin/bzip2
    uncompresscmd /usr/bin/bunzip2
    compressoptions -9
    compressext .bz2

    # Used on RHEL/CentOS.
#    postrotate
#       /sbin/service syslog restart &>/dev/null
#    endscript

    postrotate
        /bin/kill -HUP $(cat /var/run/syslogd.pid 2> /dev/null) 2> /dev/null || true
    endscript

    # Used on Ubuntu.
    #postrotate
    #    invoke-rc.d sysklogd reload > /dev/null
    #endscript
}

4

Re: iredapd.log logrotate problem

Seems caused by iRedAPD, you can try to restart iredapd service in "postrotate":

    postrotate
        /bin/kill -HUP $(cat /var/run/syslogd.pid 2> /dev/null) 2> /dev/null || true
        /etc/init.d/iredapd restart
    endscript

5

Re: iredapd.log logrotate problem

iredapd is a important service for postfix, is it a good idea to restart it on a running system everyday?

I afraid system cracking once iredapd service restarting got any problem during mid-night.

I remember that I have an experience on iredapd service stop and make the system crack.