Reputation: 8774
I went through this link: Docker push - net/http: TLS handshake timeout, but it did not solved my issue. I am simply running the https://github.com/sqshq/PiggyMetrics using the docker-compose up
command.
Status: Downloaded newer image for sqshq/piggymetrics-mongodb:latest
Pulling rabbitmq (rabbitmq:3-management)...
ERROR: Get https://registry-1.docker.io/v2/: net/http: TLS handshake timeout
[root@ech-10-1XXX PiggyMetrics]#
[root@ech-10-1XXX PiggyMetrics]# docker-compose up
Pulling rabbitmq (rabbitmq:3-management)...
ERROR: Get https://registry-1.docker.io/v2/library/rabbitmq/manifests/3-management: Get https://auth.docker.io/token?scope=repository%3Alibrary%2Frabbitmq%3Apull&service=registry.docker.io: net/http: TLS handshake timeout
Deployed and run the code on
uname -a
Linux ech-10-XXXX 4.1.12-61.1.18.el7uek.x86_64 #2 SMP Fri Nov 4 15:48:30 PDT 2016 x86_64 x86_64 x86_64 GNU/Linux
Upvotes: 34
Views: 89425
Reputation: 3270
I had exact same issue, updating my docker-desktop helped resolve it.
Upvotes: 0
Reputation: 232
This happens mostly when your internet connection is down, What worked for me was :-
sudo systemctl restart docker && sudo systemctl status docker
Upvotes: 0
Reputation: 164
If when docker pull
, having Error response from daemon: Get "https://registry-1.docker.io/v2/": net/http: TLS handshake timeout
you can configure docker daemon proxy in configuration:
Linux : /etc/docker/daemon.json
Windows: C:\ProgramData\docker\config\daemon.json
macOS Docker Desktop: ~/.docker/config/daemon.json
macOS OrbStack: ~/.orbstack/config/docker.json
{
"proxies": {
"no-proxy": "*.local,localhost,127.0.0.0/8",
"http-proxy": "http://IP_OR_DOMAIN:PORT",
"https-proxy": "http://IP_OR_DOMAIN:PORT",
}
}
Upvotes: 1
Reputation: 571
Sometimes it happens. I also faced this issue. I just reloaded the daemon and restarted the docker service. It solved this issue. You can use the below commands.
sudo systemctl daemon-reload
.
sudo systemctl restart docker
.
sudo systemctl status docker
.
docker pull hello-world
Using default tag: latest latest: Pulling from library/hello-world
Upvotes: 0
Reputation: 21
In my case, there is an entry in the /etc/hosts
which needs to be removed as it was pointing to wrong docker.io entry always.
Its silly though, took sometime to figure out it.
Upvotes: 1
Reputation: 1
Below steps Worked for me on mac Ventura 13.1:
Clean / Purge data — from Docker Dashboard Reset to factory defaults — From docker dashboard Restart Docker Desktop — from docker dashboard
Upvotes: 0
Reputation: 37
On rhel, try
# docker login
Login with your Docker ID to push and pull images from Docker Hub.
If you don't have a Docker ID, head over to https://hub.docker.com to create one.
Username: xxxx
Password: xxxx
WARNING! Your password will be stored unencrypted in /root/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store
Login Succeeded
It works fine.
sometimes you can pull a lot of images, normally you can pull 200 images for free every 6 hours Don't ask me why this connection, I think docker needs a connection for that.
Upvotes: -1
Reputation: 99
On windows, try restarting the docker daemon.
Then log in with your docker Id docker login
in your terminal...
Worked for me.
Upvotes: 0
Reputation: 71
Put debug: true under the docker-engine tab and restart the docker. This worked for me on MAC M1.
Upvotes: 6
Reputation: 1361
I was having same issue. It was fixed by resetting demon settings on Docker Desktop macOS Catalina. I hope It will work for you .
Possible Solutions
Check internet speed and connect to Faster Internet
Restart Docker
Reset Demon Settings
Upvotes: 1
Reputation: 13476
I was facing the same error Error response from daemon: Get https://registry-1.docker.io/v2/: net/http: TLS handshake timeout
because of slow internet connection.
Switching to a comparatively faster internet connection didn't fix my problem at first. Then I restarted docker and it worked.
$ sudo systemctl restart docker
Upvotes: 53
Reputation: 146
Try switching your internet connection. If you are connected via WiFi try connecting with LAN.
Upvotes: 3
Reputation: 38691
The reason is the network policy in my area.You can change your mirror address and try, in my cases, I changed the mirror address and works.I am using macOS Catalina:
"registry-mirrors" : [
"https://dockerhub.azk8s.cn"
]
Hope this help you.
Upvotes: 6
Reputation: 41
This most of the times happens when my internet connection is slow. Please check your internet connection and retry.
Upvotes: 3