I am having issue with Docker on Ubuntu 18.04 with docker-ce. While pulling a container:

$ docker pull nginx

or while trying to login

$ docker login

I get the following message:

Error response from daemon: Get https://registry-1.docker.io/v2/: proxyconnect tcp: tls: oversized record received with length 20527

I also purged and reinstalled today with latest version but it didn't help. Does anyone get it resolved?

3

There are 3 answers

4
Nils On BEST ANSWER

I had the same issue yesterday. Since I am behind a company proxy, I had to define the http-proxy for the docker daemon in:

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

The problem was, that I misconfigured the https_proxy, how it is described here. I used https:// in the https_proxy environment variable, which caused this error.

This configuration works for me:

cat /etc/systemd/system/docker.service.d/http-proxy.conf

[Service]
Environment=http_proxy=http://IP:PORT/
Environment=no_proxy=localhost,127.0.0.1
Environment=https_proxy=http://IP:PORT/

Remember that you have to restart the docker daemon after changing this configuration. You can achieve this by using:

systemctl daemon-reload
systemctl restart docker
0
Sumit On

Run docker logout and try again. If fails then run docker login with username(not email) and password, this should resolve the issue.

0
Mohamed El Gamal On

mine was the date , fix the date correct this issue

sudo date -s "$(wget -qSO- --max-redirect=0 google.com 2>&1 | grep Date: | cut -d' ' -f5-8)Z"