Cron error after update to 8.5

Looking to migrate to ZCS? Ask here. Got a great tip or script that helped you migrate? Post it here.
Post Reply
plastilin
Posts: 2
Joined: Thu Sep 11, 2014 12:56 am

Cron error after update to 8.5

Post by plastilin »

Hello. After update to 8.5 have error.
/etc/cron.daily/logrotate:
error: zimbra:141 unknown option 'endscript' -- ignoring line
Ubuntu 12.04  Zimbra 8.5.0 GA_3040 FOSS, with installed last patch.
iscar
Posts: 4
Joined: Sat Sep 13, 2014 3:09 am

Cron error after update to 8.5

Post by iscar »

I have the same error



When execute the logrotate in debug mode



root@domain:/home/user# /usr/sbin/logrotate /etc/logrotate.conf -d

reading config file /etc/logrotate.conf

including /etc/logrotate.d

reading config file apache2

reading config file apport

reading config file apt

reading config file aptitude

reading config file dpkg

reading config file php5-fpm

reading config file ppp

reading config file rsyslog

reading config file ufw

reading config file upstart

reading config file zimbra

error: zimbra:141 unknown option 'endscript' -- ignoring line



** this is the file /etc/logrotate.d/zimbra



/var/log/zimbra.log {

daily

missingok

notifempty

create 0644 syslog adm

postrotate

/usr/sbin/service rsyslog restart >/dev/null || true

su - zimbra -c "/opt/zimbra/bin/zmswatchctl restart" > /dev/null 2>&1 || true

endscript

compress

}



/var/log/zimbra-stats.log {

daily

missingok

notifempty

create 0644 syslog adm

postrotate

/usr/sbin/service rsyslog restart >/dev/null || true

su - zimbra -c "/opt/zimbra/bin/zmlogswatchctl restart" > /dev/null 2>&1 || true

endscript

rotate 0

}



/opt/zimbra/log/myslow.log {

daily

missingok

copytruncate

rotate 30

notifempty

create 0644 zimbra zimbra

compress

}



/opt/zimbra/log/logger_myslow.log {

daily

missingok

copytruncate

notifempty

create 0660 zimbra zimbra

compress

size 1000k

rotate 7

}



/opt/zimbra/log/zmconfigd.log {

daily

missingok

copytruncate

notifempty

create 0660 zimbra zimbra

postrotate

su - zimbra -c "/opt/zimbra/bin/zmconfigdctl restart" > /dev/null 2>&1 || true

endscript

rotate 30

}



/opt/zimbra/log/clamd.log {

daily

missingok

copytruncate

notifempty

create 0660 zimbra zimbra

postrotate

kill -HUP `cat /opt/zimbra/log/clamd.pid 2> /dev/null` 2> /dev/null || true

endscript

compress

size 5000k

rotate 7

}



/opt/zimbra/log/freshclam.log {

daily

missingok

copytruncate

notifempty

create 0660 zimbra zimbra

postrotate

kill -HUP `cat /opt/zimbra/log/freshclam.pid 2> /dev/null` 2> /dev/null || true

endscript

compress

size 1000k

rotate 7

}



/opt/zimbra/log/zmlogswatch.out {

daily

missingok

copytruncate

notifempty

create 0740 zimbra zimbra

postrotate

su - zimbra -c "/opt/zimbra/bin/zmlogswatchctl restart" > /dev/null 2>&1 || true

endscript

rotate 5

compress

}



/opt/zimbra/log/zmswatch.out {

daily

missingok

copytruncate

notifempty

create 0740 zimbra zimbra

postrotate

su - zimbra -c "/opt/zimbra/bin/zmswatchctl restart" > /dev/null 2>&1 || true

endscript

rotate 5

compress

}



/opt/zimbra/log/nginx.log /opt/zimbra/log/nginx.access.log {

daily

sharedscripts

missingok

notifempty

create 0644 zimbra zimbra

postrotate

kill -USR1 `cat /opt/zimbra/log/nginx.pid 2> /dev/null` 2> /dev/null || true

endscript

rotate 7

compress

}



/opt/zimbra/zmstat/zmstat.out {

daily

missingok

copytruncate

rotate 7

notifempty

compress

}



/opt/zimbra/log/cbpolicyd.log {

daily

missingok

rotate 7

notifempty

copytruncate

create 0644 zimbra zimbra

endscript

compress

}



/opt/zimbra/log/vmware-heartbeat.log {

daily

missingok

copytruncate

rotate 7

notifempty

compress

}



/opt/zimbra/log/spamtrain.log {

daily

missingok

copytruncate

rotate 7

notifempty

compress

}



dont know what else can be done



thank you
iscar
Posts: 4
Joined: Sat Sep 13, 2014 3:09 am

Cron error after update to 8.5

Post by iscar »

[mention:8081d13fd51d42c888a04ad0bba5f6a6:e9ed411860ed4f2ba0265705b8793d05] know something that could help
User avatar
jorgedlcruz
Zimbra Alumni
Zimbra Alumni
Posts: 2782
Joined: Thu May 22, 2014 4:47 pm

