Unable to download edgexfoundry snap


#1

Hi,

Not sure if this is transient network outage or something else, but I’m unable to download or install a snap (edgexfoundry). See:

$ snap install edgexfoundry
error: cannot perform the following tasks:
- Download snap "edgexfoundry" (329) from channel "stable" (received an unexpected http response code (503) when trying to download https://fastly.cdn.snapcraft.io/download-origin/fastly/AZGf0KNnh8aqdkbGATNuRuxnt1GNRKkV_329.snap?token=1552366800_e51778a92d05eb9b1e9d9f24309a108893acbda8)
$ snap download edgexfoundry
Fetching snap "edgexfoundry"
error: received an unexpected http response code (503) when trying to download https://fastly.cdn.snapcraft.io/download-origin/fastly/AZGf0KNnh8aqdkbGATNuRuxnt1GNRKkV_329.snap?token=1552366800_e51778a92d05eb9b1e9d9f24309a108893acbda8

I have this from snapd logs with SNAPD_DEBUG=1:

Mar 11 20:51:58 snapd[980]: taskrunner.go:420: DEBUG: Running task 11744 on Do: Download snap "edgexfoundry" (329) from channel "stable"
Mar 11 20:51:58 snapd[980]: store.go:1320: DEBUG: Available deltas returned by store: []
Mar 11 20:51:58 snapd[980]: store.go:1352: DEBUG: Starting download of "/var/lib/snapd/snaps/edgexfoundry_329.snap.partial".
Mar 11 20:51:58 snapd[980]: retry.go:41: DEBUG: Retrying https://api.snapcraft.io/api/v1/snaps/download/AZGf0KNnh8aqdkbGATNuRuxnt1GNRKkV_329.snap, attempt 1, elapsed time=10.194µs
Mar 11 20:51:58 snapd[980]: retry.go:41: DEBUG: Retrying https://login.ubuntu.com/api/v2/tokens/refresh, attempt 1, elapsed time=14.601µs
Mar 11 20:51:59 snapd[980]: retry.go:53: DEBUG: The retry loop for https://login.ubuntu.com/api/v2/tokens/refresh finished after 1 retries, elapsed time=723.124572ms, status: 200
Mar 11 20:53:01 snapd[980]: retry.go:41: DEBUG: Retrying https://api.snapcraft.io/api/v1/snaps/download/AZGf0KNnh8aqdkbGATNuRuxnt1GNRKkV_329.snap, attempt 2, elapsed time=1m3.030388165s
Mar 11 20:54:03 snapd[980]: store.go:1368: DEBUG: download of "https://api.snapcraft.io/api/v1/snaps/download/AZGf0KNnh8aqdkbGATNuRuxnt1GNRKkV_329.snap" failed: &store.DownloadError{Code:503, URL:(*url.URL)(0xc4204ee500)}
Mar 11 20:54:03 snapd[980]: task.go:303: DEBUG: 2019-03-11T20:54:03-05:00 ERROR received an unexpected http response code (503) when trying to download https://fastly.cdn.snapcraft.io/download-origin/fastly/AZGf0KNnh8aqdkbGATNuRuxnt1GNRKkV_329.snap?token=1552366800_e51778a92d05eb9b1e9d9f24309a108893acbda8
Mar 11 20:54:10 snapd[980]: api.go:1077: Installing snap "edgexfoundry" revision unset
Mar 11 20:54:10 snapd[980]: store.go:2235: DEBUG: Deltas enabled. Adding header Snap-Accept-Delta-Format: xdelta3
Mar 11 20:54:10 snapd[980]: retry.go:41: DEBUG: Retrying https://api.snapcraft.io/v2/snaps/refresh, attempt 1, elapsed time=3.304µs
Mar 11 20:54:11 snapd[980]: retry.go:53: DEBUG: The retry loop for https://api.snapcraft.io/v2/snaps/refresh finished after 1 retries, elapsed time=876.9885ms, status: 200
Mar 11 20:54:11 snapd[980]: daemon.go:296: DEBUG: pid=21743;uid=1000;socket=/run/snapd.socket; POST /v2/snaps/edgexfoundry 892.11858ms 202
Mar 11 20:54:11 snapd[980]: taskrunner.go:420: DEBUG: Running task 11756 on Do: Ensure prerequisites for "edgexfoundry" are available
Mar 11 20:54:11 snapd[980]: taskrunner.go:420: DEBUG: Running task 11757 on Do: Download snap "edgexfoundry" (329) from channel "stable"
Mar 11 20:54:11 snapd[980]: store.go:1320: DEBUG: Available deltas returned by store: []
Mar 11 20:54:11 snapd[980]: store.go:1352: DEBUG: Starting download of "/var/lib/snapd/snaps/edgexfoundry_329.snap.partial".
Mar 11 20:54:11 snapd[980]: retry.go:41: DEBUG: Retrying https://api.snapcraft.io/api/v1/snaps/download/AZGf0KNnh8aqdkbGATNuRuxnt1GNRKkV_329.snap, attempt 1, elapsed time=6.951µs
Mar 11 20:55:13 snapd[980]: retry.go:41: DEBUG: Retrying https://api.snapcraft.io/api/v1/snaps/download/AZGf0KNnh8aqdkbGATNuRuxnt1GNRKkV_329.snap, attempt 2, elapsed time=1m1.556918077s
Mar 11 20:56:15 snapd[980]: store.go:1368: DEBUG: download of "https://api.snapcraft.io/api/v1/snaps/download/AZGf0KNnh8aqdkbGATNuRuxnt1GNRKkV_329.snap" failed: &store.DownloadError{Code:503, URL:(*url.URL)(0xc4204ef880)}
Mar 11 20:56:15 snapd[980]: task.go:303: DEBUG: 2019-03-11T20:56:15-05:00 ERROR received an unexpected http response code (503) when trying to download https://fastly.cdn.snapcraft.io/download-origin/fastly/AZGf0KNnh8aqdkbGATNuRuxnt1GNRKkV_329.snap?token=1552366800_e51778a92d05eb9b1e9d9f24309a108893acbda8

Any idea what’s wrong or what I can do to download this snap?

Thanks,
Ian


#2

That feel like an issue on CDN, sometimes CDN returns errors if the CDN edge server has a problem retrieving the binary from origin server. I can download edgexfoundry from Taipei.

In order to identify the issue is on CDN or the origin snap hosting server, you can try to run the snapd with SNAPPY_STORE_NO_CDN=1, to directly download the snap without CDN.

If you can download the snap without CDN, you can collect more information by opening https://www.fastly-debug.com/ from the target device and report an issue on CDN.


#3

Thanks for the pointer about disabling the CDN as it definitely seems the issue was related to the CDN.
Regardless, I am now able to download the snap with the CDN.