Cannot get nonce from store

I’m trying to upgrade Ubuntu from 18.04 LTS to 20.04 LTS and it’s telling me “connection to the Snap Store failed. You have the package lxd installed but your system is unable to reach the Snap Store”. There is no proxy involved. I can reach the internet.

ubuntu@TE-SpecProdECM-East:/var/log$ sudo snap version
snap    2.58+18.04
snapd   2.58+18.04
series  16
ubuntu  18.04
kernel  5.4.0-1097-aws
ubuntu@TE-SpecProdECM-East:/var/log$ sudo snap install notepad-plus-plus
error: cannot install "notepad-plus-plus": cannot get nonce from store: Post
       https://api.snapcraft.io/api/v1/snaps/auth/nonces: read tcp
       10.146.237.24:47230->185.125.188.59:443: read: connection reset by peer

If I do curl --verbose -4 https://api.snapcraft.io it says Connected…successfully set cert verify locations, it does TLSv1.3 Client hello and then I get:

OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to api.snapcraft.io:443`

When I do snap debug connectivity it says

* api.snapcraft.io: unreachable, error: 1 servers unreachable.

I’ve tried doing the refresh, restart and reboot. Can you please help?

Hi, this sounds like a network issue of some kind - this is not happening in any widespread fashion. e.g. from my random VPS out there:

$ curl  https://api.snapcraft.io
snapcraft.io store API service - Copyright 2018-2022 Canonical.

A quick google of the error you got does point to there being a proxy somewhere in the path to api.snapcraft.io; even if you don’t have one explicitly set on your host, there might be a transparent/intercepting proxy interfering with things.

  • Daniel

Hi Daniel. Thanks for the response. My Security team has confirmed the same. I will be submitting a firewall request to get this resolve.

Ann