Install on a Raspberry / connection refused

Hello,

I tried to install snapd on my raspberry pi B, on Raspbian 9.
The initial installation didn’t throw any error:

sudo apt install snapd

However, the next step is not working:

sudo snap install core

It returns the following error:

error: cannot communicate with server: Get http://localhost/v2/changes/1: dial unix /run/snapd.socket: connect: connection refused

And if I try it again, I get a:

Illegal instruction

I tried removing / purging the package, rebooting, updating everything, etc, nothing worked.

Any idea what could cause this please ?

When/where does this appear?

Can you run file /usr/lib/snapd/snapd ?

Illegal instruction

is when I try to run a 2nd time:

sudo snap install core

Here is the result I get for your command:

file /usr/lib/snapd/snapd
/usr/lib/snapd/snapd: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically >linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 3.2.0, BuildID[sha1]=b2556ee2ef5aa865b88f40c395b18b1e1c973c6c, stripped

Can you post the output of sudo journalctl -u snapd --no-pager ?

-- Logs begin at Thu 2016-11-03 17:16:45 GMT, end at Thu 2021-01-28 10:12:42 GMT. --
Jan 27 12:30:53 lopi systemd[1]: Started Snappy daemon.
Jan 27 12:30:55 lopi /usr/lib/snapd/snapd[489]: daemon.go:250: DEBUG: init done in 138.048ms
Jan 27 12:30:55 lopi /usr/lib/snapd/snapd[489]: daemon.go:251: started snapd/2.21-2+deb9u1 (series 16; classic; devmode) raspbian/9 (armhf).
Jan 27 12:30:55 lopi snapd[489]: 2021/01/27 12:30:55.850899 daemon.go:251: started snapd/2.21-2+deb9u1 (series 16; classic; devmode) raspbian/9 (armhf).
Jan 27 12:33:56 lopi /usr/lib/snapd/snapd[489]: api.go:879: Installing snap "core" revision unset
Jan 27 12:33:56 lopi snapd[489]: 2021/01/27 12:33:56.227260 api.go:879: Installing snap "core" revision unset
Jan 27 12:33:57 lopi /usr/lib/snapd/snapd[489]: daemon.go:176: DEBUG: uid=0;@ POST /v2/snaps/core 1.248921557s 202
Jan 27 12:33:57 lopi /usr/lib/snapd/snapd[489]: taskrunner.go:353: DEBUG: Running task 1 on Do: Download snap "core" (10584) from channel "stable"
Jan 27 12:38:50 lopi /usr/lib/snapd/snapd[489]: taskrunner.go:353: DEBUG: Running task 2 on Do: Fetch and check assertions for snap "core" (10584)
Jan 27 12:40:23 lopi /usr/lib/snapd/snapd[489]: taskrunner.go:353: DEBUG: Running task 3 on Do: Mount snap "core" (10584)
Jan 27 12:40:29 lopi /usr/lib/snapd/snapd[489]: taskrunner.go:353: DEBUG: Running task 4 on Do: Copy snap "core" data
Jan 27 12:40:29 lopi /usr/lib/snapd/snapd[489]: taskrunner.go:353: DEBUG: Running task 5 on Do: Setup snap "core" (10584) security profiles
Jan 27 12:40:31 lopi /usr/lib/snapd/snapd[489]: taskrunner.go:353: DEBUG: Running task 6 on Do: Make snap "core" (10584) available to the system
Jan 27 12:40:31 lopi /usr/lib/snapd/snapd[489]: task.go:303: DEBUG: 2021-01-27T12:40:31Z INFO Requested daemon restart.
Jan 27 12:40:32 lopi systemd[1]: snapd.service: Service hold-off time over, scheduling restart.
Jan 27 12:40:32 lopi systemd[1]: Stopped Snappy daemon.
Jan 27 12:40:32 lopi systemd[1]: Started Snappy daemon.
Jan 27 12:40:32 lopi /usr/lib/snapd/snapd[1042]: cmd.go:105: DEBUG: restarting into "/snap/core/current/usr/lib/snapd/snapd"
Jan 27 12:40:34 lopi systemd[1]: snapd.service: Main process exited, code=killed, status=4/ILL
Jan 27 12:40:34 lopi systemd[1]: snapd.service: Unit entered failed state.
Jan 27 12:40:34 lopi systemd[1]: snapd.service: Failed with result 'signal'.
Jan 27 12:40:35 lopi systemd[1]: snapd.service: Service hold-off time over, scheduling restart.
Jan 27 12:40:35 lopi systemd[1]: Stopped Snappy daemon.
Jan 27 12:40:35 lopi systemd[1]: Started Snappy daemon.
Jan 27 12:40:35 lopi /usr/lib/snapd/snapd[1048]: cmd.go:105: DEBUG: restarting into "/snap/core/current/usr/lib/snapd/snapd"
Jan 27 12:40:35 lopi systemd[1]: snapd.service: Main process exited, code=killed, status=4/ILL
Jan 27 12:40:35 lopi systemd[1]: snapd.service: Unit entered failed state.
Jan 27 12:40:35 lopi systemd[1]: snapd.service: Failed with result 'signal'.
Jan 27 12:40:35 lopi systemd[1]: snapd.service: Service hold-off time over, scheduling restart.
Jan 27 12:40:35 lopi systemd[1]: Stopped Snappy daemon.
Jan 27 12:40:35 lopi systemd[1]: Started Snappy daemon.
Jan 27 12:40:36 lopi /usr/lib/snapd/snapd[1053]: cmd.go:105: DEBUG: restarting into "/snap/core/current/usr/lib/snapd/snapd"
Jan 27 12:40:36 lopi systemd[1]: snapd.service: Main process exited, code=killed, status=4/ILL
Jan 27 12:40:36 lopi systemd[1]: snapd.service: Unit entered failed state.
Jan 27 12:40:36 lopi systemd[1]: snapd.service: Failed with result 'signal'.
Jan 27 12:40:36 lopi systemd[1]: snapd.service: Service hold-off time over, scheduling restart.
Jan 27 12:40:36 lopi systemd[1]: Stopped Snappy daemon.
Jan 27 12:40:36 lopi systemd[1]: Started Snappy daemon.
Jan 27 12:40:36 lopi /usr/lib/snapd/snapd[1059]: cmd.go:105: DEBUG: restarting into "/snap/core/current/usr/lib/snapd/snapd"
Jan 27 12:40:36 lopi systemd[1]: snapd.service: Main process exited, code=killed, status=4/ILL
Jan 27 12:40:36 lopi systemd[1]: snapd.service: Unit entered failed state.
Jan 27 12:40:36 lopi systemd[1]: snapd.service: Failed with result 'signal'.
Jan 27 12:40:36 lopi systemd[1]: snapd.service: Service hold-off time over, scheduling restart.
Jan 27 12:40:36 lopi systemd[1]: Stopped Snappy daemon.
Jan 27 12:40:36 lopi systemd[1]: Started Snappy daemon.
Jan 27 12:40:37 lopi /usr/lib/snapd/snapd[1064]: cmd.go:105: DEBUG: restarting into "/snap/core/current/usr/lib/snapd/snapd"
Jan 27 12:40:37 lopi systemd[1]: snapd.service: Main process exited, code=killed, status=4/ILL
Jan 27 12:40:37 lopi systemd[1]: snapd.service: Unit entered failed state.
Jan 27 12:40:37 lopi systemd[1]: snapd.service: Failed with result 'signal'.
Jan 27 12:40:37 lopi systemd[1]: snapd.service: Service hold-off time over, scheduling restart.
Jan 27 12:40:37 lopi systemd[1]: Stopped Snappy daemon.
Jan 27 12:40:37 lopi systemd[1]: snapd.service: Start request repeated too quickly.
Jan 27 12:40:37 lopi systemd[1]: Failed to start Snappy daemon.
Jan 27 12:40:37 lopi systemd[1]: snapd.service: Unit entered failed state.
Jan 27 12:40:37 lopi systemd[1]: snapd.service: Failed with result 'signal'.

Interesting, what does running file /snap/core/current/usr/lib/snapd/snapd show?

sudo file /snap/core/current/usr/lib/snapd/snapd
/snap/core/current/usr/lib/snapd/snapd: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, stripped

if you say “pi B” do you mean a first generation pi ?

Yes, indeed, it is the first generation (I bought it in 2014) and used it as a home webserver since.

Snapd is a new dependency of the letsencrypt certbot software for SSLs.

well, this is actual ARMv6 hardware that “normal armhf” can not run on (which is the very reason raspbian exists, they broke the armhf definition (that requires v7) and recompiled debians armhf for v6) the CPU will not be able to run armv7 instructions which are used inside the core snap …

1 Like

I was afraid of a limitation like this, indeed.
Thanks the explanation!