Syslog 中的 Ubuntu 20.04.1 tracker-miner 错误

Syslog 中的 Ubuntu 20.04.1 tracker-miner 错误

新安装的 20.04.1 仅运行 pi.hole 和 unifi 控制器软件。它是 Ubuntu 桌面,但我基本上是在无头模式下运行它。

我注意到系统日志中每分钟会出现两次与跟踪器挖掘器相关的错误。我并不关心跟踪器是否运行,尽管我认为我实际上根本没有使用它。但至少我想降低详细程度,这样我就不会看到所有这些错误。

我已经尝试过禁用这些服务,但还没有找到任何有效的方法,包括尝试通过以下方式屏蔽它们: systemctl --user mask tracker-store.service tracker-miner-fs.service tracker-miner-rss.service tracker-extract.service tracker-miner-apps.service tracker-writeback.service

我尝试通过运行来修复 XDG 用户目录位置

xdg-user-dirs-update 然后编辑 user-dirs.dirs 来修改路径名:

XDG_DOWNLOAD_DIR="$HOME/Downloads"XDG_DOWNLOAD_DIR="/home/matt/Downloads"

但这似乎也不起作用。

关于如何在相对较新且干净的 Ubuntu 桌面安装上解决这个问题,您有什么想法吗?

cat /var/log/syslog | grep tracker:
Oct  9 08:28:17 pihole2 systemd[1034]: tracker-store.service: Scheduled restart job, restart counter is at 3.
Oct  9 08:28:17 pihole2 systemd[1034]: tracker-miner-fs.service: Scheduled restart job, restart counter is at 12.
Oct  9 08:28:17 pihole2 tracker-miner-f[1972]: Set scheduler policy to SCHED_IDLE
Oct  9 08:28:17 pihole2 tracker-miner-f[1972]: Setting priority nice level to 19
Oct  9 08:28:17 pihole2 tracker-store[1973]: Cannot initialize database: Could not open sqlite3 database:'/home/pihole/.cache/tracker/meta.db': unable to open database file
Oct  9 08:28:17 pihole2 systemd[1034]: tracker-store.service: Main process exited, code=exited, status=1/FAILURE
Oct  9 08:28:17 pihole2 systemd[1034]: tracker-store.service: Failed with result 'exit-code'.
Oct  9 08:28:17 pihole2 tracker-miner-f[1972]: Unable to get XDG user directory path for special directory &DOCUMENTS. Ignoring this location.
Oct  9 08:28:17 pihole2 tracker-miner-f[1972]: Unable to get XDG user directory path for special directory &MUSIC. Ignoring this location.
Oct  9 08:28:17 pihole2 tracker-miner-f[1972]: Unable to get XDG user directory path for special directory &PICTURES. Ignoring this location.
Oct  9 08:28:17 pihole2 tracker-miner-f[1972]: Unable to get XDG user directory path for special directory &VIDEOS. Ignoring this location.
Oct  9 08:28:17 pihole2 tracker-miner-f[1972]: Unable to get XDG user directory path for special directory &DOWNLOAD. Ignoring this location.
Oct  9 08:28:17 pihole2 tracker-miner-f[1972]: Unable to get XDG user directory path for special directory &DOCUMENTS. Ignoring this location.
Oct  9 08:28:17 pihole2 tracker-miner-f[1972]: Unable to get XDG user directory path for special directory &MUSIC. Ignoring this location.
Oct  9 08:28:17 pihole2 tracker-miner-f[1972]: Unable to get XDG user directory path for special directory &PICTURES. Ignoring this location.
Oct  9 08:28:17 pihole2 tracker-miner-f[1972]: Unable to get XDG user directory path for special directory &VIDEOS. Ignoring this location.
Oct  9 08:28:17 pihole2 dbus-daemon[1045]: [session uid=998 pid=1045] Activating via systemd: service name='org.freedesktop.Tracker1' unit='tracker-store.service' requested by ':1.49' (uid=998 pid=1972 comm="/usr/libexec/tracker-miner-fs " label="unconfined")
Oct  9 08:28:17 pihole2 systemd[1034]: tracker-store.service: Scheduled restart job, restart counter is at 4.
Oct  9 08:28:17 pihole2 tracker-store[1982]: Cannot initialize database: Could not open sqlite3 database:'/home/pihole/.cache/tracker/meta.db': unable to open database file
Oct  9 08:28:17 pihole2 systemd[1034]: tracker-store.service: Main process exited, code=exited, status=1/FAILURE
Oct  9 08:28:17 pihole2 systemd[1034]: tracker-store.service: Failed with result 'exit-code'.
Oct  9 08:28:17 pihole2 tracker-miner-f[1972]: Couldn't create new Files miner: 'Failed to load SPARQL backend: GDBus.Error:org.freedesktop.DBus.Error.NoReply: Message recipient disconnected from message bus without replying'
Oct  9 08:28:17 pihole2 systemd[1034]: tracker-miner-fs.service: Main process exited, code=exited, status=1/FAILURE
Oct  9 08:28:17 pihole2 systemd[1034]: tracker-miner-fs.service: Failed with result 'exit-code'.

答案1

我也是同样的情况。

我认为主要问题是 /home/pihole 目录不存在,并且由于 pihole 默认 shell 是“nologin”,因此您无法为用户执行 sudo 并屏蔽服务。

以下是我为 pihole 用户屏蔽跟踪器服务所遵循的步骤

  1. 创建 pihole 的主目录并赋予 pihole 一个 shell。 sudo mkdir /home/pihole sudo usermod -s /bin/bash pihole

  2. 进入 pihole shell

    sudo -i -u pihole

  3. 初始化 XDG_RUNTIME_DIR 变量以运行 systemctl(systemctl 无法连接到总线-docker ubuntu:16.04 容器 export XDG_RUNTIME_DIR=/run/user/$(id -u) 在我的情况下,用户 ID 是 999(我认为这是 pihole 默认用户 ID)

  4. 为 pihole 用户提供口罩追踪服务。 systemctl --user mask tracker-store.service tracker-miner-fs.service tracker-miner-rss.service tracker-extract.service tracker-miner-apps.service tracker-writeback.service

  5. 恢复 pihole 的 nologin 并删除 pihole 主目录(可选) sudo usermod -s /usr/sbin/nologin pihole sudo rm -rf /home/pihole

  6. 重启

答案2

遇到了同样的问题。还在 systemd 日志中看到了有关 pihole 用户文件夹和 pulseaudio 的更多错误。

解决:

  1. sudo mkhomedir_helper pihole
  2. 重启

使用以下方式检查 systemd 日志:

journalctl -b -p err

Systemd 日志现在没有显示与 pihole 相关的错误。

答案3

sudo mkhomedir_helper pihole

.trackerignore这有帮助,但是直到我在中创建了一个(空)文件后它才停止失败/home/pihole

前面两个答案对解决这个问题都有帮助。

相关内容