Rpm-ostree upgrade and proxy server: Timeout was reached

With every rpm-ostree upgrade, an update is initially loaded, but the following error message occurs in the further step:

[user@pc ~]$ rpm-ostree upgrade
⠁ Receiving objects; 99% (180/181) 8,7 MB/s 104,9 MB 96 metadata, 85 content objects fetched; 107949 KiB transferred in 13 seconds; 155,0 MB content written
Receiving objects; 99% (180/181) 8,7 MB/s 104,9 MB… done
Checking out tree 0d70991… done
Enabled rpm-md repositories: fedora-cisco-openh264 fedora-modular updates-modular updates fedora updates-archive
Updating metadata for ‘fedora-modular’… done
error: Updating rpm-md repo ‘fedora-modular’: cannot update repo ‘fedora-modular’: Cannot prepare internal mirrorlist: Curl error (28): Timeout was reached for https://mirrors.fedoraproject.org/metalink?repo=fedora-modular-38&arch=x86_64 [Failed to connect to mirrors.fedoraproject.org port 443 after 30000 ms: Timeout was reached]; Last error: Curl error (28): Timeout was reached for https://mirrors.fedoraproject.org/metalink?repo=fedora-modular-38&arch=x86_64 [Failed to connect to mirrors.fedoraproject.org port 443 after 30000 ms: Timeout was reached]

The proxy is set in the GNOME settings with the IP address 192.168.0.254 and port 8080 for HTTP and HTTPS.
The following proxy line has also been added:

[user@pc ~]$ cat /etc/ostree/remotes.d/fedora.conf
[remote “fedora”]
proxy=http://192.168.0.254:8080
url=https://ostree.fedoraproject.org
gpg-verify=true
gpgkeypath=/etc/pki/rpm-gpg/
contenturl=mirrorlist=https://ostree.fedoraproject.org/mirrorlist

Up to and including Fedora 37 (Silverblue) I had no problems behind the proxy, but since reinstalling Fedora 38 (Silverblue) I can no longer update despite the proxy configuration. Has anything changed in this context with Fedora 38?
Why does rpm-ostree upgrade find and load an update then cannot complete it? The proxy setting seems to be respected at first, and then not anymore?

Welcome @9uzk5

For fedora 39 the modular and modular-update repositories will not be used anymore. So it might be a problem because of this.

Please check in the software app if you can deactivate this two repositories and check if you still get errors.

1 Like

Can you see if How to use proxy server with rpm-ostree · Issue #762 · coreos/rpm-ostree · GitHub helps?

1 Like

Sorry for the late reply.

If both sources are deactivated, rpm-ostree upgrade comes so far:

[user@pc ~]$ rpm-ostree upgrade
⠒ Receiving objects; 99% (6319/6348) 7,6 MB/s 287,7 MB 1424 metadata, 4970 content objects fetched; 285769 KiB transferred in 40 seconds; 491,6 MB content written
Receiving objects; 99% (6319/6348) 7,6 MB/s 287,7 MB… done
Checking out tree 2740517… done
Enabled rpm-md repositories: fedora-cisco-openh264 updates fedora updates-archive
Updating metadata for ‘fedora-cisco-openh264’… done
error: Updating rpm-md repo ‘fedora-cisco-openh264’: cannot update repo ‘fedora-cisco-openh264’: Cannot prepare internal mirrorlist: Curl error (28): Timeout was reached for https://mirrors.fedoraproject.org/metalink?repo=fedora-cisco-openh264-38&arch=x86_64 [Failed to connect to mirrors.fedoraproject.org port 443 after 30000 ms: Timeout was reached]; Last error: Curl error (28): Timeout was reached for https://mirrors.fedoraproject.org/metalink?repo=fedora-cisco-openh264-38&arch=x86_64 [Failed to connect to mirrors.fedoraproject.org port 443 after 30000 ms: Timeout was reached]

It looks like I have to disable all the extra repositories for the update to go through? :thinking:

@siosm
Yes, I have tested all possible solutions I found somewhere, including the one from above, over the last few weeks, but unfortunately without success.

If you don’t use the openh264 package then you can disable those repos.

Disabling fedora-cisco-openh264 does not provide a conclusive solution either:

