title: Docker pull error: error pulling image configuration: download failed after attempts=6: net/http: TLS handshake timeout
body: <p>I installed docker to my ubuntu 20.04. At the beginning I was able to pull images without an issue. Later I don't remember what change I did(I played a lot with resolv.conf), now I can't pull.</p>
  <p>I can login with CLI successfully, but pulling gives me error like this:</p>
  <pre><code>error pulling image configuration: download failed after attempts=6: net/http: TLS handshake timeout
  </code></pre>
  <p>Here is /etc/resolv.conf</p>
  <pre><code>aman@aman-Latitude-3420:~$ sudo cat /etc/resolv.conf
  # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
  #     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
  # 127.0.0.53 is the systemd-resolved stub resolver.
  # run &quot;systemd-resolve --status&quot; to see details about the actual nameservers.
  
  nameserver 127.0.0.53
  </code></pre>
  <p>daemon.json</p>
  <pre><code>aman@aman-Latitude-3420:~$ sudo cat /etc/docker/daemon.json 
  {
  
      &quot;mtu&quot;:1300
  }
  </code></pre>
  <p>My docker version on Ubuntu 20.04 :</p>
  <pre><code>aman@aman-Latitude-3420:~$ sudo docker --version
  Docker version 20.10.16, build aa7e414
  </code></pre>
  <p>docker info</p>
  <pre><code>aman@aman-Latitude-3420:~$ sudo docker info
  Client:
   Context:    default
   Debug Mode: false
   Plugins:
    app: Docker App (Docker Inc., v0.9.1-beta3)
    buildx: Docker Buildx (Docker Inc., v0.8.2-docker)
    compose: Docker Compose (Docker Inc., v2.5.0)
    scan: Docker Scan (Docker Inc., v0.17.0)
  
  Server:
   Containers: 0
    Running: 0
    Paused: 0
    Stopped: 0
   Images: 0
   Server Version: 20.10.16
   Storage Driver: overlay2
    Backing Filesystem: extfs
    Supports d_type: true
    Native Overlay Diff: true
    userxattr: false
   Logging Driver: json-file
   Cgroup Driver: cgroupfs
   Cgroup Version: 1
   Plugins:
    Volume: local
    Network: bridge host ipvlan macvlan null overlay
    Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
   Swarm: inactive
   Runtimes: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc
   Default Runtime: runc
   Init Binary: docker-init
   containerd version: 212e8b6fa2f44b9c21b2798135fc6fb7c53efc16
   runc version: v1.1.1-0-g52de29d
   init version: de40ad0
   Security Options:
    apparmor
    seccomp
     Profile: default
   Kernel Version: 5.14.0-1036-oem
   Operating System: Ubuntu 20.04.4 LTS
   OSType: linux
   Architecture: x86_64
   CPUs: 8
   Total Memory: 7.516GiB
   Name: aman-Latitude-3420
   ID: TU5Z:OVST:TUKD:NI5U:4PVI:RYRL:V3R7:PYFZ:JAJW:MRFX:PDT6:WU7M
   Docker Root Dir: /var/lib/docker
   Debug Mode: false
   No Proxy: localhost,127.0.0.1,127.0.0.0/8,::1,registry-1.docker.io,registry-1.docker.io,*
   Username: amanmyrat
   Registry: https://index.docker.io/v1/
   Labels:
   Experimental: false
   Insecure Registries:
    127.0.0.0/8
   Live Restore Enabled: false
  </code></pre>
  <p>What I did so far:</p>
  <ol>
  <li>I tried with vpn as well.</li>
  <li>I edited resolv.conf accordingly with<br />
  proxy addresses. but the result is same.</li>
  <li>I edited daemon.json, according to some stackoverflow answers. I
  reloaded deamon and  restarted docker every time I changed any
  setting.</li>
  <li>I uninstall docker, and installed again.</li>
  <li>I reset my ubuntu to factory defaults,I mean reinstalled ubuntu then installed docker.</li>
  </ol>
  <p>In my opinion I cannot pull because of my low internet connection(as some stackoverflow answers suggest). My speed is max 2mb/s. But How can this be solved?</p>
  <p>Any help of yours is appreciated, thanks for your time and attention.</p>