0

我正在尝试在 redis 映像中实现日志轮换(以非 root 用户身份运行)。

我已将 redis_logrotate 文件放在 /etc/logrotate.d/ 文件夹中。以下是 redis_logrotate 文件的内容:

/persistent/redis/logs/*.log {
create 0644 1001
daily
rotate 15
compress
size 10K
dateext
dateformat -%Y%m%d
missingok
}

已尝试使用以下命令调试运行以检查其工作原理-

logrotate -d -v /etc/logrotate.d/redis_logrotate

得到以下错误,味精:

Error: Error: Logrotate UID is not in passwd file.
Reading state from file: /var/lib/logrotate/status
Allocating hash table for state file, size 64 emtries

Handling 0 logs

我正在使用 logrotate 版本:3.14.0 操作系统版本:Debian GNU/Linux 10 (buster)

没有得到这个错误 - “logrotate UID不在passwd文件中的意思”?还有它为什么会出现以及如何解决这个问题?

有关更多信息,类似的讨论也在继续 - https://github.com/bitnami/charts/issues/5859

请让我知道,如果有人对这个问题有想法吗?

4

0 回答 0