[user@pc ~]$ rpm-ostree upgrade
2 metadata, 0 content objects fetched; 788 B transferred in 1 seconds; 0 Bytes content written
Checking out tree a3d37ba… done
Enabled rpm-md repositories: updates fedora updates-archive
Updating metadata for ‘updates’… done
error: Updating rpm-md repo ‘updates’: cannot update repo ‘updates’: Cannot prepare internal mirrorlist: Curl error (28): Timeout was reached for https://mirrors.fedoraproject.org/metalink?repo=updates-released-f38&arch=x86_64 [Failed to connect to mirrors.fedoraproject.org port 443 after 30000 ms: Timeout was reached]; Last error: Curl error (28): Timeout was reached for https://mirrors.fedoraproject.org/metalink?repo=updates-released-f38&arch=x86_64 [Failed to connect to mirrors.fedoraproject.org port 443 after 30000 ms: Timeout was reached]

Do I really have to deactivate all additional repositories until use behind a proxy works again?

What is the problem here? Why does Fedora 38 (Silverblue) no longer work with the proxy while the previous versions worked perfectly - with the same configuration? :thinking:

At this point, I don’t know what you’ve tried anymore. Can you summarize what you have configured / tried to see if we have other suggestions?

In the network settings of GNOME, I set Proxy to manual, entered 192.168.0.254 for HTTP proxy and HTTPS proxy and set port 8080.

The following variables can then be output in the Terminal:

[user@pc ~]$ echo $http_proxy
http://192.168.0.254:8080/
[user@pc ~]$ echo $https_proxy
http://192.168.0.254:8080/
[user@pc ~]$ echo $HTTP_PROXY
http://192.168.0.254:8080/
[user@pc ~]$ echo $HTTPS_PROXY
http://192.168.0.254:8080/

Furthermore, I added a proxy entry to the file /etc/ostree/remotes.d/fedora.conf:

[user@pc ~]$ cat /etc/ostree/remotes.d/fedora.conf
[remote “fedora”]
proxy=http://192.168.0.254:8080
url=https://ostree.fedoraproject.org
gpg-verify=true
gpgkeypath=/etc/pki/rpm-gpg/
contenturl=mirrorlist=https://ostree.fedoraproject.org/mirrorlist

Without this information, rpm-ostree upgrade will not work at all behind the proxy; after some time, it will time out immediately.

With this configuration, rpm-ostree upgrade seems to be able to work, updates are found and downloaded, but it then fails with the above repositories, it seems to me. As if the proxy configuration is correct but not every component respects it?

By the way, I also use the toolbox with dnf, here I also added the proxy line:

[user@toolbox ~]$ cat /etc/dnf/dnf.conf
[main]
proxy=192.168.0.254:8080
gpgcheck=1
installonly_limit=3
clean_requirements_on_remove=True
best=False
skip_if_unavailable=True

… and that works perfectly:

⬢[user@toolbox ~]$ sudo dnf upgrade --refresh
Fedora 38 - x86_64 85 kB/s | 19 kB 00:00
Fedora 38 openh264 (From Cisco) - x86_64 7.0 kB/s | 989 B 00:00
Fedora Modular 38 - x86_64 118 kB/s | 19 kB 00:00
Fedora 38 - x86_64 - Updates 72 kB/s | 11 kB 00:00
Fedora 38 - x86_64 - Updates 3.0 MB/s | 4.2 MB 00:01
Fedora Modular 38 - x86_64 - Updates 54 kB/s | 12 kB 00:00
RPM Fusion for Fedora 38 - Free 10 kB/s | 1.5 kB 00:00
RPM Fusion for Fedora 38 - Free - Updates 77 kB/s | 6.1 kB 00:00
RPM Fusion for Fedora 38 - Free - Updates 806 kB/s | 279 kB 00:00
[…]

So you need to try adding the environment variables directly to the rpm-ostreed service unit (from How to use proxy server with rpm-ostree · Issue #762 · coreos/rpm-ostree · GitHub):

$ mkdir -p /etc/systemd/system/rpm-ostreed.service.d
$ cat > /etc/systemd/system/rpm-ostreed.service.d/http-proxy.conf << EOF
[Service]
Environment="http_proxy=http://<my-proxy>"
EOF
$ systemctl daemon-reload
$ systemctl restart rpm-ostreed.service
2 Likes

Thank you very much, that is the solution!
rpm-ostree upgrade works completely again. :+1:

2 Likes