Cron error after update to 8.5

Post by jorgedlcruz »

Hi guys,
I don't have any other request like that. Did you do a complete reboot on the Ubuntu? Just in case, if the problem continues, please open a bug and some engineers will fix for sure :)
https://bugzilla.zimbra.com/
Best regards!
Jorge de la Cruz https://jorgedelacruz.es
Systems Engineer at Veeam Software https://www.veeam.com/
iscar
Posts: 4
Joined: Sat Sep 13, 2014 3:09 am

Cron error after update to 8.5

Post by iscar »

Researching and testing I found the following
Remember backup files before modifications
The error is in the file /etc/logrotate.d/zimbra in the line 141 which is the /opt/zimbra/log/cbpolicyd.log the command is
/opt/zimbra/log/cbpolicyd.log {
   daily
   missingok
   rotate 7
   notifempty
   copytruncate
   create 0644 zimbra zimbra
#   endscript
   compress
}  
I comment the "endscript" line because as I have consulted endscript used only when there is an execution in the script postrotate in this way
/var/log/zimbra-stats.log {
   daily
   missingok
   notifempty
   create 0644 syslog adm
   postrotate
     /usr/sbin/service rsyslog restart >/dev/null || true
     su - zimbra -c "/opt/zimbra/bin/zmlogswatchctl restart" > /dev/null 2>&1 || true
   endscript
   rotate 0
}
but in the /opt/zimbra/log/cbpolicyd.log is not included
So far it has worked well
if you want to check for errors in /etc/logrotate.d/zimbra execute "/usr/sbin/logrotate /etc/logrotate.d/zimbra -d" and check the exit.
root@domain:/home/user# /usr/sbin/logrotate /etc/logrotate.d/zimbra -d
reading config file /etc/logrotate.d/zimbra

Handling 14 logs

rotating pattern: /var/log/zimbra.log  after 1 days (no old logs will be kept)
empty log files are not rotated, old logs are removed
considering log /var/log/zimbra.log
  log does not need rotating

rotating pattern: /var/log/zimbra-stats.log  after 1 days (no old logs will be kept)
empty log files are not rotated, old logs are removed
considering log /var/log/zimbra-stats.log
  log does not need rotating

rotating pattern: /opt/zimbra/log/myslow.log  after 1 days (30 rotations)
empty log files are not rotated, old logs are removed
considering log /opt/zimbra/log/myslow.log
  log does not need rotating

rotating pattern: /opt/zimbra/log/logger_myslow.log  1024000 bytes (7 rotations)
empty log files are not rotated, old logs are removed
considering log /opt/zimbra/log/logger_myslow.log
  log /opt/zimbra/log/logger_myslow.log does not exist -- skipping

rotating pattern: /opt/zimbra/log/zmconfigd.log  after 1 days (30 rotations)
empty log files are not rotated, old logs are removed
considering log /opt/zimbra/log/zmconfigd.log
  log does not need rotating

rotating pattern: /opt/zimbra/log/clamd.log  5120000 bytes (7 rotations)
empty log files are not rotated, old logs are removed
considering log /opt/zimbra/log/clamd.log
  log does not need rotating

rotating pattern: /opt/zimbra/log/freshclam.log  1024000 bytes (7 rotations)
empty log files are not rotated, old logs are removed
considering log /opt/zimbra/log/freshclam.log
  log does not need rotating

rotating pattern: /opt/zimbra/log/zmlogswatch.out  after 1 days (5 rotations)
empty log files are not rotated, old logs are removed
considering log /opt/zimbra/log/zmlogswatch.out
  log does not need rotating

rotating pattern: /opt/zimbra/log/zmswatch.out  after 1 days (5 rotations)
empty log files are not rotated, old logs are removed
considering log /opt/zimbra/log/zmswatch.out
  log does not need rotating

rotating pattern: /opt/zimbra/log/nginx.log /opt/zimbra/log/nginx.access.log  after 1 days (7 rotations)
empty log files are not rotated, old logs are removed
considering log /opt/zimbra/log/nginx.log
  log does not need rotating
considering log /opt/zimbra/log/nginx.access.log
  log /opt/zimbra/log/nginx.access.log does not exist -- skipping
not running postrotate script, since no logs were rotated

rotating pattern: /opt/zimbra/zmstat/zmstat.out  after 1 days (7 rotations)
empty log files are not rotated, old logs are removed
considering log /opt/zimbra/zmstat/zmstat.out
  log does not need rotating

rotating pattern: /opt/zimbra/log/cbpolicyd.log  after 1 days (7 rotations)
empty log files are not rotated, old logs are removed
considering log /opt/zimbra/log/cbpolicyd.log
  log does not need rotating

rotating pattern: /opt/zimbra/log/vmware-heartbeat.log  after 1 days (7 rotations)
empty log files are not rotated, old logs are removed
considering log /opt/zimbra/log/vmware-heartbeat.log
  log /opt/zimbra/log/vmware-heartbeat.log does not exist -- skipping

