Error response from daemon: Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)


#1

While running ./byfn.sh up from this tutorial https://hyperledger-fabric.readthedocs.io/en/latest/build_network.html i received errors. Therefore, i deleted all docker images as mentioned in that tutorial in the troubleshooting section by using the below commands.

docker rm -f $(docker ps -aq)
docker rmi -f $(docker images -q)

After that, when i run the ./byfn.sh generate and ./byfn.sh up commands i got the below error.

Error response from daemon: Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers).
./byfn.sh up


#2

This error is normally due to DNS resolution problems.

Right click the docker icon from task bar and select ‘Settings’. Now click on the ‘Network’ tab and add the DNS as follows;

Fixed: 8.8.8.8

and click on ‘Apply’. This will restart the docker and now run the ‘./byfn.sh up’ again. It should retrieve all images without issues now.