docker / for-win

Bug reports for Docker Desktop for Windows
https://www.docker.com/products/docker#/windows
1.86k stars 291 forks source link

Client.Timeout exceeded while awaiting headers #1534

Closed AleksandrOrlov closed 4 years ago

AleksandrOrlov commented 6 years ago

Expected behavior

Download Image and create container

Actual behavior

Unable to find image 'hello-world:latest' locally docker: 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). See 'docker run --help'.

Information

Diagnostic Id: AD27B128-4EC0-4888-9470-22E42CD7DF37/2018-01-12_13-49-18

I try all variations of solution, and they not working for me: 1) Set DNS to Fixed 8.8.8.8 2) Reset factory/Reinstall docker/Reboot docker or computer

Steps to reproduce the behavior

  1. Execute command in console: docker run hello-world

``

bhlevca commented 5 years ago

Missing proxy configuration?

mkdir -p /etc/systemd/system/docker.service.d nano /etc/systemd/system/docker.service.d/http-proxy.conf

[Service] Environment="HTTP_PROXY=http://USER:PASSWD@SERVER:PORT/" Environment="HTTPS_PROXY=http://USER:PASSWD@SERVER:PORT/"

systemctl daemon-reload systemctl restart docker

Thanks, it pointed me to the right path. However on OpenSuSE I needed to edit the /usr/lib/systemd/system/docker.service file to include the the proxy env variable, here is the entire file content:

[Unit]
Description=Docker Application Container Engine
Documentation=http://docs.docker.com
After=network.target lvm2-monitor.service SuSEfirewall2.service

[Service]
EnvironmentFile=/etc/sysconfig/docker

# While Docker has support for socket activation (-H fd://), this is not
# enabled by default because enabling socket activation means that on boot your
# containers won't start until someone tries to administer the Docker daemon.
Type=notify
ExecStart=/usr/bin/dockerd --add-runtime oci=/usr/sbin/docker-runc $DOCKER_NETWORK_OPTIONS $DOCKER_OPTS
ExecReload=/bin/kill -s HUP $MAINPID

# Having non-zero Limit*s causes performance problems due to accounting overhead
# in the kernel. We recommend using cgroups to do container-local accounting.
LimitNOFILE=1048576
LimitNPROC=infinity
LimitCORE=infinity

# Uncomment TasksMax if your systemd version supports it.
# Only systemd 226 and above support this property.
TasksMax=infinity

# Set delegate yes so that systemd does not reset the cgroups of docker containers
# Only systemd 218 and above support this property.
Delegate=yes

# Kill only the docker process, not all processes in the cgroup.
KillMode=process

# Restart the docker process if it exits prematurely.
Restart=on-failure
StartLimitBurst=3
StartLimitInterval=60s

[Install]
WantedBy=multi-user.target

[Service]
Environment="HTTP_PROXY=http://USER:PASSWD@SERVER_IP:PORT/"
Environment="HTTPS_PROXY=http://USER:PASSWD@SERVER_IP:PORT/"
tartansandal commented 5 years ago

As suggested by @jigarakatidus above:

docker network prune

works for me. Perhaps networks just stack up and cause the timeout?

hsmiranda commented 5 years ago

i'm resolved this problem with setting proxy variables correct, oc or kubectl utilize proxy variables for connect to api even on localhost.

kg-2 commented 5 years ago

disabling my VPN solved it for me

ra-coder commented 5 years ago

for me helped

sudo systemctl restart docker

on host with private registry

will7455 commented 4 years ago

Expected behavior

Download Image and create container

Actual behavior

Unable to find image 'hello-world:latest' locally docker: 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). See 'docker run --help'.

Information

Diagnostic Id: AD27B128-4EC0-4888-9470-22E42CD7DF37/2018-01-12_13-49-18

I try all variations of solution, and they not working for me:

  1. Set DNS to Fixed 8.8.8.8
  2. Reset factory/Reinstall docker/Reboot docker or computer

Steps to reproduce the behavior

  1. Execute command in console: docker run hello-world

`` HELLO! the problem most people is facing that the home computer is not setup like a SERVER! and guys that work around servers all day are giving advice for specific scenarios that dont apply to average "docker install windows / ubuntu doesnt work uninstall people" lol

Here is your fix 1. Install the resolvconf package.

$ sudo apt-get update

$ sudo apt install resolvconf

2. Edit /etc/resolvconf/resolv.conf.d/head and add the following:

$ sudo nano /etc/resolvconf/resolv.conf.d/head

  1. Make edits to /etc/resolvconf/resolv.conf.d/head. add your nameservers in and SAVE
nameserver 8.8.4.4
nameserver 8.8.8.8

PRESS CTRL X THEN PRESS YES TO SAVE

4. Restart the resolvconf service.

$ sudo service resolvconf restart

Fix should be permanent.

you can ALSO reboot server (good habit when installing or upgrading stuff

sudo reboot

enjoy!

-willy

sharda1955 commented 4 years ago

Hi @AleksandrOrlov Are you using a proxy? If so, what do you have setup in the GUI under settings? Can you run the docker login command It also looks like the D: drive was unmounted or unreachable according to the logs

[13:11:11.235][ApiProxy ][Info ] time="2018-01-12T13:11:11+07:00" msg="proxy << POST /v1.35/images/create?fromImage=hello-world&tag=latest\n" [13:11:11.236][VpnKit ][Warning] vpnkit.exe: 9f31 Query:0 na:c:r:rn 0 <qs:registry-1.docker.io.localdomain. <AAAA|IN>> an: au: ad: lookup failed: no servers

hi ,

I am using proxy and not able to push the images from docker client to private repository, what could be the issue.

sharda1955 commented 4 years ago

I ran docker login but getting error response from daemon " failed with status : 404 not found

di118 commented 4 years ago

restarting my laptop did it for me

sajibcu commented 4 years ago

sudo systemctl start docker . this worked for me.

elcolie commented 4 years ago

I experience this in OSX. Changing the DNS to 8.8.8.8 solve. I suspect DNS is changed because of VPN

marevalo10 commented 4 years ago

I have a Windows and I can figured this out by configuring the DNS as mentioned at the begining. The main issue was to know how to configure it. At the end, I have VirtualBox and docker uses one VM called default. I reviewed the configuration and saw it has 2 network interfaces but it didn't let me do any change. After this, I reviewed the configuration for some of the network interfaces (settings, network, change adapter option and then I selected the nw interface with the same name that VirtualBox default machine mentioned. Select properties, Internet Protocol v4, properties and then here you have DNS configuration empty!!: image

docker-robott commented 4 years ago

Issues go stale after 90 days of inactivity. Mark the issue as fresh with /remove-lifecycle stale comment. Stale issues will be closed after an additional 30 days of inactivity.

Prevent issues from auto-closing with an /lifecycle frozen comment.

If this issue is safe to close now please do so.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. /lifecycle stale

docker-robott commented 4 years ago

Closed issues are locked after 30 days of inactivity. This helps our team focus on active issues.

If you have found a problem that seems similar to this, please open a new issue.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. /lifecycle locked