conan Unable to connect to conan-center=https://conan.bintray.com
Problem
Using the docker container for the training, while using the command conan install .. mentioned in this lesson conan can not reach conan center remote.
This is caused when the container produces /etc/resolv.conf contains the localhost address nameserver 127.0.X.X.
Suggested Enhancement
This can be fixed by filling /etc/resolv.conf with a public DNS like google's public DNS 8.8.8.8 while building the container.
Details about the environment used:
- VirtualBox
- Guest: Ubuntu 18.04
- Host: Windows 10
Exact error output
ERROR: HTTPSConnectionPool(host='conan.bintray.com', port=443): Max retries exceeded with url: /v1/ping (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f23d2758810>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution'))
Unable to connect to conan-center=https://conan.bintray.com
1. Make sure the remote is reachable or,
2. Disable it by using conan remote disable,
Then try again.
Hi @minamaged113
Thanks for reporting. Just to clarify, you are running the docker image inside a Ubuntu inside a Windows, right? It is probable that the issue is due to this setup, running the docker image directly in Windows works fine (btw, I would recommend Docker Desktop for Windows, my experience with it so far has been very good).
@memsharded Thanks for the quick reply. However, docker host for windows needs Hyper-V to be enabled while Virtualbox needs it to be disabled. I need to have Virtualbox running, so using docker host for windows is not an easy fix.
I have created a pull request that has a quick fix for this by populating /etc/resolv.conf while the image is being built. I have used a public DNS for this quick fix. I have tried it locally and it seems to work. It might be useful if others have a similar setup.