Fixing pkgfile-update.service failure

Since the beginning of January (following a fresh install from a minimal KDE image to a new build PC) I have been getting errors related to pkgfile-update.service. Looking at journalctl -u pkgfile-update the errors were:

Feb 16 08:48:10 manjaro-desktop systemd[1]: Starting pkgfile database update...
Feb 16 08:48:10 manjaro-desktop pkgfile[877]: warning: download failed: http://manjaro.mirrors.uk2.net/testing/core/x86_>
Feb 16 08:48:10 manjaro-desktop pkgfile[877]: warning: download failed: http://manjaro.mirrors.uk2.net/testing/extra/x86>
Feb 16 08:48:10 manjaro-desktop pkgfile[877]: warning: download failed: http://manjaro.mirrors.uk2.net/testing/community>
Feb 16 08:48:10 manjaro-desktop pkgfile[877]: warning: download failed: http://manjaro.mirrors.uk2.net/testing/multilib/>
Feb 16 08:48:10 manjaro-desktop systemd[1]: pkgfile-update.service: Main process exited, code=exited, status=1/FAILURE
Feb 16 08:48:10 manjaro-desktop systemd[1]: pkgfile-update.service: Failed with result 'exit-code'.
Feb 16 08:48:10 manjaro-desktop systemd[1]: Failed to start pkgfile database update.

I was, however, able to run the service manually and it would alway complete succesfully. I therefore thought the issue was due to my WIFI not being up at the the service was triggered by the timer, but looking at the service both After=network-online.target and Wants=network-online.target were present.

I managed to workaround this by adding RandomizedDelaySec=600 to the [Timer] section of the timer unit. I don’t know if this was the appropriate workaround or if anyone has a better idea?

Edited to add: I also tried switching mirrors and it made no difference.

Try updating your pacman mirrors. Please refer to the wiki:

https://wiki.manjaro.org/index.php/Pacman-mirrors

I did, I tried switching to global, to NL and back to UK. The only thing that fixed it was delaying the timer from running, so I’m pretty convinced it’s due to the network not being available. I don’t know why the After=network-online.target and Wants=network-online.target don’t prevent the service running before the network is up.

Just adding this in case it helps anyone else.

Adding RandomizedDelaySec=600 to the [Timer] section of the timer unit didn’t work and I continued to get the same errors.

However, since adding nss-lookup.target to the After=network-online.target line in pkgfile-update.service it now completes without error.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.