Closed rssk closed 5 years ago
Humm indeed strange.
When I have time I will build a Windows env to debug this one.
@apocas did you get time to look into this issue?
I'm able to run the image pull test on Windows. https://github.com/apocas/dockerode/blob/master/test/docker.js#L184
Using Windows 10 and latest Docker version.
Will close this one for now. Will reopen if more info is provided.
Thanks for taking the time to look at this, and I fully understand closing this after more than a year of feedback.
We were seeing this and were able to reproduce it consistently. Since then we've implemented a workaround to mitigate the issue. We only saw this on Windows machines. Not on Mac and Linux. The image pull fails multiple times, until it eventually succeeds. How many retries is necessary is not consistent. Some times it's 1, some times it's 20, but usually between 5 to 15 retries is needed.
I'll see if I can find some time to investigate. If I do I'll report my findings here.
Problem
This is the same as the issue here, on a
pull
the docker daemon responds to with an error:context cancelled
. The issues seems to be a couple of things:Content-Length
is calculated using adata
payload that is never sent in the request. Perhaps the query string should be used https://github.com/apocas/docker-modem/blob/master/lib/modem.js#L167 ?undefined
opts
are passed in as'undefined'
strings, eg:tag
, leading to empty query paramsContent-Type
is set asapplication/json
though no json payload is sent, maybeapplication/x-www-form-urlencoded
ortext/plain
?Here is an example failing request
options
, changing the type totext/plain
or removing theContent-length
fixes the issue.