Files
2026-10-14 08:32:17 +09:00

26 lines
1.3 KiB
Markdown

---
type: report
date: 2026-10-14
---
# logrotate failed every day: NVIDIA's jetson-logging
`logrotate.service` failed on every run (`error: stat of /data/logging-volume/*.log failed: Permission
denied`), leaving a permanent entry in `systemctl --failed`.
**Cause.** `/etc/logrotate.d/jetson-logging` (package `nvidia-jetson-services`) has two stanzas for
`/data/logging-volume/*.log`. The first rotates as user `logging` (`su logging logusers`), but `/data` is
`drwx------ root`, so that user cannot reach the directory. The second is the package's copy for setups where
that user does not exist: same files, rotated as root. With both present, logrotate also reports a duplicate
entry. The directory is empty: nothing on this host writes there.
**Fix (2026-10-14).** The first stanza is removed; the root stanza and the Docker one stay. A comment at the top
of the file says so. Original kept at `~/infra/logrotate/jetson-logging.orig`.
```bash
sudo logrotate -d /etc/logrotate.conf # dry run: no error for jetson-logging
sudo systemctl start logrotate.service # "Finished Rotate log files."
```
The file is a dpkg conffile: an upgrade of `nvidia-jetson-services` that changes it asks whether to keep the
local version. Keep it (or re-apply: drop the `su logging logusers` stanza).