[opensuse] logrotate redis issue
I've just noticed that logrotate has a problem with redis on my machine. # journalctl -u logrotate -- Logs begin at Fri 2020-07-03 18:45:01 BST, end at Sun 2020-09-27 16:01:02 BST. -- Jul 16 00:08:13 acer-suse systemd[1]: Starting Rotate log files... Jul 16 00:08:16 acer-suse systemd[1]: Started Rotate log files. Jul 17 00:00:00 acer-suse systemd[1]: Starting Rotate log files... Jul 17 00:00:00 acer-suse systemd[1]: Started Rotate log files. Jul 18 00:00:03 acer-suse systemd[1]: Starting Rotate log files... Jul 18 00:00:03 acer-suse systemd[1]: Started Rotate log files. Jul 19 00:00:09 acer-suse systemd[1]: Starting Rotate log files... Jul 19 00:00:09 acer-suse logrotate[23820]: error: error setting owner of /var/log/redis/default.log-20200719 to uid 460 and gid 0: Operation not permitted Jul 19 00:00:09 acer-suse systemd[1]: logrotate.service: Main process exited, code=exited, status=1/FAILURE Jul 19 00:00:09 acer-suse systemd[1]: Failed to start Rotate log files. Jul 19 00:00:09 acer-suse systemd[1]: logrotate.service: Unit entered failed state. Jul 19 00:00:09 acer-suse systemd[1]: logrotate.service: Failed with result 'exit-code'. Jul 20 00:00:00 acer-suse systemd[1]: Starting Rotate log files... Jul 20 00:00:01 acer-suse systemd[1]: Started Rotate log files. When I look at /var/log/redis: # ls -l /var/log/redis/ total 176 -rw-r--r-- 1 redis root 136161 Mar 17 2019 default.log -rw------- 1 redis redis 32 Jul 19 00:00 default.log-20200719.xz -rw------- 1 redis redis 32 Jul 26 00:00 default.log-20200726.xz -rw------- 1 redis redis 32 Aug 2 00:00 default.log-20200802.xz -rw------- 1 redis redis 32 Aug 9 00:00 default.log-20200809.xz -rw------- 1 redis redis 32 Aug 16 00:00 default.log-20200816.xz -rw------- 1 redis redis 32 Aug 23 00:00 default.log-20200823.xz -rw------- 1 redis redis 32 Aug 30 00:00 default.log-20200830.xz -rw------- 1 redis redis 32 Sep 6 00:00 default.log-20200906.xz -rw------- 1 redis redis 32 Sep 13 00:00 default.log-20200913.xz -rw------- 1 redis redis 32 Sep 20 00:00 default.log-20200920.xz -rw------- 1 redis redis 0 Sep 27 00:00 default.log-20200927 and in /etc/logrotate.d/redis $ less /etc/logrotate.d/redis /var/log/redis/*.log { weekly rotate 10 copytruncate delaycompress compress notifempty missingok su redis redis } I don't understand why logrotate is trying to set the files to a gid of 0? Nor why it's failing for that matter. Does anybody understand what's going on? Thanks, Dave -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 27/09/2020 18.01, Dave Howorth wrote:
I've just noticed that logrotate has a problem with redis on my machine.
# journalctl -u logrotate -- Logs begin at Fri 2020-07-03 18:45:01 BST, end at Sun 2020-09-27 16:01:02 BST. -- Jul 16 00:08:13 acer-suse systemd[1]: Starting Rotate log files... Jul 16 00:08:16 acer-suse systemd[1]: Started Rotate log files. Jul 17 00:00:00 acer-suse systemd[1]: Starting Rotate log files... Jul 17 00:00:00 acer-suse systemd[1]: Started Rotate log files. Jul 18 00:00:03 acer-suse systemd[1]: Starting Rotate log files... Jul 18 00:00:03 acer-suse systemd[1]: Started Rotate log files. Jul 19 00:00:09 acer-suse systemd[1]: Starting Rotate log files... Jul 19 00:00:09 acer-suse logrotate[23820]: error: error setting owner of /var/log/redis/default.log-20200719 to uid 460 and gid 0: Operation not permitted Jul 19 00:00:09 acer-suse systemd[1]: logrotate.service: Main process exited, code=exited, status=1/FAILURE Jul 19 00:00:09 acer-suse systemd[1]: Failed to start Rotate log files. Jul 19 00:00:09 acer-suse systemd[1]: logrotate.service: Unit entered failed state. Jul 19 00:00:09 acer-suse systemd[1]: logrotate.service: Failed with result 'exit-code'. Jul 20 00:00:00 acer-suse systemd[1]: Starting Rotate log files... Jul 20 00:00:01 acer-suse systemd[1]: Started Rotate log files.
When I look at /var/log/redis:
# ls -l /var/log/redis/ total 176 -rw-r--r-- 1 redis root 136161 Mar 17 2019 default.log
Notice that this one has the owner and gid it complains about. Not the rest, though.
-rw------- 1 redis redis 32 Jul 19 00:00 default.log-20200719.xz
And these are basically empty. Something is going on. -- Cheers / Saludos, Carlos E. R. (from 15.1 x86_64 at Telcontar)
participants (2)
-
Carlos E. R.
-
Dave Howorth