View Issue Details

IDProjectCategoryView StatusLast Update
0001294SOGoSOPEpublic2011-06-16 11:56
Reporteralessio Assigned Toludovic  
PrioritynormalSeveritymajorReproducibilityhave not tried
Status resolvedResolutionfixed 
Product Version1.3.3 
Target Version1.3.8Fixed in Version1.3.8 
Summary0001294: Sogo restart fails during log rotate
Description

Can you help me about this trouble? During weekly logrotate, sogo stop and doesn't restart.

This is old log

tail /var/log/sogo.log.1

Mar 03 04:02:13 sogod: SOGo watchdog [2694]: <0x0x84ea618[WOWatchDog]> Terminating with signal 15
Mar 03 04:02:18 sogod: SOGo watchdog [2694]: <0x0x8506188[WOWatchDogChild]> sending terminate signal to pid 2695
Mar 03 04:02:29 sogod: SOGo watchdog [2694]: <0x0x8506188[WOWatchDogChild]> child 2695 exited
Mar 03 04:02:29 sogod: SOGo watchdog [2694]: <0x0x84ea618[WOWatchDog]> all children exited. We now terminate.

New sogo.log is empty :-|

This is logrotate script:

#cat /etc/logrotate.d/sogo
/var/log/sogo/*.log {
missingok
rotate 5
notifempty
create 0664 sogo sogo
postrotate
/sbin/service sogod restart > /dev/null 2>&1
endscript
}

No errors in messages.

I can't reproduce that fail, if i execute logrotate manually works.
If i execute restart manually, it works.

Service is a link to /etc/rc.d/init.d/sogod

This is verbose mode of logrotate. It works:

logrotate -fv /etc/logrotate.conf

rotating pattern: /var/log/sogo/*.log forced from command line (5 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/sogo/sogo.log
log needs rotating
rotating log /var/log/sogo/sogo.log, log->rotateCount is 5
renaming /var/log/sogo/sogo.log.5 to /var/log/sogo/sogo.log.6 (rotatecount 5, logstart 1, i 5),
renaming /var/log/sogo/sogo.log.4 to /var/log/sogo/sogo.log.5 (rotatecount 5, logstart 1, i 4),
renaming /var/log/sogo/sogo.log.3 to /var/log/sogo/sogo.log.4 (rotatecount 5, logstart 1, i 3),
renaming /var/log/sogo/sogo.log.2 to /var/log/sogo/sogo.log.3 (rotatecount 5, logstart 1, i 2),
renaming /var/log/sogo/sogo.log.1 to /var/log/sogo/sogo.log.2 (rotatecount 5, logstart 1, i 1),
renaming /var/log/sogo/sogo.log.0 to /var/log/sogo/sogo.log.1 (rotatecount 5, logstart 1, i 0),
old log /var/log/sogo/sogo.log.0 does not exist
renaming /var/log/sogo/sogo.log to /var/log/sogo/sogo.log.1
creating new log mode = 0664 uid = 3000 gid = 3000
running postrotate script
removing old log /var/log/sogo/sogo.log.6

Additional Information

Daniel Berteaud says: I had the same problem, and I solved it by removing the
postrotate section, and adding the copytruncate option in the logrotate
config. This way, the logrotate doesn't restart sogo anymore

TagsNo tags attached.

Activities

alessio

alessio

2011-06-16 03:31

reporter   ~0002585

Hi Ludovic, do you have any idea about this? Can i fix this directly in my installation, for now?

ludovic

ludovic

2011-06-16 11:56

administrator   ~0002595

http://mtn.inverse.ca/revision/diff/745ebe569ac5b050683e557f5e5fb7c1699ca7f5/with/9b6ca5cb2b17f229443223ae6bb703c37ca1f0c3

Issue History

Date Modified Username Field Change
2011-05-09 03:31 alessio New Issue
2011-06-15 16:53 ludovic Target Version => 1.3.8
2011-06-16 03:31 alessio Note Added: 0002585
2011-06-16 11:56 ludovic Note Added: 0002595
2011-06-16 11:56 ludovic Status new => resolved
2011-06-16 11:56 ludovic Fixed in Version => 1.3.8
2011-06-16 11:56 ludovic Resolution open => fixed
2011-06-16 11:56 ludovic Assigned To => ludovic