docker / for-mac

Bug reports for Docker Desktop for Mac
https://www.docker.com/products/docker#/mac
2.43k stars 118 forks source link

docker pull hangs downloading image #2083

Closed sebastianperruolo closed 1 year ago

sebastianperruolo commented 6 years ago

I tried several times to pull mssql-server-linux but I got always the same result.

$ docker pull microsoft/mssql-server-linux
latest: Pulling from microsoft/mssql-server-linux
aed15891ba52: Already exists 
773ae8583d14: Already exists 
d1d48771f782: Already exists 
cd3d6cd6c0cf: Already exists 
8ff6f8a9120c: Already exists 
1fd7e8b10447: Already exists 
bd485157db89: Already exists 
273a1970ce9c: Already exists 
c6f0182f94e9: Downloading [=================================================> ]  275.2MB/275.7MB
47c608bf53ae: Waiting 

Expected behavior

Finish dowloading of mssql-server-linux image

Actual behavior

It always hang with the same fs file with id c6f0182f94e9

Information

Docker for Mac: version: 17.06.2-ce-mac27 (4cdec4294a50b2233146b09469b49937dabdebdd) macOS: version 10.12.6 (build: 16G29) logs: /tmp/5542512B-8253-4454-9064-2CD6AD31D520/20170922-191740.tar.gz [OK] db.git [OK] vmnetd [OK] dns [OK] driver.amd64-linux [OK] virtualization VT-X [OK] app [OK] moby [OK] system [OK] moby-syslog [OK] db [OK] env [OK] virtualization kern.hv_support [OK] slirp [OK] osxfs [OK] moby-console [OK] logs [OK] docker-cli [OK] menubar [OK] disk

Steps to reproduce the behavior

  1. Run docker pull microsoft/mssql-server-linux
  2. Wait
paullaffitte commented 4 years ago

I have this issue too with mariadb:10.4 on ubuntu.

erasmas commented 4 years ago

In my case rebooting my macbook helped. 🙈

evan-wehi commented 4 years ago

Also having the issue in an AWS ubuntu instance. Rebooting doesn't help.

andriihomiak commented 4 years ago

Had same issue with puckel/docker-airflow image on ubuntu. $ sudo systemctl stop docker.service && sudo systemctl start docker.service did the trick for me

katopz commented 4 years ago

image

katopz@kat ~ % docker pull microsoft/mssql-server-linux
Using default tag: latest
latest: Pulling from microsoft/mssql-server-linux
59ab41dd721a: Downloading  39.85MB/42.22MB
57da90bec92c: Download complete 
06fe57530625: Download complete 
5a6315cba1ff: Download complete 
739f58768b3f: Download complete 
0b751601bca3: Download complete 
bcf04a22644a: Downloading  59.24MB/62.29MB
6b5009e4f470: Downloading  278.4MB/281.1MB
a9dca2f6722a: Waiting 

Restart didn't do the trick, I still waiting here...

[Update] I have to change to other wifi hotspot and it work!

steklopod commented 4 years ago

Same issue:

PS C:\WINDOWS\system32> docker image rm -f node:latest

PS C:\WINDOWS\system32> docker pull node:latest

latest: Pulling from library/node
9a0b0ce99936: Downloading [============================>  ]  44.23MB/45.38MB        

service restart docker gives me:

Get-Service : Не удается найти позиционный параметр, принимающий аргумент "docker".
строка:1 знак:1
+ service restart docker
+ ~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Get-Service], ParameterBindingException
    + FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell.Commands.GetServiceCommand
mokalovesoulmate commented 4 years ago

I am a new Docker user and would trying to use Devilbox. I have the same issue, docker-compose seem to download a lot of files but some of them were stalled, so I aborted it by pressing Ctrl+C.

But the most annoying issue is each time I cancel and resume it, it keeps redownload the files that already downloaded before I cancel. (This is Docker issue, I believe)

I was stuck for an hour and did not have other network option. I believe the issue is either my own ISP or the server where the files were hosted.

MahmoudSoliman922 commented 4 years ago

I had the same issue and changing the "max-concurrent-downloads" to 1 solved it for me.

Thirupatel commented 4 years ago

I am getting below error... while pulling slenium git hub..it hangs on below screen C:\Users\jrohilla>docker pull selenium/hub Using default tag: latest latest: Pulling from selenium/hub 7ddbc47eeb70: Already exists c1bbdc448b72: Already exists 8c3b70e39044: Already exists 45d437916d57: Already exists 224ff5c95ca1: Already exists acaa6aac1124: Already exists 0b8f55da2e47: Already exists 5670ee04a00a: Already exists ebf77b0e3974: Already exists 25ba20a3fc45: Already exists 1701de5595aa: Already exists 24acfc5a01c8: Waiting

bavovna commented 4 years ago

max-concurrent-downloads did not solve the issue for me. Tried different networks, Wi-FI and ethernet. Can this be an issue on hub.docker.com side?

