Carbonio stops logg...
 
Notifications
Clear all

Carbonio stops logging after log rotation

5 Posts
3 Users
1 Reactions
679 Views
(@diito)
Joined: 11 months ago
Posts: 22
Topic starter  

Yet another Carbonio bug:

My /var/log/carbonio.log and /var/log/carbonio-stats.log remain empty after logrotated rotates them.  I see zmconfigdctl restart
is called by logrotated but that does not seem sufficient to restart logging to these two files.  Even "zmcontrol restart" and restarting all carbonio-* services does not resolve the issue.  Only a reboot does, so there is obviously some other service that's not getting restarted that needs to be.


   
Quote
(@cvidal)
Joined: 13 years ago
Posts: 21
 

Check the file /etc/logrotate.d/carbonio, the first 2 blocks should look like follows (probably the "postrotate" section is missing):

/var/log/carbonio.log {
    daily
    missingok
    notifempty
    create 0644 syslog adm
    dateext
    postrotate
      kill -HUP `cat /var/run/syslog*.pid 2> /dev/null` 2> /dev/null || true
      su - zextras -c "/opt/zextras/bin/zmconfigdctl restart" > /dev/null 2>&1 || true
    endscript
    compress
    rotate 30
}

/var/log/carbonio-stats.log {
    daily
    missingok
    notifempty
    create 0644 syslog adm
    dateext
    postrotate
      kill -HUP `cat /var/run/syslog*.pid 2> /dev/null` 2> /dev/null || true
      su - zextras -c "/opt/zextras/bin/zmconfigdctl restart" > /dev/null 2>&1 || true
    endscript
    rotate 0
}

   
ReplyQuote
(@diito)
Joined: 11 months ago
Posts: 22
Topic starter  

@cvidal 

Those are the defaults in that file which I did not change.  Looking at it I just spotted the problem however,  RHEL and derivatives do not use syslog, they use rsyslog.  That line should instead read  "/usr/bin/systemctl -s HUP kill rsyslog.service >/dev/null 2>&1 || true"

Yet again more proof that Carbonio support for RHEL is a complete lie as it's never been properly tested.  I'd log a bug but, oh wait there is no proper place to report bugs so this post won't do anything and future releases this will remain unfixed. 


   
ReplyQuote
(@sigtrap)
Joined: 1 year ago
Posts: 38
 

Posted by: @diito

That line should instead read  "/usr/bin/systemctl -s HUP kill rsyslog.service >/dev/null 2>&1 || true"

Can you help me with a diff? I don't understand what line in what file should be replaced?

Thanks

//Sigtrap

 


   
ReplyQuote
(@diito)
Joined: 11 months ago
Posts: 22
Topic starter  

@sigtrap 

 

8c8
<       kill -HUP `cat /var/run/syslog*.pid 2> /dev/null` 2> /dev/null || true
---
>       /usr/bin/systemctl -s HUP kill rsyslog.service >/dev/null 2>&1 || true
22c22
<       kill -HUP `cat /var/run/syslog*.pid 2> /dev/null` 2> /dev/null || true
---
>       /usr/bin/systemctl -s HUP kill rsyslog.service >/dev/null 2>&1 || true

   
sigtrap reacted
ReplyQuote