Error installing build-snaps

I’m using the latest 8.0.1 version of snapcraft and I can’t get it past the “Installing build-snaps” step.

Digging into the log it shows the following error:

2024-01-15 22:35:48.595 :: 2024-01-15 22:29:07.457 Installing build-snaps
2024-01-15 22:35:48.595 :: 2024-01-15 22:29:47.492 The http error when checking the store for go is 500 (retries left 5)
2024-01-15 22:35:48.595 :: 2024-01-15 22:30:27.515 The http error when checking the store for go is 500 (retries left 4)
2024-01-15 22:35:48.595 :: 2024-01-15 22:31:07.544 The http error when checking the store for go is 500 (retries left 3)
2024-01-15 22:35:48.595 :: 2024-01-15 22:31:47.572 The http error when checking the store for go is 500 (retries left 2)
2024-01-15 22:35:48.595 :: 2024-01-15 22:32:27.595 The http error when checking the store for go is 500 (retries left 1)
2024-01-15 22:35:48.595 :: 2024-01-15 22:33:07.615 The http error when checking the store for core22 is 500 (retries left 5)
2024-01-15 22:35:48.595 :: 2024-01-15 22:33:47.631 The http error when checking the store for core22 is 500 (retries left 4)
2024-01-15 22:35:48.595 :: 2024-01-15 22:34:27.644 The http error when checking the store for core22 is 500 (retries left 3)
2024-01-15 22:35:48.595 :: 2024-01-15 22:35:07.651 The http error when checking the store for core22 is 500 (retries left 2)
2024-01-15 22:35:48.595 :: 2024-01-15 22:35:47.665 The http error when checking the store for core22 is 500 (retries left 1)

The snapcraft.yaml has a part with the following:

    build-snaps:
      - go/1.21/stable

I appear to be connected to the internet on the build device and the 500 error implies an internal server error.

any proxies involved ?

No proxies. Its a raspberry pi 5 running ubuntu server 23.10 connected over ethernet to a router that connects to a gateway.

I can ping from it without packet loss and the build-packages steps before build-snaps succeeds.

Hi! I have a couple of questions, did this work before and only start failing now, has it worked since reported yesterday? It could be the store doing some load shedding or an actual bug.

When the error is eventually presented a log should be written to disk with useful information for us to figure out more, if you don’t mind and this issue persists, please attach that log file for further investigation (if not possible here, perhaps over at https://github.com/snapcore/snapcraft/issues/new/choose)

Yes it was working. My last release was 16 Dec 2023 which I always do a fresh build for. I’ve also had some more recent successes, but its hard to say an exact date given the build cache.

The error persisted to this morning. I created an issue here: https://github.com/snapcore/snapcraft/issues/4525. I changed the channel of the snapcraft snap to the latest stable 7.x version, but it failed at an earlier step with complaints that it couldn’t inject snapcraft into the build environment.

I tried purge removing the snapcraft and lxd snaps, reinstalling them to their latest stable, and building again and I’m still getting errors:

Creating new base instance from remote                                                    
craft-providers error: failed to inject host's snap 'snapcraft' into target environment.
* Command that failed: 'lxc --project snapcraft exec local:base-instance-snapcraft-buildd-base-v40--fd08e731c976fdc7c5bc -- env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin SNAPCRAFT_MANAGED_MODE=1 snap install /tmp/snapcraft.snap --classic'
* Command exit code: 1
* Command standard error output: b'error: cannot perform the following tasks:\n- Ensure prerequisites for "snapcraft" are available (cannot install system snap "snapd": Post "https://api.snapcraft.io/v2/snaps/refresh": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers))\n'

I can try multipass at some point today or tomorrow, but lxd has always worked better (or at all in the past) for arm64 builds.

Did you by chance install docker recently ? There are known issues with dockers network setup that might have impact on lxd containers …

1 Like

I do have the docker snap installed on the same machine that is current running two containers in the background.

https://documentation.ubuntu.com/lxd/en/latest/howto/network_bridge_firewalld/#prevent-connectivity-issues-with-lxd-and-docker

I confirmed that the network bridge on this system is indeed lxdbr0 with ip address, and used the following solution from your linked documentation:

iptables -I DOCKER-USER -i lxdbr0 -j ACCEPT
iptables -I DOCKER-USER -o lxdbr0 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT

It worked! Thank you!

This makes complete sense as I remember in the past how docker’s changing of iptables rules bypassed ufw rules on an old server. I’m sorry I didn’t think to check that myself.

1 Like