Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 891
Muhammad Shahbaz Avatar asked Nov 30 '22 08:11

Muhammad Shahbaz


2 Answers

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

like image 32
Sumit Avatar answered Dec 05 '22 08:12

Sumit


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
like image 182
Nils Avatar answered Dec 05 '22 06:12

Nils