Quantcast
Channel: Debian User Forums
Viewing all articles
Browse latest Browse all 3441

Testing And Unstable • [Testing - Trixie] snapd: unable to connect to snap store

$
0
0
trixie is up-to-date as of 20240615

I install snapd.

Code:

$ snap versionsnap    2.62-5snapd   2.62-5series  16debian  -kernel  6.7.12-amd64
I run "snap install core". I get:

Code:

$ sudo snap install coreerror: unable to contact snap store
I run, "sudo snap debug connectivity". I get:

Code:

$ sudo snap debug connectivityConnectivity status: * api.snapcraft.io: unreachableerror: 1 servers unreachable
Many problems seem to be related to proxies, but I don't have one of those.

One post suggested, "curl -v -D- https://api.snapcraft.io". I get:

Code:

$ curl -v -D- https://api.snapcraft.io* Host api.snapcraft.io:443 was resolved.* IPv6: (none)* IPv4: 185.125.188.55, 185.125.188.54, 185.125.188.59, 185.125.188.58*   Trying 185.125.188.55:443...* Connected to api.snapcraft.io (185.125.188.55) port 443* ALPN: curl offers h2,http/1.1* TLSv1.3 (OUT), TLS handshake, Client hello (1):*  CAfile: /etc/ssl/certs/ca-certificates.crt*  CApath: /etc/ssl/certs* TLSv1.3 (IN), TLS handshake, Server hello (2):* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):* TLSv1.3 (IN), TLS handshake, Certificate (11):* TLSv1.3 (IN), TLS handshake, CERT verify (15):* TLSv1.3 (IN), TLS handshake, Finished (20):* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):* TLSv1.3 (OUT), TLS handshake, Finished (20):* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384 / x25519 / RSASSA-PSS* ALPN: server did not agree on a protocol. Uses default.* Server certificate:*  subject: C=GB; L=London; O=CANONICAL GROUP LIMITED; CN=api.snapcraft.io*  start date: Aug 22 00:00:00 2023 GMT*  expire date: Aug 21 23:59:59 2024 GMT*  subjectAltName: host "api.snapcraft.io" matched cert's "api.snapcraft.io"*  issuer: C=US; O=DigiCert Inc; CN=DigiCert TLS RSA SHA256 2020 CA1*  SSL certificate verify ok.*   Certificate level 0: Public key type RSA (2048/112 Bits/secBits), signed using sha256WithRSAEncryption*   Certificate level 1: Public key type RSA (2048/112 Bits/secBits), signed using sha256WithRSAEncryption*   Certificate level 2: Public key type RSA (2048/112 Bits/secBits), signed using sha1WithRSAEncryption* using HTTP/1.x> GET / HTTP/1.1> Host: api.snapcraft.io> User-Agent: curl/8.8.0> Accept: */*> * Request completely sent off* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):* old SSL session ID is stale, removing< HTTP/1.1 200 OKHTTP/1.1 200 OK< server: gunicorn/20.0.4server: gunicorn/20.0.4< date: Sun, 16 Jun 2024 04:38:39 GMTdate: Sun, 16 Jun 2024 04:38:39 GMT< content-type: text/html; charset=utf-8content-type: text/html; charset=utf-8< content-length: 64content-length: 64< snap-store-version: 58snap-store-version: 58< x-view-name: snapdevicegw.webapi.rootx-view-name: snapdevicegw.webapi.root< x-vcs-revision: c0e43f5df10b72bcd9c7f5a3f18584f41ed5a1f6x-vcs-revision: c0e43f5df10b72bcd9c7f5a3f18584f41ed5a1f6< x-request-id: 485C005BC4CE0A83255C01BB666E6C4F44FDE32Dx-request-id: 485C005BC4CE0A83255C01BB666E6C4F44FDE32D< snapcraft.io store API service - Copyright 2018-2022 Canonical.* Connection #0 to host api.snapcraft.io left intact
One post suggested stopping the snapd service in systemd and running it by hand. This is the result:

Code:

