docker / for-mac

Bug reports for Docker Desktop for Mac
https://www.docker.com/products/docker#/mac
2.43k stars 116 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
jasonbivins commented 6 years ago

Hi @sebastianperruolo Let's see if you can remove what's there and pull down a fresh image - try this command docker image rm -f microsoft/mssql-server-linux

sebastianperruolo commented 6 years ago

Hi @jasonbivins

I tried that command but I'm afraid that it didn't help:

$ docker image rm -f microsoft/mssql-server-linux
Error response from daemon: No such image: microsoft/mssql-server-linux:latest

$ docker pull microsoft/mssql-server-linux
Using default tag: latest
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 
sebastianperruolo commented 6 years ago

Today I tried again and it was able to finish the download. Although I'm not sure what fixed the issue, I'll close it.

hervinhio commented 6 years ago

For some reason your issue did not appear at that moment. But I don't think that it means that the issue disappeared because I'm facing it.

arefaslani commented 6 years ago

I'm facing the issue today.

❯ docker pull jwilder/nginx-proxy
Using default tag: latest
latest: Pulling from jwilder/nginx-proxy
2a72cbf407d6: Already exists
04b2d3302d48: Already exists
e7f619103861: Already exists
668b13d991c2: Downloading [=================>                           ]   1.24MB/3.468MB
9b4e089f640c: Download complete
b055f74a1218: Downloading [=========================>                   ]   1.49MB/2.894MB
1f16e62a7a7f: Downloading [========>                                    ]  469.6kB/2.894MB
73a091d7ccc4: Waiting
eb383481e5a9: Waiting
32a4c9e45ee0: Waiting

download progress stops at this step.

sebastianperruolo commented 6 years ago

@arefaslani @hervinhio I’m reopening the issue

YRM64 commented 6 years ago

This issue has been tagged over the last several years, as far back as April 2015. Pulling images sometimes gets stuck, #813, June 2017. Pull gets stuck waiting for a layer, #22598, May 2016. Docker can hang indefinitely waiting for a nonexistent process to download the repository, #12823, April, 2015. Docker hangs forever during downloading image layers, Stack Overflow (stackoverflow.com). Docker Compose stuck downloading or pulling fs layer, Stack Overflow (stackoverflow.com). Boot2docker - Docker hangs forever during pulling image layers, Stack Overflow (stackoverflow.com). Docker is stuck on download complete for pull, Stack Overflow (stackoverfow.com) Docker stuck on pull - Docker for Mac - Docker Forums (forums.docker.com) Pulling Docker image is too slow, #1767

entGriff commented 6 years ago

Is here any fix for this issue? I still have same problem, I am trying to pull image with command and also with kitematic, but I hangs in both cases..

colinPlusPlus commented 6 years ago

I'm also having the same issue with microsoft/mssql-server-linux.

MAliNaqvi commented 6 years ago

I have the same issue with jboss/keycloak

docker pull jboss/keycloak:3.4.0.Final
3.4.0.Final: Pulling from jboss/keycloak

d9aaf4d82f24: Pulling fs layer 
bf4286cef918: Pulling fs layer 
e2b1b6ac76bc: Pulling fs layer 
c1e7cfa5052c: Pulling fs layer 
876ea0c706b5: Pulling fs layer 
ae0579831d24: Pulling fs layer 
9f392ad5c55a: Pulling fs layer 
575889a29bd2: Pulling fs layer 
3409fa805838: Pulling fs layer 
e7d647b3b8d0: Pulling fs layer 
5fc349bb2d2f: Pulling fs layer 
2456d0c82ac7: Pulling fs layer 
dfb9e3c99913: Pulling fs layer 
bc55f8d58191: Pulling fs layer 
f75f14b54bb8: Pulling fs layer 
ae0579831d24: Downloading  89.72MB/194.9MB
876ea0c706b5: Pull complete 

and python image:

Alis-MacBook-Pro-3:~ alinaqvi$ docker rmi -f python
Untagged: python:latest
Untagged: python@sha256:73fe3e33aac59ea84cdab902c13ffea175039bf7c84f069488c3716867e0d8c2
Deleted: sha256:825141134528aa58f1c0c6c7ad02e080968847338506c23c14a063ac6645bca5
Deleted: sha256:789d51f48b834efb241926bf1e1f12f56da58a4d1e85d01d2627fae34e913a2d
Deleted: sha256:a117248406ff65c063d5f90cee8adaf18cd569307c238089e3a07d18ce11b3f7
Deleted: sha256:57d953d9c3b0df0e725dcb0fb1f9bb6334adefc69424d144c7deb00ad18d5986
Deleted: sha256:61a82ccbc86451ce50f2ef8e4361d3013844bfee92e6e02326ab2102f7b51839
Deleted: sha256:de896c693ce8da83a59add0b97711d214c3457a8fa3578126a64d3955c38842b
Deleted: sha256:2d9c829ae3f7ff3e148e5c7c3a1cf378b0f90b79035e2fe9a8d78c63ccde4c89
Alis-MacBook-Pro-3:~ alinaqvi$ docker pull python
Using default tag: latest
latest: Pulling from library/python
55cbf04beb70: Already exists 
1607093a898c: Already exists 
9a8ea045c926: Already exists 
d4eee24d4dac: Pull complete 
b59856e9f0ab: Downloading [===================>                               ]   81.6MB/213.2MB
3871f87d5755: Download complete 
e450290a1377: Download complete 
72d3069ba9a5: Download complete 
bed83b902d7b: Download complete 

