Fedora 34 - x86_64 Errors during downloading metadata for repository 'fedora'

Dear expert,

I installed Fedora 32 in VirtualBox (6.1.26) at Windows 7, and performed some step-by-step updates to Fedora 34:

sudo dnf --refresh upgrade
sudo dnf install dnf-plugin-system-upgrade
sudo dnf system-upgrade download --releasever=34
sudo dnf system-upgrade reboot

and then,

sudo dnf system-upgrade clean
sudo dnf clean packages
sudo systemctl restart systemd-resolved.service
[XXX@localhost ~]$ sudo dnf makecache --refresh -v
[sudo] password for XXX: 
Loaded plugins: builddep, changelog, config-manager, copr, debug, debuginfo-install, download, generate_completion_cache, groups-manager, needs-restarting, playground, repoclosure, repodiff, repograph, repomanage, reposync, system-upgrade
DNF version: 4.8.0
cachedir: /var/cache/dnf
Making cache files for all metadata files.
fedora: has expired and will be refreshed.
fedora-cisco-openh264: has expired and will be refreshed.
fedora-modular: has expired and will be refreshed.
updates: has expired and will be refreshed.
updates-modular: has expired and will be refreshed.
repo: downloading from remote: fedora
error: Curl error (28): Timeout was reached for ... [Resolving timed out after 30001 milliseconds] 
...
error: Curl error (28): Timeout was reached for ... [Resolving timed out after 30000 milliseconds] ...
error: Curl error (28): Timeout was reached for ... [Resolving timed out after 30000 milliseconds] ...
error: Curl error (28): Timeout was reached for ... [Resolving timed out after 30000 milliseconds] ...
Fedora 34 - x86_64                                                                                                                                            0.0  B/s |   0  B     08:55    
Errors during downloading metadata for repository 'fedora':
  - Curl error (28): Timeout was reached for ... [Resolving timed out after 30000 milliseconds]
  - Curl error (28): Timeout was reached for ... [Resolving timed out after 30001 milliseconds]
Error: Failed to download metadata for repo 'fedora': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
[XXX@localhost ~]$

Before I changed to mirror.crucial.com.au I did try the default mirror, but dnf failed to install/update packages as well.

I did try direct Fedora 34 installation in VirtualBox, but after installation, the Fedora 34 system could not connect to internet, and further update/installation of packages is hindered. This was why I started from installing Fedora 32 which has no problem to connect to mirror sites.

I did try to ping google.com, and the system took about 2 minutes to get connected.

I noticed that someone had posted the issue for Fedora 31 at

and I referred to the suggested solution. However, those solutions are not applicable to me.

Your solutions/suggestions are very… very appreciated.
Thanks…

This sounds like a DNS error, or issue with your virtual network adapter or general network issue. Is your Fedora guest otherwise “online”? You can surf the web and lookup domains (nslookup google.com)

re DNS, look at: https://discussion.fedoraproject.org/t/dns-resolution-broken/67067/2 and https://discussion.fedoraproject.org/t/resolvectl-connection-timed-out-but-google-chrome-working-fine/77684

You said the ping took long, can you ping from your host OS?

That host OS is outdated, maybe Virtualbox does not support it anymore, you should upgrade to Win10 (0$).

1 Like

Is your Fedora guest otherwise “online”?

Yes. The newly upgraded Fedora 34 (guest) from Fedora 32 (guest) can still connect to internet via the VirtualBox (Windows 7; host). I have used Firefox to check gmail and yahoo, and the connection was slightly slow.

You said the ping took long, can you ping from your host OS?

Yes, I can still ping google from my Windows 7 (host).

That host OS is outdated, maybe Virtualbox does not support it anymore, you should upgrade to Win10 (0$).

I run Fedora 30 (guest) using the same VirtualBox (Windows 7; host) at the same time. There is no problem for this Fedora 30 to get online.

I suppose/hope this is not due to Windows 7.

You can surf the web and lookup domains ( nslookup google.com )

