Please find below the resolutions for the log rotation issues identified in EMAv4 :
1. ema_debug.log is not rotating
Solution:
File: /etc/logrotate.d/java_logr
Change:
From: /var/run/syslogd.pid
To: /var/run/rsyslogd.pid (add 'r' in front of syslog)
Run:
chmod 644 /opt/ema/config/java_logr
================================================
2. Maillog file is not rotating: /var/log/maillog
Solution:
Create file: /opt/ema/utils/maillog_rotate.conf
Contents:
/var/log/maillog {
notifempty
missingok
olddir /var/log/rotated
daily
rotate 30
compress
dateext
postrotate
/usr/bin/kill -s HUP `cat /var/run/rsyslogd.pid 2> /dev/null` 2> /dev/null || true
endscript
}
Cron job:
00 00 * * * /usr/sbin/logrotate -f /opt/ema/utils/maillog_rotate.conf >> /tmp/logrotate.log 2>&1
[Make sure to run with debug mode (-d) before scheduling in cron]
Post-rotation result:
-rw-r--r-- 1 root root 1.6M Jul 15 12:02 jsearcher.log.1
-rw------- 1 root root 13M Jul 15 12:29 maillog-20250715.gz
-rwxr-xr-x 1 root root 16K Jul 15 12:29 ema_info.log.2.gz
-rwxr-xr-x 1 root root 110K Jul 15 12:39 ema_info.log.1
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article