Disk image size allocation is 64GB 2GB memory is allocated 1GB swap and 2CPUs are allocated to the docker vm on mac

What can I do to debug this issue further?

Update: <2018-08-17 Fri 11:59> I have uploaded the diagnostics while pulling the python image. Here is the diagnostic id: E4AABEA0-E6B6-48E7-8422-646FA8B0DA83/20180817154536

MAliNaqvi commented 6 years ago

Another update, for me it seems to be an ISP specific issue. I was able to verify it by switching to a mobile network and pull the python image without it getting stuck.

Wondering if anyone else can replicate this issue; that by switching to another network, the pull doesn't hang.

adyz commented 6 years ago

I have the same problem. I think that a timeout or some kind of error would be nice instead if hanging like this...

diversemix commented 6 years ago

I have recently experienced the same issue from inside a VM. If it helps, I captured using tcpdump and there seems to be endless ACK'ing going on with no data being sent...

12:49:09.945089 IP 10.0.2.15.49554 > 104.18.122.25.https: Flags [.], ack 1, win 53960, length 0
12:49:09.945922 IP 104.18.122.25.https > 10.0.2.15.49554: Flags [.], ack 1, win 65535, length 0
12:49:15.199384 IP 10.0.2.15.49570 > 104.18.122.25.https: Flags [.], ack 1, win 53200, length 0
12:49:15.230575 IP 104.18.122.25.https > 10.0.2.15.49570: Flags [.], ack 1, win 65535, length 0
12:49:40.024831 IP 10.0.2.15.49554 > 104.18.122.25.https: Flags [.], ack 1, win 53960, length 0
12:49:40.025511 IP 104.18.122.25.https > 10.0.2.15.49554: Flags [.], ack 1, win 65535, length 0
zbindenren commented 5 years ago

Same issue here. A restart of docker daemon is not possible. Only solution is to reboot the node.

francisco-laborda-lenio commented 5 years ago

Same issue

alok87 commented 5 years ago

Same issue. Pulling images from local works but does not work from machines in AWS regions, getting stuck at some layers

alok87 commented 5 years ago

For us restarting the mirror registry fixed the issue

reda-i commented 5 years ago

same issue here, can't seem to pull the node 10 image.

picturedots commented 5 years ago

Restarting docker fixed the issue for me.

Pezhvak commented 5 years ago

i'm having constant problem with it, i can't pull mysql:5.7, tried more than 8 times now

MAliNaqvi commented 5 years ago

Not a surgical solution, but after running

brew update 
brew upgrade

Docker is able to pull images correctly. No problems so far, a month later.

Pezhvak commented 5 years ago

tried updating and upgrading brew but no luck, what i did and it fixed it was changing my dns

jayanderson commented 5 years ago

I ran into this today again (upgraded (Version 18.06.1-ce-mac73 (26764)) and restarted to make sure things were clean on this end). Once it hangs the only option is to kill it. It doesn't seem to timeout. Things that would be nice:

francisco-laborda-lenio commented 5 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!

gururajdori commented 5 years ago

Restarting docker engine helped me

mithunj43 commented 5 years ago

Unable to find image 'jboss/wildfly:latest' locally latest: Pulling from jboss/wildfly aeb7866da422: Downloading [=============> ] 20.35MB/74.7MB 157601a0b538: Download complete 642f4164f381: Download complete ee2abcb9139a: Downloading [============> ] 17.17MB/71.5MB 49bbff283f2b: Downloading [==> ] 9.112MB/178.2MB

Every time struck at the same thing.

skbly7 commented 5 years ago

I faced the same in Version 17.03.1-ce-rc1-mac3 (15924) today and was able to pull image only after docker restart.

