I have a fresh installation of RHEL 7.7 installed. I am trying to install docker-ce. When I try to add the docker repository I end up with a Network Unreachable error message, yet I can wget the repo file without issue. I have enabled an HTTP_PROXY, HTTPS_PROXY and FTP_PROXY to reach to the internet from this host.
Any idea why this is happening?
My attempt:
me@prodbbivm01 ~ $ sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
Loaded plugins: langpacks, product-id, subscription-manager
adding repo from: https://download.docker.com/linux/centos/docker-ce.repo
grabbing file https://download.docker.com/linux/centos/docker-ce.repo to /etc/yum.repos.d/docker-ce.repo
Could not fetch/save url https://download.docker.com/linux/centos/docker-ce.repo to file /etc/yum.repos.d/docker-ce.repo: [Errno 14] curl#7 - "Failed to connect to 2600:9000:2164:d200:3:db06:4200:93a1: Network is unreachable"
me@prodbbivm01 ~ $ wget https://download.docker.com/linux/centos/docker-ce.repo
--2020-03-04 10:03:18-- https://download.docker.com/linux/centos/docker-ce.repo
Resolving myproxy.com (myproxy.com)... 10.63.112.43
Connecting to myproxy.com (myproxy.com)|10.63.112.43|:3128... connected.
Proxy request sent, awaiting response... 200 OK
Length: 2424 (2.4K) [binary/octet-stream]
Saving to: ‘docker-ce.repo’
100%[=========================================================================================>] 2,424 --.-K/s in 0s
2020-03-04 10:03:18 (324 MB/s) - ‘docker-ce.repo’ saved [2424/2424]
If I try to wget the repo file without my proxy enabled:
me@prodbbivm01 ~ $ wget https://download.docker.com/linux/centos/docker-ce.repo
--2020-03-04 10:05:04-- https://download.docker.com/linux/centos/docker-ce.repo
Resolving download.docker.com (download.docker.com)... 13.224.12.105, 13.224.12.14, 13.224.12.59, ...
Connecting to download.docker.com (download.docker.com)|13.224.12.105|:443... failed: Connection refused.
Connecting to download.docker.com (download.docker.com)|13.224.12.14|:443... failed: Connection refused.
Connecting to download.docker.com (download.docker.com)|13.224.12.59|:443... failed: Connection refused.
Connecting to download.docker.com (download.docker.com)|13.224.12.128|:443... failed: Connection refused.
Connecting to download.docker.com (download.docker.com)|2600:9000:2164:3c00:3:db06:4200:93a1|:443... failed: Network is unreachable.
Connecting to download.docker.com (download.docker.com)|2600:9000:2164:9e00:3:db06:4200:93a1|:443... failed: Network is unreachable.
Connecting to download.docker.com (download.docker.com)|2600:9000:2164:ce00:3:db06:4200:93a1|:443... failed: Network is unreachable.
Connecting to download.docker.com (download.docker.com)|2600:9000:2164:1000:3:db06:4200:93a1|:443... failed: Network is unreachable.
Connecting to download.docker.com (download.docker.com)|2600:9000:2164:1400:3:db06:4200:93a1|:443... failed: Network is unreachable.
Connecting to download.docker.com (download.docker.com)|2600:9000:2164:b200:3:db06:4200:93a1|:443... failed: Network is unreachable.
Connecting to download.docker.com (download.docker.com)|2600:9000:2164:5200:3:db06:4200:93a1|:443... failed: Network is unreachable.
Connecting to download.docker.com (download.docker.com)|2600:9000:2164:9000:3:db06:4200:93a1|:443... failed: Network is unreachable.
Well... I managed to fix the issue, but I don't understand why it worked...
I added my http proxy to the yum.conf file and now I can add the repo and continue from there.
Shouldn't having the http proxy in the environment have been good enough for yum?