rotating pattern: /opt/zimbra/log/spamtrain.log  after 1 days (7 rotations)
empty log files are not rotated, old logs are removed
considering log /opt/zimbra/log/spamtrain.log
  log does not need rotating
I hope I have contributed something, (Sorry for the english to google translate)
hmisikay
Posts: 3
Joined: Tue Oct 14, 2014 4:58 am

Cron error after update to 8.5

Post by hmisikay »

Hello guys, i have a fresh installed ubuntu 14.04 x64 , also i installed the latest release that was last weekend,  it's version is zcs-8.5.0_GA_3042, i "had" a problem like that, thanks to iscar for his/her effort, the annoying thing was when this cron starts to work, the zmmailbox crashes all the time too and this happens at 6 am in the morning, i have to wake up early to set the zmmailbox up (i thinked that it happened because of mailbox settings, i got the error mail contains error message for cron this morning),  however now i didn't get any error while running  "/usr/sbin/logrotate /etc/logrotate.d/zimbra -d" command, it looks successfully. dev team should consider about what is wrong with these jobs and plan to patch it.
this is my output. i have error messages for /var/log/zimbra.log and /var/log/zimbra-stats.log files, but they are exist and rotating.

reading config file /etc/logrotate.d/zimbra

Handling 14 logs

rotating pattern: /var/log/zimbra.log after 1 days (no old logs will be kept)
empty log files are not rotated, old logs are removed
considering log /var/log/zimbra.log
error: skipping "/var/log/zimbra.log" because parent directory has insecure permissions (It's world writable or writable by group which is not "root") Set "su" directive in config file to tell logrotate which user/group should be used for rotation.

rotating pattern: /var/log/zimbra-stats.log after 1 days (no old logs will be kept)
empty log files are not rotated, old logs are removed
considering log /var/log/zimbra-stats.log
error: skipping "/var/log/zimbra-stats.log" because parent directory has insecure permissions (It's world writable or writable by group which is not "root") Set "su" directive in config file to tell logrotate which user/group should be used for rotation.

rotating pattern: /opt/zimbra/log/myslow.log after 1 days (30 rotations)
empty log files are not rotated, old logs are removed
considering log /opt/zimbra/log/myslow.log
log does not need rotating

rotating pattern: /opt/zimbra/log/logger_myslow.log 1024000 bytes (7 rotations)
empty log files are not rotated, old logs are removed
considering log /opt/zimbra/log/logger_myslow.log
log /opt/zimbra/log/logger_myslow.log does not exist -- skipping

rotating pattern: /opt/zimbra/log/zmconfigd.log after 1 days (30 rotations)
empty log files are not rotated, old logs are removed
considering log /opt/zimbra/log/zmconfigd.log
log does not need rotating

rotating pattern: /opt/zimbra/log/clamd.log 5120000 bytes (7 rotations)
empty log files are not rotated, old logs are removed
considering log /opt/zimbra/log/clamd.log
log does not need rotating

rotating pattern: /opt/zimbra/log/freshclam.log 1024000 bytes (7 rotations)
empty log files are not rotated, old logs are removed
considering log /opt/zimbra/log/freshclam.log
log does not need rotating

rotating pattern: /opt/zimbra/log/zmlogswatch.out after 1 days (5 rotations)
empty log files are not rotated, old logs are removed
considering log /opt/zimbra/log/zmlogswatch.out
log does not need rotating

rotating pattern: /opt/zimbra/log/zmswatch.out after 1 days (5 rotations)
empty log files are not rotated, old logs are removed
considering log /opt/zimbra/log/zmswatch.out
log does not need rotating

rotating pattern: /opt/zimbra/log/nginx.log /opt/zimbra/log/nginx.access.log after 1 days (7 rotations)
empty log files are not rotated, old logs are removed
considering log /opt/zimbra/log/nginx.log
log /opt/zimbra/log/nginx.log does not exist -- skipping
considering log /opt/zimbra/log/nginx.access.log
log /opt/zimbra/log/nginx.access.log does not exist -- skipping
not running postrotate script, since no logs were rotated

rotating pattern: /opt/zimbra/zmstat/zmstat.out after 1 days (7 rotations)
empty log files are not rotated, old logs are removed
considering log /opt/zimbra/zmstat/zmstat.out
log does not need rotating

rotating pattern: /opt/zimbra/log/cbpolicyd.log after 1 days (7 rotations)
empty log files are not rotated, old logs are removed
considering log /opt/zimbra/log/cbpolicyd.log
log /opt/zimbra/log/cbpolicyd.log does not exist -- skipping

rotating pattern: /opt/zimbra/log/vmware-heartbeat.log after 1 days (7 rotations)
empty log files are not rotated, old logs are removed
considering log /opt/zimbra/log/vmware-heartbeat.log
log /opt/zimbra/log/vmware-heartbeat.log does not exist -- skipping

rotating pattern: /opt/zimbra/log/spamtrain.log after 1 days (7 rotations)
empty log files are not rotated, old logs are removed
considering log /opt/zimbra/log/spamtrain.log
log does not need rotating
Post Reply