❯ docker pull nvidia/cuda:9.0-cudnn7-runtime-ubuntu16.04
9.0-cudnn7-runtime-ubuntu16.04: Pulling from nvidia/cuda
18d680d61657: Already exists
0addb6fece63: Already exists
78e58219b215: Already exists
eb6959a66df2: Already exists
6ef1ff668c93: Already exists
f5f8f0544aa2: Already exists
3d28d96eb352: Already exists
1b48d63763c4: Downloading 476.6 MB/477.1 MB
467c984074f4: Download complete
^C
❯ docker rm nvidia/cuda:9.0-cudnn7-runtime-ubuntu16.04
Error response from daemon: No such container: nvidia/cuda:9.0-cudnn7-runtime-ubuntu16.04
macx78 commented 5 years ago

the simple 'docker pull java' is hanging for me...a bit irritating. any resolution or temp work around yet... ohe yeah, restarting docker did not work for me.

gvdm90 commented 5 years ago

Same issue with the postgres image for me

myc0l commented 5 years ago

Same issue with me as well even tried reinstalling but even after I still can't pull mongo it just freezes

SchutMJ commented 5 years ago

Same issue with microsoft/dotnet:2.1-runtime image

bugraalbayrak commented 5 years ago

Same microsoft/dotnet:2.1-runtime :/

moluzhui commented 5 years ago

Same issue with the flannel image for me

v0.9.1: Pulling from coreos/flannel
6d987f6f4279: Already exists 
16a827ca53c8: Already exists 
8f4dde5859ad: Already exists 
40db9b39f697: Already exists 
48f4941e520f: Already exists 
f77b10f3d93e: Waiting
flopetegui commented 5 years ago

7.0.1: Pulling from library/logstash 8ba884070f61: Downloading [============>] 63.08MB/63.08MB 2acb8d9c2ee9: Downloading [============>] 94.5MB/94.5MB e1094286f832: Download complete 335c368bfe0b: Downloading [============>] 164.1MB/164.1MB 7caab92382af: Download complete 92d0a5b69598: Download complete 44fd5e3c8ee5: Download complete 1ea17513e98c: Download complete 6db053fec74e: Download complete b08c9ba7eb37: Download complete a1882ed8e8e9: Download complete read tcp 192.168.65.3:45154->104.18.125.25:443: read: connection reset by peer

This happens after several retires.

dholbrook86 commented 5 years ago

Reporting same issue.

27833a3ba0a5: Pull complete 394a1d92181c: Pull complete 0efb6deb6da1: Pull complete 81549544b420: Pull complete e24aea066ae4: Pull complete 4c4cbd20ba91: Pull complete 05bc79342649: Pull complete 0b92851dadd5: Downloading [====> ] 119.4kB/1.269MB 7f1a64f50c08: Download complete 9e31f7e05b9b: Download complete 489bfb1e4741: Download complete 24c26f2acf8f: Download complete 46cbbbfb7296: Download complete a358f4537703: Download complete 8c7b241589b9: Download complete

Canceled and tried again, same layer is failing. 27833a3ba0a5: Pull complete 394a1d92181c: Pull complete 0efb6deb6da1: Pull complete 81549544b420: Pull complete e24aea066ae4: Pull complete 4c4cbd20ba91: Pull complete 05bc79342649: Pull complete 0b92851dadd5: Downloading [> ] 12.93kB/1.269MB 7f1a64f50c08: Download complete 9e31f7e05b9b: Download complete 489bfb1e4741: Download complete 24c26f2acf8f: Download complete 46cbbbfb7296: Download complete a358f4537703: Download complete 8c7b241589b9: Download complete

erssebaggala commented 5 years ago

I am experiencing the same issue - see below.

Pulling bts-api (bodastage/bts-ce-api:1.2.1)...
1.2.1: Pulling from bodastage/bts-ce-api
9ff7e2e5f967: Pull complete
59856638ac9f: Pull complete
6f317d6d954b: Pull complete
a9dde5e2a643: Pull complete
1e093bf37a80: Pull complete
8d638c1a19ca: Downloading [======>                                            ]   17.7MB/144.9MB
3b95c41e6689: Download complete
0f2da64ce7f5: Download complete
bb7cf30ae873: Download complete
04bedca1c8ed: Download complete
58eb89d012c4: Downloading [====================>                              ]  57.48MB/140.1MB
169e95234836: Download complete
2a9af58f6055: Download complete
59503fd86137: Download complete
26e065acec44: Download complete
307e84eba6be: Download complete
794e7ffd3e6a: Download complete

Below is my system information:

$ docker info
Containers: 0
 Running: 0
 Paused: 0
 Stopped: 0
Images: 16
Server Version: 18.05.0-ce
Storage Driver: aufs
 Root Dir: /mnt/sda1/var/lib/docker/aufs
 Backing Filesystem: extfs
 Dirs: 160
 Dirperm1 Supported: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: bridge host macvlan null overlay
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 773c489c9c1b21a6d78b5c538cd395416ec50f88
runc version: 4fc53a81fb7c994640722ac585fa9ca548971871
init version: 949e6fa
Security Options:
 seccomp
  Profile: default