downloading golang:1.13.7 is like

attempt 1 (and stuck): bd20b51e1705: Downloading [===============================> ] 75.53MB/120.1MB

attempt 2 (and stuck): bd20b51e1705: Downloading [=====================================> ] 88.93MB/120.1MB

attempt 3 (and stuck): bd20b51e1705: Downloading [=====================================> ] 91.18MB/120.1MB

attempt 4 (and stuck): bd20b51e1705: Downloading [=======================================> ] 94.46MB/120.1MB

Update: I am using MacOS version and proxy is set by docker itself:

docker system info | grep Proxy
 HTTP Proxy: gateway.docker.internal:3128
 HTTPS Proxy: gateway.docker.internal:3129

^ Tested on multiple hosts, it seems that my IP addresses / subnets are rate limited. Hosts in AWS and DigitalOCean can download golang with no issue.

JnMik commented 4 years ago

Same issue here, my image is getting pulled from aws ECR so I don't think it's hub.docker.com's fault @mkorenkov

JnMik commented 4 years ago

What I can add is, i'm pulling the image from a device behind a very slow ISP (xplorenet, satellite). My guess is they were throttling me for abuse of network... but maybe not cuz definitely we are many with the same issue.

Edited: I had the error like 8 times in a row, when I was always trying to pull from docker-compose. I device to run a docker pull manually and the image went through.

I also had this error in journalctl : "Not continuing with pull after error: context"

l-qing commented 4 years ago

In my scene, trigger reconnect, by restart network or close hang tcp socket, can finish the download.

I use Surge on MacOS, it's can show the active socket in dashboard. It can easy break the hang socket to trigger reconnect.

manjotsingh99 commented 4 years ago

THE ISSUE IS RESOLVED. THE MAIN PROBLEM WAS IN THE TIMEOUT ERROR. SO JUST TO RESOLVE THIS CHANGE THE WIFI CONNECTION WHENEVER U GOT STUCK AND THEN CHANGE IT BACK.WORKS EVERYTIME.KUDOS!!!!!!!!!!!!!!

tuxayo commented 4 years ago

@manjotsingh99

THE ISSUE IS RESOLVED.

Unfortunately this is just a workaround. And it's not very usable on a server.

manjotsingh99 commented 4 years ago

@manjotsingh99

THE ISSUE IS RESOLVED.

Unfortunately this is just a workaround. And it's not very usable on a server.

I know but this works and no other solution is out there. what to do now!!

meridsa commented 4 years ago

Bump. Facing the same issue.

tuxayo commented 4 years ago

@meridsa No need to bump. There are already a lot messages here which makes it hard to follow or to come here for the first time. The often recommended alternative is to upvote the issue: https://github.com/docker/for-mac/issues/2083#issue-259952621

Truth1984 commented 4 years ago

Suggestion: Consider caching already downloaded content for quick restart ?

podjackel commented 4 years ago

I was running into this issue using docker from ubuntu inside VBox. After changing my virtual machine's network configuration from NAT to Bridged Adapter it worked smoothly.

Hope it helps!

This seems to work in 2020. Given all the issues and different levels of fixes, I'm going to guess this is an issue with how the docker client handles network interruptions or stagnation.

michael-bud commented 4 years ago

I had this occur after I interrupted (Ctrl + C) a docker pull in the middle of it downloading the said layer. A restart of docker daemon fixed it.

So based on that, plus what a lot of others have said, it appears to occur when a download is interrupted in some way?

ikingye commented 4 years ago

restart docker fix it.

systemctl restart docker

alexivkin commented 4 years ago

restarting dockerd, reconnecting network, closing hang tcp socket... Why after all these years nobody bothered fixing the darn bug in the docker code itself? Is it too hard to add a timeout/reconnect on a hung connection? :disappointed:

francilioaraujo commented 4 years ago

Had the same issue today pulling redis:latest inside a debian VM. systemctl restart docker solved it for me. It bothers me that if this happens in production for someone the only way to solve is to restart the daemon

N4SIRODDIN3 commented 4 years ago

Hi, I figured out that the download progress happens in the background. When I pressed the enter key, I managed to continue the download progress. Hope this will help.

andranik-muradyan-vineti commented 4 years ago

Same here, on multiple Ubuntu 20.04 machines. The hello-world downloads just fine thou. Restarting the machines and the service did not do the trick for me.

DavidJulienMillet commented 4 years ago

Hi i had the same problem. If the Image part has begin its download with a specific connection (my home wifi), it can't be finished with my phone 4G wifi. I solve the solution switching again to my home wifi to finish download even if its way much longer. So I think exploring the internet configuration can be a solution to this problem...

richiethom commented 4 years ago

