Unable to pull the hello-world image

  • Issue type: Initial running
  • OS Version/build:Ubuntu 16.04 LTS
  • App version:19.03.1
  • Steps to reproduce:docker pull hello-world
    Error response-Using default tag: latest
    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)

Even while trying to login using docker login i get the below error response:
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)