Dnf5 automatic "No network connection detected"

Is anyone else is experiencing “No network connection detected” messages with dnf5 automatic on Fedora 44?

[fedora@server ~]$ sudo dnf5 automatic

[fedora@server ~]$ grep connection /var/log/dnf5.log
2026-10-23T10:50:52+0000 [12867] DEBUG Waiting for internet connection...
2026-10-23T10:51:52+0000 [12867] WARNING No network connection detected.

[fedora@server ~]$ ping -c 3 google.com
PING google.com (2a00:1450:4009:c19::71) 56 data bytes
64 bytes from yulhrp-in-f113.1e100.net (2a00:1450:4009:c19::71): icmp_seq=1 ttl=111 time=2.34 ms
64 bytes from yulhrp-in-f113.1e100.net (2a00:1450:4009:c19::71): icmp_seq=2 ttl=111 time=2.33 ms
64 bytes from yulhrp-in-f113.1e100.net (2a00:1450:4009:c19::71): icmp_seq=3 ttl=111 time=2.32 ms

--- google.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 2.324/2.331/2.340/0.006 ms

Your ping does not always reveal the proper results to match your question.

In general, if there is failure to connect to one mirror then dnf will attempt another mirror (after a timeout) until either all mirrors have failed connection or the download has completed.

Does the update fail totally? or is this simply one noted connection failure instance in the log?

The timeout is 60 seconds and can be configured from /etc/dnf/automatic.conf
Try setting it to a higher value like 120 if it dosent fix then set it to 0,it will skip the network availability test.

Try

sudo dnf5 makecache --refresh

if this suceedes then repo access works, so there could be a problem with automatic command network check fails

120 seconds timeout has not helped:

2026-10-23T14:58:33+0000 [15338] DEBUG Waiting for internet connection...
2026-10-23T15:00:33+0000 [15338] WARNING No network connection detected.

dnf5 makecache is working fine:

[fedora@server ~]$ sudo dnf5 makecache --refresh
Updating and loading repositories:
 Fedora 44 - aarch64 - Updates                                                                                                                                           100% |  35.0 KiB/s |  12.9 KiB |  00m00s
 Fedora 44 openh264 (From Cisco) - aarch64                                                                                                                               100% |   2.6 KiB/s | 987.0   B |  00m00s
 Fedora 44 - aarch64                                                                                                                                                     100% |  44.0 KiB/s |  16.3 KiB |  00m00s
Repositories loaded.
Metadata cache created.

What is dnf5 automatic doing to determine I have “no network connection” so that I may simulate it?

My ping was merely to prove I have network connectivity when I am told I do not.

If I knew what the actual network test is doing inside the code I am willing to test it manually.

run the dnf5 command under strace. It’ll tell you exactly what it’s doing under the covers.

Does a straight dnf command exhibit the same issue?

No.

[fedora@server ~]$ sudo dnf update
Updating and loading repositories:
Repositories loaded.
Nothing to do.

That’s a lot of data I don’t fully understand.

I did spot this though:

connect(4, {sa_family=AF_UNIX, sun_path="/run/systemd/resolve/io.systemd.Resolve"}, 42) = -1 ENOENT (No such file or directory)

I don’t have systemd-resolved enabled, if that’s relevant.

Also this:

connect(4, {sa_family=AF_INET6, sin6_port=htons(443), sin6_flowinfo=htonl(0), inet_pton(AF_INET6, "2600:1f18:568d:1784:11d9:5f7d:2ffd:94d7", &sin6_addr), sin6_scope_id=0}, 28) = -1 EAFNOSUPPORT (Address family not supported by protocol)

Tried enabling ip4 or checking if dnf5 supports ipv6?

Why are you using dnf5 in the first place? Testing?

That is not a problem.
It will just continue with regular dns query for looking up the remote host name.

If ipv6 doesn’t work it would continue with ipv4.

dnf definetely support ipv6 if the computer network and the isp supports it. IPv6 can be disabled in /etc/dnf/dnf.conf

ip_resolve=4

dnf5 is the default and has been for quite a while. When running dnf you are actually running dnf5.

I know - I was wondering why the OP was specifically calling dnf5 with automatic when dnf is calling the same binary and apparently works without issues.

automatic seems to be an optional, additional extension which the OP has apparently installed specifically as it’s not installed on my F44 installation out of the box).

It doesn’t, dnf automatic fails too.

What’s the purpose of the automatic option (I’ve not got it installed, so I don’t what issue it’s supposed to solve).

I got this in /var/log/dnf5.log

...
2026-10-23T15:57:31+0000 [11205] DEBUG Creating repo "rpmfusion-nonfree-source" from config file "/etc/yum.repos.d/rpmfusion-nonfree.repo" section "rpmfusion-nonfree-source"
2026-10-23T15:57:31+0000 [11205] DEBUG Waiting for internet connection...
2026-10-23T15:58:31+0000 [11205] WARNING No network connection detected.
2026-10-23T15:58:31+0000 [11205] INFO [librepo] Librepo version: 1.21.2 with CURL_GLOBAL_ACK_EINTR support (libcurl/8.18.0 OpenSSL/3.5.9 zlib/1.3.1.zlib-ng libidn2/2.3.8 nghttp2/1.68.0 mit-krb5/1.22.2)
2026-10-23T15:58:31+0000 [11205] DEBUG Loading system repo rpmdb from root "/"
...

but the process just continues.

By the way

This comes from the process creating an IPv4 socket and tries to connect with an IPv6 address. That won’t work, naturally. It looks like some strange programming, but other than that, it is harmless.

After decades of working with Unix and Linux, I make it a habit to use versions when available so when looking at old Makefiles, scripts, and logs I know what was actually used.

Does it use live or cached package data after that?

I don’t know.