I am running a WSL RedHat 9.4 instance.
Running e.g. dnf update appears to sporadically update repos. For instance, from one output:
BaseOS-9 0.0 B/s | 0 B 00:00 Errors during downloading metadata for repository 'centos9-BaseOS': - Curl error (56): Failure when receiving data from the peer for https://mirror.stream.centos.org/9-stream/BaseOS/x86_64/os/repodata/repomd.xml [Empty reply from server] Error: Failed to download metadata for repo 'centos9-BaseOS': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried And then from another:
BaseOS-9 3.0 MB/s | 8.7 MB 00:02 AppStream-9 0.0 B/s | 0 B 00:00 Errors during downloading metadata for repository 'centos9-AppStream': - Curl error (56): Failure when receiving data from the peer for https://mirror.stream.centos.org/9-stream/AppStream/x86_64/os/repodata/repomd.xml [Empty reply from server] Error: Failed to download metadata for repo 'centos9-AppStream': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried So you can see sometimes a repo is updated and other times its not. Also the trouble isn't always with the repomd.xml file e.g.:
BaseOS-9 0.0 B/s | 0 B 00:00 Errors during downloading metadata for repository 'centos9-BaseOS': - Curl error (56): Failure when receiving data from the peer for https://mirror.stream.centos.org/9-stream/BaseOS/x86_64/os/repodata/493da87894a1326b336593705d9017a2a6359df1b4b223d7f4ea047208eee9b3-filelists.xml.gz [Empty reply from server] - Curl error (56): Failure when receiving data from the peer for https://mirror.stream.centos.org/9-stream/BaseOS/x86_64/os/repodata/d99ec16088e689630bfb9ae200ea5cb1b2f716da8a276d24eacfcd3c4114ddaf-primary.xml.gz [Empty reply from server] - Curl error (56): Failure when receiving data from the peer for https://mirror.stream.centos.org/9-stream/BaseOS/x86_64/os/repodata/0146aeaae330eaf817af5ba661296dcf37ac224eac896064b853aeb8bafc48ef-comps-BaseOS.x86_64.xml [Empty reply from server] Error: Failed to download metadata for repo 'centos9-BaseOS': Yum repo downloading error: Downloading error(s): repodata/d99ec16088e689630bfb9ae200ea5cb1b2f716da8a276d24eacfcd3c4114ddaf-primary.xml.gz - Cannot download, all mirrors were already tried without success; repodata/493da87894a1326b336593705d9017a2a6359df1b4b223d7f4ea047208eee9b3-filelists.xml.gz - Cannot download, all mirrors were already tried without success; repodata/0146aeaae330eaf817af5ba661296dcf37ac224eac896064b853aeb8bafc48ef-comps-BaseOS.x86_64.xml - Cannot download, all mirrors were already tried without success Not only that but I know that these servers/hosted-files are valid because I can access them both in the browser and with a raw curl call e.g.: curl https://mirror.stream.centos.org/9-stream/BaseOS/x86_64/os/repodata/d99ec16088e689630bfb9ae200ea5cb1b2f716da8a276d24eacfcd3c4114ddaf-primary.xml.gz
Here is /etc/yum.repos.d/centos.repo:
[centos9-BaseOS] name=BaseOS-9 baseurl=https://mirror.stream.centos.org/9-stream/BaseOS/x86_64/os/ enabled=1 gpgcheck=0 [centos9-AppStream] name=AppStream-9 baseurl=https://mirror.stream.centos.org/9-stream/AppStream/x86_64/os/ enabled=1 gpgcheck=0 Note that I do have a proxy set like the following in /etc/yum.conf:
[main] gpgcheck=1 installonly_limit=3 clean_requirements_on_remove=True best=True skip_if_unavailable=False proxy=http://<proxy.com>:80/ proxy_username=<username> proxy_password=<password> and also set in my /etc/environment using http_proxy and https_proxy.
dnfconfiguration file is/etc/dnf/dnf.confref. Try setting the proxy in/etc/dnf/dnf.conf. If that does not help, try adding the proxy settings for every repository in/etc/yum.repos.d/centos.repo.dnf.confis at linked because changes are synced withyum.confand also tried your second suggestion.