$ sudo systemctl stop snapd.service snapd.socket$ sudo SNAPD_DEBUG=1 SNAPD_DEBUG_HTTP=3 /usr/lib/snapd/snapd2024/06/16 00:44:25.497882 overlord.go:271: Acquiring state lock file2024/06/16 00:44:25.497974 overlord.go:276: Acquired state lock file2024/06/16 00:44:25.553613 logger.go:93: DEBUG: socket "/run/snapd.socket" was not activated; listening2024/06/16 00:44:25.553728 logger.go:93: DEBUG: socket "/run/snapd-snap.socket" was not activated; listening2024/06/16 00:44:25.554960 daemon.go:247: started snapd/2.62-5 (series 16; classic; devmode) debian/ (amd64) linux/6.7.12-amd64.2024/06/16 00:44:25.566273 daemon.go:340: adjusting startup timeout by 30s (pessimistic estimate of 30s plus 5s per snap)2024/06/16 00:44:25.567090 backends.go:58: AppArmor status: apparmor is enabled but some kernel features are missing: dbus, network2024/06/16 00:44:25.828917 logger.go:93: DEBUG: will consider standby after: 5s2024/06/16 00:44:25.828965 logger.go:93: DEBUG: activation done in 354ms2024/06/16 00:44:26.004053 logger.go:93: DEBUG: Catalog refresh starting now; next scheduled for 2024-06-17 03:00:31.227283878 -0400 EDT m=+94565.777155607.2024/06/16 00:44:26.004171 logger.go:93: DEBUG: Retrying https://api.snapcraft.io/api/v1/snaps/sections, attempt 1, elapsed time=4.87µs2024/06/16 00:44:26.004622 logger.go:67: DEBUG: > "GET /api/v1/snaps/sections HTTP/1.1\r\nHost: api.snapcraft.io\r\nUser-Agent: snapd/2.62-5 (series 16; classic; devmode) debian/ (amd64) linux/6.7.12-amd64\r\nAccept: application/hal+json\r\nSnap-Device-Capabilities: default-tracks\r\nX-Ubuntu-Architecture: amd64\r\nX-Ubuntu-Classic: true\r\nX-Ubuntu-Series: 16\r\nX-Ubuntu-Wire-Protocol: 1\r\nAccept-Encoding: gzip\r\n\r\n"2024/06/16 00:44:36.005949 logger.go:93: DEBUG: Retrying because of: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)2024/06/16 00:44:36.005983 logger.go:93: DEBUG: ShouldRetryError: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers) *http.httpError -> true2024/06/16 00:44:36.005996 logger.go:93: DEBUG: Retrying https://api.snapcraft.io/api/v1/snaps/sections, attempt 2, elapsed time=10.001830091s2024/06/16 00:44:36.006416 logger.go:67: DEBUG: > "GET /api/v1/snaps/sections HTTP/1.1\r\nHost: api.snapcraft.io\r\nUser-Agent: snapd/2.62-5 (series 16; classic; devmode) debian/ (amd64) linux/6.7.12-amd64\r\nAccept: application/hal+json\r\nSnap-Device-Capabilities: default-tracks\r\nX-Ubuntu-Architecture: amd64\r\nX-Ubuntu-Classic: true\r\nX-Ubuntu-Series: 16\r\nX-Ubuntu-Wire-Protocol: 1\r\nAccept-Encoding: gzip\r\n\r\n"2024/06/16 00:44:36.038279 logger.go:93: DEBUG: Retrying because of: dial tcp: lookup api.snapcraft.io on 10.0.0.1:53: read udp 10.0.0.9:32886->10.0.0.1:53: i/o timeout2024/06/16 00:44:36.038318 logger.go:93: DEBUG: ShouldRetryError: dial tcp: lookup api.snapcraft.io on 10.0.0.1:53: read udp 10.0.0.9:32886->10.0.0.1:53: i/o timeout *net.OpError -> true2024/06/16 00:44:37.256740 logger.go:93: DEBUG: Retrying https://api.snapcraft.io/api/v1/snaps/sections, attempt 3, elapsed time=11.252550846s2024/06/16 00:44:37.257414 logger.go:67: DEBUG: > "GET /api/v1/snaps/sections HTTP/1.1\r\nHost: api.snapcraft.io\r\nUser-Agent: snapd/2.62-5 (series 16; classic; devmode) debian/ (amd64) linux/6.7.12-amd64\r\nAccept: application/hal+json\r\nSnap-Device-Capabilities: default-tracks\r\nX-Ubuntu-Architecture: amd64\r\nX-Ubuntu-Classic: true\r\nX-Ubuntu-Series: 16\r\nX-Ubuntu-Wire-Protocol: 1\r\nAccept-Encoding: gzip\r\n\r\n"2024/06/16 00:44:47.262074 logger.go:93: DEBUG: Retrying because of: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)2024/06/16 00:44:47.262122 logger.go:93: DEBUG: ShouldRetryError: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers) *http.httpError -> true2024/06/16 00:44:47.262147 logger.go:93: DEBUG: Retrying https://api.snapcraft.io/api/v1/snaps/sections, attempt 4, elapsed time=21.257978416s2024/06/16 00:44:47.262718 logger.go:67: DEBUG: > "GET /api/v1/snaps/sections HTTP/1.1\r\nHost: api.snapcraft.io\r\nUser-Agent: snapd/2.62-5 (series 16; classic; devmode) debian/ (amd64) linux/6.7.12-amd64\r\nAccept: application/hal+json\r\nSnap-Device-Capabilities: default-tracks\r\nX-Ubuntu-Architecture: amd64\r\nX-Ubuntu-Classic: true\r\nX-Ubuntu-Series: 16\r\nX-Ubuntu-Wire-Protocol: 1\r\nAccept-Encoding: gzip\r\n\r\n"2024/06/16 00:44:57.266023 logger.go:93: DEBUG: Retrying because of: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)2024/06/16 00:44:57.266068 logger.go:93: DEBUG: ShouldRetryError: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers) *http.httpError -> true2024/06/16 00:44:57.266098 logger.go:93: DEBUG: Retrying https://api.snapcraft.io/api/v1/snaps/sections, attempt 5, elapsed time=31.261926872s2024/06/16 00:44:57.266764 logger.go:67: DEBUG: > "GET /api/v1/snaps/sections HTTP/1.1\r\nHost: api.snapcraft.io\r\nUser-Agent: snapd/2.62-5 (series 16; classic; devmode) debian/ (amd64) linux/6.7.12-amd64\r\nAccept: application/hal+json\r\nSnap-Device-Capabilities: default-tracks\r\nX-Ubuntu-Architecture: amd64\r\nX-Ubuntu-Classic: true\r\nX-Ubuntu-Series: 16\r\nX-Ubuntu-Wire-Protocol: 1\r\nAccept-Encoding: gzip\r\n\r\n"2024/06/16 00:44:57.268379 logger.go:93: DEBUG: The retry loop for https://api.snapcraft.io/api/v1/snaps/sections finished after 5 retries, elapsed time=31.264210422s, status: Get "https://api.snapcraft.io/api/v1/snaps/sections": dial tcp: lookup api.snapcraft.io on 10.0.0.1:53: read udp 10.0.0.9:34178->10.0.0.1:53: i/o timeout2024/06/16 00:44:57.268417 logger.go:93: DEBUG: Catalog refresh failed: Get "https://api.snapcraft.io/api/v1/snaps/sections": dial tcp: lookup api.snapcraft.io on 10.0.0.1:53: read udp 10.0.0.9:34178->10.0.0.1:53: i/o timeout.2024/06/16 00:44:57.268597 stateengine.go:149: state ensure error: Get "https://api.snapcraft.io/api/v1/snaps/sections": dial tcp: lookup api.snapcraft.io on 10.0.0.1:53: read udp 10.0.0.9:34178->10.0.0.1:53: i/o timeout2024/06/16 00:45:00.888134 daemon.go:519: gracefully waiting for running hooks2024/06/16 00:45:00.888181 daemon.go:521: done waiting for running hooks2024/06/16 00:45:03.890166 overlord.go:515: Released state lock filedaemon stop requested to wait for socket activation
My admittedly naive reading of this is that snapd is trying to contact, "https://api.snapcraft.io/api/v1/snaps/sections" and is failing. If I paste the url in a browser, the page appears with what seem like reasonable values.

One guess, a security issue? snapd is not allowed to talk on the internet? I see warnings in the syslog

Code:

"AppArmor status: apparmor is enabled but some kernel features are missing: dbus, network"
But everything I read says this means snapd is *not* being restricted by apparmor.

I have tried a number of random fixes for problems found on the interwebs but so far none of them have moved the needle past, "error: unable to contact snap store". Are there fixes I should try and/or more information I can provide?

Statistics: Posted by jrv — 2024-06-16 04:58 — Replies 0 — Views 9



Viewing all articles
Browse latest Browse all 3441

Trending Articles