I’ve installed dnf-automatic and have things configured. It looks like when dnf-automatic is triggered, it attempts to install but ultimately fails. If I manually enter dnf-automatic or dnf uprade, updates proceed with out issue.
How could I resolve this? It seems so difficult just to get Fedora to automatically check for & install updates.
Thanks for any help/suggestions.
dnf-automatic-install.service - dnf automatic install updates
Loaded: loaded (/usr/lib/systemd/system/dnf-automatic-install.service; static; vendor preset: disabled)
Active: failed (Result: exit-code) since Fri 2020-01-10 07:44:55 EST; 15h ago
Process: 18538 ExecStart=/usr/bin/dnf-automatic /etc/dnf/automatic.conf --timer --installupdates (code=exited, status=1/FAILURE)
Main PID: 18538 (code=exited, status=1/FAILURE)
CPU: 263ms
Jan 10 07:44:55 localhost.localdomain dnf-automatic[18538]: Error: Failed to download metadata for repo 'etcher-rpm': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
Jan 10 07:44:55 localhost.localdomain dnf-automatic[18538]: Errors during downloading metadata for repository 'fedora-cisco-openh264':
Jan 10 07:44:55 localhost.localdomain dnf-automatic[18538]: - Curl error (6): Couldn't resolve host name for https://codecs.fedoraproject.org/openh264/31/x86_64/repodata/repomd.xml [Could not resolve host: codecs.fedorapr>
Jan 10 07:44:55 localhost.localdomain dnf-automatic[18538]: Error: Failed to download metadata for repo 'fedora-cisco-openh264': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
Jan 10 07:44:55 localhost.localdomain dnf-automatic[18538]: Errors during downloading metadata for repository 'fedora-modular':
Jan 10 07:44:55 localhost.localdomain dnf-automatic[18538]: - Curl error (6): Couldn't resolve host name for https://mirrors.fedoraproject.org/metalink?repo=fedora-modular-31&arch=x86_64 [Could not resolve host: mirrors.f>
Jan 10 07:44:55 localhost.localdomain dnf-automatic[18538]: Error: Failed to download metadata for repo 'fedora-modular': Cannot prepare internal mirrorlist: Curl error (6): Couldn't resolve host name for https://mirrors.fe>
Jan 10 07:44:55 localhost.localdomain systemd[1]: dnf-automatic-install.service: Main process exited, code=exited, status=1/FAILURE
Jan 10 07:44:55 localhost.localdomain systemd[1]: dnf-automatic-install.service: Failed with result 'exit-code'.
Jan 10 07:44:55 localhost.localdomain systemd[1]: Failed to start dnf automatic install updates.
● dnf-automatic-install.timer - dnf-automatic-install timer
Loaded: loaded (/etc/systemd/system/dnf-automatic-install.timer; enabled; vendor preset: disabled)
Active: active (waiting) since Thu 2020-01-09 18:37:23 EST; 1 day 4h ago
Trigger: Sat 2020-01-11 06:31:06 EST; 7h left
Jan 09 18:37:23 localhost.localdomain systemd[1]: Started dnf-automatic-install timer
I should add that my computer is often in sleep mode and I check the status of dnf-automatic after I wake the computer. Could this be the problem? I’ve read online that adding the following lines to (/usr/lib/systemd/system/dnf-automatic-install.service) might resolve this issue:
Thanks, I didn’t realize adding a photo was so straight forward.
I did reading the link you referenced. Though, unless I am over-looking something, I don’t see a ‘fix’ for my issue. I’m beginning to think it’s happening because I often put my computer to sleep. I’m hoping I could resolve the issue while still continuing to put my computer to sleep.
I don’t really mind that my desktop is checking for updates at 6am. As I understand it, with the way dnf-automatic is configured, it will run when the computer is next ‘awake’/available. And that actually does happen, it does run when the computer is next awake/available after 6:00am. It just fails and exits out when attempting to download from 'updates-modulrar) So I am hoping I could get this configured to run/install when my computer is next awake/available after the 6:00 scheduled time to run
Even after adding the following lines to my (/usr/lib/systemd/system/dnf-automatic-install.service) file, dnf-automatic still failed to install updates. Of course, 'dnf-automatic and ‘dnf upgrade’ work just fine if i manually enter them in a terminal window.
Thank you, I was making both of these changes in the same file. I’ll make the appropriate change in the .timer file and the restart statement i’ll add to the service file even if it is redundant.
I looked at the arch wiki you linked to and some other pages that explain the difference between wants and requires. I’ll give this a try, thank you for the tip!
However, I began to think if there was away I could cause the service to sleep for a few seconds before running. Just curious, does this look ok, if I add (ExecStartPre=/bin/sleep) to the [Service] portion of the service file:
Did your tested, if it is works before configurations, as is? Isn’t it is logical for “dnf-automatic” to work “as is”, with some defaults being set for the users.
I appreciate all the suggestions I received from you and tjdoyle in this thread.
Luckily adding the ’ ExecStartPre=/bin/sleep 30’ line in the service file resolved my issue.
Today was the first day dnf-automatic ran/completed successfully.