The response of nslookup is negative:

[XXX@localhost ~]$ nslookup google.com
Server:		127.0.0.53
Address:	127.0.0.53#53

Non-authoritative answer:
Name:	google.com
Address: 172.217.31.78
;; connection timed out; no servers could be reached


[XXX@localhost ~]$

There is no problem for pinging google.

[XXX@localhost ~]$ ping google.com
PING google.com (216.58.203.78) 56(84) bytes of data.
64 bytes from kul09s03-in-f14.1e100.net (216.58.203.78): icmp_seq=1 ttl=111 time=10.6 ms
64 bytes from kul09s03-in-f14.1e100.net (216.58.203.78): icmp_seq=2 ttl=111 time=9.40 ms
...
...
64 bytes from kul09s03-in-f14.1e100.net (216.58.203.78): icmp_seq=12 ttl=111 time=7.62 ms
64 bytes from kul09s03-in-f14.1e100.net (216.58.203.78): icmp_seq=13 ttl=111 time=11.1 ms
^C
--- google.com ping statistics ---
13 packets transmitted, 13 received, 0% packet loss, time 12020ms
rtt min/avg/max/mdev = 7.618/8.951/11.058/1.193 ms
[XXX@localhost ~]$ 

For the below suggestions,

re DNS, look at: DNS resolution broken - #2 by vgaetera and Resolvectl connection timed out but google chrome working fine

I tried this command:
sudo nmcli connection show

There is no output message. Shall I proceed to

sudo nmcli connection modify id CON_NAME \
    ipv4.ignore-auto-dns yes \
    ipv6.ignore-auto-dns yes \
    ipv4.dns 8.8.8.8,8.8.4.4
sudo nmcli connection up id CON_NAME

If the suggestion is not successful, may I know how to restore to the previous configuration?

Your suggestions and help are very appreciated.

You need an output like this:

NAME    UUID                                  TYPE      DEVICE 
Lan02   24773e86-c5f4-4b91-923a-b4ae440e3606  ethernet  enp6s0

You will need NAME to substitute it with CON_NAME

In my case it would be:

sudo nmcli connection modify id Lan02 \
    ipv4.ignore-auto-dns yes \
    ipv6.ignore-auto-dns yes \
    ipv4.dns 8.8.8.8,8.8.4.4
sudo nmcli connection up id Lan02

Thanks for your suggestion and reply.

The Fedora 34 was installed in VirtualBox, see the initial description above.

A few hours ago, I tried :
sudo nmcli connection show
but there is no output message. I did not know the exact reason.

I tried again just now, it showed

[XXX@localhost ~]$ sudo nmcli connection show 
[sudo] password for XXX: 
NAME                UUID                                  TYPE      DEVICE 
Wired connection 1  4bb4eb29-6349-3b3a-ba9f-64f392cfda64  ethernet  enp0s3 
virbr0              56daa724-6f8e-4d53-849f-a629e8752bad  bridge    virbr0 
[XXX@localhost ~]$

I suppose the output message showing a list of names at the NAME column, and I can use one of them as the CON_NAME. These names are “Wired connection 1” and “virbr0”. I think “Wired connection 1” should be the one, but not “virbr0”, and I have changed its name to “Wired_connection_1”.

After applying the commands to set the configuration of Wired_connection_1:

sudo nmcli connection modify id Wired_connection_1
ipv4.ignore-auto-dns yes \
    ipv6.ignore-auto-dns yes \
    ipv4.dns 8.8.8.8,8.8.4.4
sudo nmcli connection up id Wired_connection_1

the test of nslookup is, however, still negative,

[XXX@localhost ~]$ nslookup google.com 
Server:		127.0.0.53
Address:	127.0.0.53#53

Non-authoritative answer:
Name:	google.com
Address: 142.250.199.14
;; connection timed out; no servers could be reached


[XXX@localhost ~]$

I found that the /etc/resolv.conf in Fedora 34 (upgraded from Fedora 32) is different from the one in the Fedora 32 (before upgrading):

