1 (edited by martin.blom 2014-05-26 16:57:01)

Topic: Weekly cron error

==== Required information ====
- iRedMail version: 0.8.7
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- Linux/BSD distribution name and version: Debian Wheezy
- Related log if you're reporting an issue:
====

Hi

I get an errror every week on one the 'built-in' cron jobs. Below is the error message that gets mailed to root every week.

Please let me know how I can fix this?

Cron <root@debianmail> test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )

/etc/cron.daily/logrotate:
Stopping iredapd ...
Starting iredapd ...
Usage: /etc/init.d/rsyslog {start|stop|rotate|restart|force-reload|status}
invoke-rc.d: initscript rsyslog, action "reload" failed.
error: error running non-shared postrotate script for /var/log/openldap.log of '/var/log/openldap.log '
run-parts: /etc/cron.daily/logrotate exited with return code 1

----

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

2

Re: Weekly cron error

Obviously, it tries to reload /etc/init.d/rsyslog service, but the script doesn't support "reload" action. Maybe you should report this issue to Debian. What's the content of file /etc/cron.daily/logrotate?

3

Re: Weekly cron error

ZhangHuangbin wrote:

Obviously, it tries to reload /etc/init.d/rsyslog service, but the script doesn't support "reload" action. Maybe you should report this issue to Debian. What's the content of file /etc/cron.daily/logrotate?

I am just using your 'default' 0.8.7 install, I haven't changed that file.

cat /etc/cron.daily/logrotate
#!/bin/sh

test -x /usr/sbin/logrotate || exit 0
/usr/sbin/logrotate /etc/logrotate.conf

4

Re: Weekly cron error

According to the Bucktracking system of Debian (https://bugs.debian.org/cgi-bin/bugrepo … bug=731152) the reload action is depricated and has changed to rotate.

You can manually edit the file(s) in \etc\logrotate.d which contain "rsyslog reload" to "rsyslog rotate"
Probably the only file you have to change is \etc\logrotate.d\openldap

5

Re: Weekly cron error

Jeronymus wrote:

According to the Bucktracking system of Debian (https://bugs.debian.org/cgi-bin/bugrepo … bug=731152) the reload action is depricated and has changed to rotate.

You can manually edit the file(s) in \etc\logrotate.d which contain "rsyslog reload" to "rsyslog rotate"
Probably the only file you have to change is \etc\logrotate.d\openldap

Thanks a lot for helping out.

I changed it to 'rsyslog rotate' in: /etc/logrotate.d/openldap

I also needed to change it in: /etc/logrotate.d/policyd

'grep -r "rsyslog reload" /etc/logrotate.d/' doesn't show results for other than those two files on my system.

6

Re: Weekly cron error

Also, those files are created by iRedMail, if I'm not mistaken?

So, maybe it could be changed in future iRedMail updates ZhangHuangbin?

Thanks

7

Re: Weekly cron error

martin.blom wrote:

Also, those files are created by iRedMail, if I'm not mistaken?

It's created by Debian binary package (apt-get install xxx), not iRedMail. You can check which package installed this file.