In my experience this is due to non-standard connections. Eg a corporate VPN over a slow domestic wifi-->ADSL connection. Downloading the same image on the same machine, but on the fast corporate network without VPN finished absolutely fine. Downloading the same image on my own computer (rather than employer's) without their VPN software but on the slow wifi-->ADSL connection, no problem either.

larytet commented 4 years ago

In my case this is a VPN+WiFi related issue. It would be nice to have more debug information when the download fails. I solved the problem by using a different VPN server with, surprisingly, slower (higher latency) connection. I also set max-concurrent-downloads limit to 1 in the /etc/docker/daemon.json just in case

Remie9 commented 3 years ago

Rebooting helped for me

crypt3lx2k commented 3 years ago

I had this for a couple of months where big downloads would not finish in docker. All issues were resolved when I switched out my router.

aravinthkumar commented 3 years ago

ok I see this is open for 3 years, I am not sure if this would be addressed any day soon but even I have the same issue today :(

chandan-vibrenthealth commented 3 years ago

I am also facing the same issue with jboss/keycloak

matthogan commented 3 years ago

THE ISSUE IS RESOLVED. THE MAIN PROBLEM WAS IN THE TIMEOUT ERROR. SO JUST TO RESOLVE THIS CHANGE THE WIFI CONNECTION WHENEVER U GOT STUCK AND THEN CHANGE IT BACK.WORKS EVERYTIME.KUDOS!!!!!!!!!!!!!!

For whatever reason this worked in my case.

jypang86 commented 3 years ago

Here to leave my comment in 2021.... Observing the same issue while pulling docker-bench-security. Tried the same operation on another machine and it was working well.

Tried restart docker even rebooted the machine it wont help......

RafaelHGBotelho commented 3 years ago

Same problem here, the images freeze and the process goes extremely slowly. I executed the command on two different machines and by Azure DevOps, but it is stuck until the moment that decides to flow.

victor-ramos commented 3 years ago

I was facing the same issue on macOS Catalina 10.17.7 with Docker Desktop 3.2.2. Restarting the docker application and rebooting the computer did not work for me.

I had to disable my Anti-Malware Symantec Endpoint Protection to be able to pull an image.

Nahemah1022 commented 3 years ago

Have the same issue, and I solved it by restarting docker engine.

btraas commented 3 years ago

Switching from Ethernet to a WiFi connection worked for me (after restarting the docker service).

leimao commented 3 years ago

Is systemctl restart docker a permanent solution?

leimao commented 3 years ago

Is systemctl restart docker a permanent solution?

Luca-Terrazzan commented 3 years ago

Why is this closed? It's clearly not resolved

mattyf commented 3 years ago

Encountered on Synology Docker as well.

pengfeinie commented 3 years ago

Same issue here, if you guys find way to fix the issue , please tell me, thanks.

fcarta29 commented 3 years ago

Samesies - super annoying as well as the Docker upgrade/restart pop up

sanak commented 3 years ago

Well, I encountered the same issue on macOS Catalina environment, and after stopping Kaspersky Internet Security v21.1, I could pull the image. So, I guess that some virus software's settings may be one of the cause of this issue.

shrinktofit commented 3 years ago

Bump

egor-ryashin commented 3 years ago

At least an idea how to debug that would be helpful indeed.

egor-ryashin commented 3 years ago

It was antivirus Kaspersky. Switching it off didn't help as it stayed as background process and continued to block, I terminated the process kavd manually.

How I found it (in case you have another antivirus):

  1. Find docker vpnkit process PID ps axu | grep docker.vpn
  2. Find what destination port it connects to: lsof -Pnl +M -i4 | grep <PID>
    com.docke 11138      501   69u  IPv4 0x217c40f28f      0t0  TCP 127.0.0.1:52603->127.0.0.1:1110 (FIN_WAIT_2)
    com.docke 11138      501   70u  IPv4 0x21737be28f      0t0  TCP 127.0.0.1:52605->127.0.0.1:1110 (FIN_WAIT_2)
    com.docke 11138      501   71u  IPv4 0x2172028f      0t0  TCP 127.0.0.1:52607->127.0.0.1:1110 (FIN_WAIT_2)
    com.docke 11138      501   72u  IPv4 0x2172ab58af      0t0  TCP 127.0.0.1:52609->127.0.0.1:1110 (FIN_WAIT_2)
    com.docke 11138      501   73u  IPv4 0x21e7ecf      0t0  TCP 127.0.0.1:52612->127.0.0.1:1110 (FIN_WAIT_2)
    com.docke 11138      501   74u  IPv4 0x217295c12f      0t0  TCP 127.0.0.1:52614->127.0.0.1:1110 (FIN_WAIT_2)
    com.docke 11138      501   75u  IPv4 0x21723a628f      0t0  TCP 127.0.0.1:52616->127.0.0.1:1110 (FIN_WAIT_2)
  3. Find the port process: sudo lsof -i -P | grep LISTEN | grep 1110
    kavd        145           root  148u  IPv4 0x2179f81ecf      0t0    TCP *:1110 (LISTEN)
btraas commented 3 years ago

@egor-ryashin I think ctrl-t will also give some insight whether the download stream(s) have stalled