[Fedora 34: /etc/resolv.conf]
...
...
...
nameserver 127.0.0.53
options edns0 trust-ad
search .
[Fedora 32: /etc/resolv.conf]
# Generated by NetworkManager
nameserver 192.168.1.254
nameserver 192.168.68.1

The comments in the /etc/resolv.conf of Fedora 34 propose not to edit it. I am not sure whether adding some “nameserver” at some other config files may be helpful.

Your suggestions and help are very appreciated.
Thanks !

I just found a solution at this webpage,
https://www.fosslinux.com/46272/things-to-do-after-installing-fedora-workstation.htm
which is not related to suggestion above. The solution is to set a hostname using the following command:

sudo hostnamectl set-hostname My-Hostname # replace 'My-Hostname' with your own hostname

After setting the hostname, I restarted Fedora 34.
Now, “nslookup google.com” produces some positive output,

[XXX@My-Fedora34 ~]$ nslookup google.com  
Server:		127.0.0.53
Address:	127.0.0.53#53

Non-authoritative answer:
Name:	google.com
Address: 216.58.221.206
Name:	google.com
Address: 2404:6800:4001:80e::200e

[XXX@My-Fedora34 ~]$

Meanwhile, I can install/update some packages via “sudo dnf install”, for example,

[XXX@My-Fedora34 ~]$ sudo dnf install -y p7zip-plugins p7zip 
[sudo] password for XXX: 
Fedora 34 - x86_64                                                                                                                           4.0 MB/s |  74 MB     00:18    
Fedora 34 openh264 (From Cisco) - x86_64                                                                                                      38  B/s | 2.5 kB     01:06    
Fedora Modular 34 - x86_64                                                                                                                   407 kB/s | 4.9 MB     00:12    
Fedora 34 - x86_64 - Updates                                                                                                                 776 kB/s |  22 MB     00:28    
Fedora Modular 34 - x86_64 - Updates                                                                                                         1.5 MB/s | 4.6 MB     00:03    
RPM Fusion for Fedora 34 - Free                                                                                                              105 kB/s | 941 kB     00:08    
RPM Fusion for Fedora 34 - Free - Updates                                                                                                     68 kB/s | 334 kB     00:04    
Sublime Text - x86_64 - Stable                                                                                                               1.9 kB/s | 2.9 kB     00:01    
Dependencies resolved.
=============================================================================================================================================================================
 Package                                     Architecture                         Version                                        Repository                             Size
=============================================================================================================================================================================
Installing:
 p7zip                                       x86_64                               16.02-20.fc34                                  updates                               645 k
 p7zip-plugins                               x86_64                               16.02-20.fc34                                  updates                               1.0 M
Transaction Summary
=============================================================================================================================================================================
Install  2 Packages
Total download size: 1.6 M
Installed size: 4.2 M
Downloading Packages:
(1/2): p7zip-16.02-20.fc34.x86_64.rpm                                                                                                        131 kB/s | 645 kB     00:04    
(2/2): p7zip-plugins-16.02-20.fc34.x86_64.rpm                                                                                                 96 kB/s | 1.0 MB     00:10    
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                        148 kB/s | 1.6 MB     00:11     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                                     1/1 
  Installing       : p7zip-plugins-16.02-20.fc34.x86_64                                                                                                                  1/2 
  Installing       : p7zip-16.02-20.fc34.x86_64                                                                                                                          2/2 
  Running scriptlet: p7zip-16.02-20.fc34.x86_64                                                                                                                          2/2 
  Verifying        : p7zip-16.02-20.fc34.x86_64                                                                                                                          1/2 
  Verifying        : p7zip-plugins-16.02-20.fc34.x86_64                                                                                                                  2/2 
Installed:
  p7zip-16.02-20.fc34.x86_64                                                        p7zip-plugins-16.02-20.fc34.x86_64                                                       
Complete!
[XXX@My-Fedora34 ~]$

Thanks for your help !!!
Hopefully, this post also helps others.