Kernel Version: 4.9.93-boot2docker
Operating System: Boot2Docker 18.05.0-ce (TCL 8.2.1); HEAD : b5d6989 - Thu May 10 16:35:28 UTC 2018
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 3.858GiB
Name: default
ID: V7P6:2JT3:S3QR:OTOA:UK2H:QG7V:B2ER:OWNO:KV2Y:4T6L:7K4B:OF36
Docker Root Dir: /mnt/sda1/var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Username: bodastage
Registry: https://index.docker.io/v1/
Labels:
 provider=virtualbox
Experimental: false
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false

Below is extract from /var/log/docker.log

time="2019-05-23T23:08:44.271712209Z" level=info msg="ignoring event" module=libcontainerd namespace=moby topic=/tasks/delete type="*events.TaskDelete"
time="2019-05-23T23:08:53.188484540Z" level=info msg="Container 36b5cd7d20f7bea38ca02e3fa881403297caf47aab4de67d6ac5be074eb924ee failed to exit within 10 seconds of signal 15 - using the force"
time="2019-05-23T23:08:53Z" level=info msg="shim reaped" id=36b5cd7d20f7bea38ca02e3fa881403297caf47aab4de67d6ac5be074eb924ee module="containerd/tasks"
time="2019-05-23T23:08:53.384820450Z" level=info msg="ignoring event" module=libcontainerd namespace=moby topic=/tasks/delete type="*events.TaskDelete"
time="2019-05-24T00:02:51.075292589Z" level=error msg="Not continuing with pull after error: context canceled"
time="2019-05-24T01:35:49.979243384Z" level=error msg="Not continuing with pull after error: context canceled"
time="2019-05-24T09:35:08.549384052Z" level=error msg="Download failed, retrying: read tcp 10.0.2.15:47726->104.18.121.25:443: read: connection reset by peer"
time="2019-05-24T09:35:08.550419178Z" level=error msg="Not continuing with pull after error: context canceled"
time="2019-05-24T09:59:00.782407161Z" level=error msg="Download failed, retrying: unexpected EOF"
time="2019-05-24T12:25:13.952890629Z" level=error msg="Not continuing with pull after error: context canceled"
andreportela commented 5 years ago

same thing here =( do we have any sort of fallback to try to unblock the pulling?

lucasgcb commented 5 years ago

Still happens, particularly nasty with projects which contain several layers. A timeout and retry would be fantastic.

Amenophis1 commented 5 years ago

Same issue, with the majority of the pulls I tried. I don't know how to fix it.

YamYamM commented 5 years ago

Same issue, restarting docker didn't help, issue presents itself in the majority of the pulls. very annoying.

thebmusic commented 5 years ago

Same as everyone else, I'm seeing this with multiple images. Sometimes it gets stuck in the middle of downloading, sometime when pulling fs layer. It's very frustrating, like how is this acceptable?

MohammedEssehemy commented 5 years ago

same issue, solved after quitting and reopening Docker Desktop.

mulho commented 5 years ago

Same thing here. Can't download a large docker image from AWS ECR when working from home. The connection gets stalled forever for some layers. If I leave it overnight, it eventually finishes, but with an "unexpected EOF" error. The same image downloads fine when I'm on my office network. Just tried upgrading to the latest "19.03.1, build 74b1e89", restarting, but the connection always gets stalled at some point. This is basically stopping me from working from home :(

AlexZhovnuvaty commented 5 years ago

"service docker restart" solved the issue for me

mulho commented 5 years ago

So, in my case, it looks like my router had some high package loss. I changed the router and it now works. But, normal browsing would work fine. So it still lools like docker fetch resilience has some space for improvements. Auto restarts or something like that.

dogukanturan commented 5 years ago

service restart docker did not solve my problem.

rodrigogs commented 4 years ago

Same here

drtwisted commented 4 years ago

It's already been two years. And still I keep facing the issue over and over again. The latest is just now.

MGD1981 commented 4 years ago

I see that there is a Docker For Windows issue open for this as well (https://github.com/docker/for-win/issues/813) -- does anyone know if there is one for Linux Docker? Because we're encountering this bug in our Swarm running on CentOS 7 VMs frequently and it's halting productivity.

jampack commented 4 years ago

I see that there is a Docker For Windows issue open for this as well (docker/for-win#813) -- does anyone know if there is one for Linux Docker? Because we're encountering this bug in our Swarm running on CentOS 7 VMs frequently and it's halting productivity.

Faced this on centos7 too