Tls oversized record received with length 20527

error: cannot install "hello-world": Post https://api.snapcraft.io/v2/snaps/refresh: proxyconnect
tcp: tls: oversized record received with length 20527

When I try to run an Ubuntu 18.10 upgrade it says it can’t reach the Snap server. So, I tried installing a snap manually and encountered the above error message when running snap install hello-world

I’ve set up my proxy in /etc/environment and even tried adding /etc/systemd/system/snapd.service.d/proxy.conf with my http_proxy and https_proxy (both using an http:// address)

Anything else I should try or look into for debugging this issue?

Thanks!
Stephen

That error seems to appear when you set https_proxy=https://<something> when it should be https_proxy=http://<something>.

No, my proxy is set to http://

(sorry for the late reply; I completely forgot about my post for a while)

1 Like

If you’re still having the issue, could you show us the contents of /etc/systemd/system/snapd.service.d/proxy.conf and of /etc/environment, as well as the output of snap version?

/etc/systemd/system/snapd.service.d/proxy.conf

[Service]
Environment=http_proxy=http://:8080
Environment=https_proxy=http://:8080

/etc/environment

PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"
http_proxy=“http://:8080/”
https_proxy=“http://:8080/”

snap version

snap 2.34.2+18.04
snapd 2.34.2+18.04
series 16
ubuntu 18.04
kernel 4.15.0-43-generic

Nevermind, I had an https:// in the /etc/environment file, changed it, and it didn’t fix it so I still posted the previous message. But figured I should reboot just in case and it seems to be working now.

Thanks for your help.

2 Likes

By the way, a lot of tools need a hostname before the port. go doesn’t, so snapd and snap are ok, but as you put it in /etc/environment every shell will have this in it, so curl, wget, and lwp-request are going to be very unhappy (each in their own way), to name the three I checked. Make it http://localhost:8080/ and it should be fine.