My logrotate seems to run properly, but every few months I get messages like this;
etc/cron.daily/logrotate:
error: failed to rename /var/log/roundcubemail/errors.log-20181216-20181217-20181218-20181219-20181220-20181221-20181222-20181223-20181224-20181225-20181226-20181227-20181228-20181229-20181230-20181231-20190101-20190102-20190103-20190104-20190105-20190106-20190107-20190108-20190109-20190110-20190111 to /var/log/roundcubemail/errors.log-20181216-20181217-20181218-20181219-20181220-20181221-20181222-20181223-20181224-20181225-20181226-20181227-20181228-20181229-20181230-20181231-20190101-20190102-20190103-20190104-20190105-20190106-20190107-20190108-20190109-20190110-20190111-20190112: File name too long
I usually just delete the file, the server seems fine otherwise. The logrotate errors seem to involve roundcube, letsencrypt, and openvpn log files
Looking at the logrotate scripts doesn’t offer any clues, they are stock yum installs.
I seem to remember that the same issue appeared in the freepbx package on SME Server and that was fixed. The note of the fix should be in the changelog. I believe it had something to do with the rotate config.
It’s happening because the wildcard specification for the logrotate for those products matches the logs already rotated as well as the ones needing to be.
This was fixed some time ago for OpenVPN (I thought), unless I’m still running my patched version:
It seems that I cannot reproduce but we have also something probably tied, ok the key is fail2ban but because the log file of roundcubemail doesn’t exist
That isn’t what I have;
cat /etc/logrotate.d/roundcubemail
/var/log/roundcubemail/* {
missingok
su root apache
notifempty
size 50k
nocreate
}
It looks like I have the losing hand here.
yum whatprovides /etc/logrotate.d/roundcubemail
Loaded plugins: changelog, etckeeper, fastestmirror, nethserver_events
Loading mirror speeds from cached hostfile
I can not understand why the correct log file is missing. I had a strong intuition that fail2ban would go wrong because of a path or missing file. Moreover the strangeness and that gave error only to the manual restart of the service because during the start of the server the service is apparently active with the tick of enable.
we do not provide the roundcubemail rpm, it comes from upstream, I suppose it has been modified on you server, but it is good on others. I would suggest that you modify accordingly your logrotate.d/roundcubemail file
I killed logrotate (kill PID), changed the wildcard in /etc/logrotate.d/letsencrypt to /var/log/letsencrypt/*.log and removed the files in /var/log/letsencrypt. After that logrotate runs normally again.
There is no logorate config in nethserver because certbot takes care of its own log rotation.
In fact I have no entry about letsencrypt inside /var/lib/logrotate/logrotate.status file.
Hello, I made the change suggested by Giacomo, now resuming to work regularly. I simulated a password error twice and the banned is working. At the moment I leave in test, however I believe that everything worked. Thank you all !!
I too have reinstalled RoundCube, and it seems to have updated my logrotate script to match on *.log,
I’m curious why I didn’t get a .rpmnew file, I have a cron job that looks for those and e-mails a diff once a week. Never a peep on this one.
Thank you all!