balenaEngine fails on Raspbian

Hello everyone,

if I install the balenaEngine on Raspbian, running any image fails. Do you know how to solve this issue?

Steps to reproduce:

  1. Flash Raspbian on a micro SD card using the Raspberry Pi Imager (Raspbian Release 2020-02-13)
  2. Add an empty file called SSH to the micro SD card to enable SSH
  3. Insert the SD card into a Raspberry Pi 4 and connect using SSH (credentials: User: pi, Password: raspberry)
  4. For skipping authentication, log in as root using sudo -i
  5. Install balenaEngine by running curl -sfL https://balena.io/engine/install.sh | sh
  6. Start the demon (backgrounded) using balena-engine-daemon & (see this post)
  7. Try to run an image: balena-engine run armhf/hello-world (Docker Hub)

Expected Results:

A “Hello World” text should be printed to the terminal. Similar to the one produced by Docker’s official hello-world image.

Actual results:

root@raspberrypi:~# balena-engine run armhf/hello-world
INFO[2020-04-20T14:55:07.086962609+01:00] ignoring event                                module=libcontainerd namespace=moby topic=/containers/create type="*events.ContainerCreate"
INFO[0132] shim balena-engine-containerd-shim started    address=/containerd-shim/moby/348e13e3da036faa15b398625aa21a97efa23c5ce79ba3aa5d4799b7727f64d5/shim.sock debug=false module=containerd/tasks pid=901
INFO[0132] shim reaped                                   id=348e13e3da036faa15b398625aa21a97efa23c5ce79ba3aa5d4799b7727f64d5 module=containerd/tasks
INFO[2020-04-20T14:55:07.603121457+01:00] ignoring event                                module=libcontainerd namespace=moby topic=/containers/delete type="*events.ContainerDelete"
ERRO[2020-04-20T14:55:08.116249750+01:00] 348e13e3da036faa15b398625aa21a97efa23c5ce79ba3aa5d4799b7727f64d5 cleanup: failed to delete container from containerd: no such container 
ERRO[2020-04-20T14:55:08.116375027+01:00] Handler for POST /v1.35/containers/348e13e3da036faa15b398625aa21a97efa23c5ce79ba3aa5d4799b7727f64d5/start returned error: unable to find "net_prio" in controller set: unknown 
balena-engine: Error response from daemon: unable to find "net_prio" in controller set: unknown.
ERRO[0001] error waiting for container: context canceled 

Notes:

I checked that the image works as expected if I connect to a Raspberry Pi running balenaOS through the webconsole provided by the balenaCloud. The error only occurs it I install balenaEngine on Raspbian. The balenaEngine on Raspbian also fails for images provided by the balenalib, e.g. balena-engine run -it balenalib/raspberrypi4-64-alpine /bin/bash.

1 Like

Hello Christian, thanks for the detailed note and troubleshooting!

Looking at that error, it seems that it may be related to this issue: https://github.com/docker/for-linux/issues/545

The solutions, according to those comments, is to downgrade systemd (seems the error began appearing at version 240), or to recompile the kernel with CONFIG_CGROUP_NET_PRIO enabled.

I have pinged the balenaEngine maintainer though, to see if there is anything else that we can do to work around the issue. Thanks!

Thank you for the suggestion. Since the images work as expected using a current version of Docker, I hoped this could be fixed by updating or fixing the balenaEngine.

I’m not really a big fan of downgrading systemd or recompiling the kernel. Downgrading parts of the system may always cause new side effects and due to the current Corona crisis, I unfortunately have no easy physical access to most of my devices, which means reflashing the SD cards with a self-compiled kernel is not really an option for me.

I confirm the same issue.
Running latest version of plain docker on Raspbian works as expected.
Running latest version of balena-Engine fails with:

balena-engine: Error response from daemon: unable to find “net_prio” in controller set: unknown.
ERRO[0001] error waiting for container: context canceled

This issue had been resolved for docker a year ago, as you may see in the same issue report:

When do you expect to port the fix to balenaEngine?

2 Likes

Guys, do we have a solution to this issue?

A small update here, guys. I noticed that balena-engine have new releases in the github page (https://github.com/balena-os/balena-engine/releases/tag/v18.9.13). I just test that one and it worked nicely!! Maybe that can be a solution to you too, @Vitaliy? :wink:

Maybe it’s a good thing to update this page to the latest release? https://www.balena.io/engine/

1 Like

Hello Jairo,

Thank you for pointing that out, v17.12.0 is definitely not the latest release and it should be updated, we will be updating it now on the website
Glad that the upgrade worked for you

best regards,

Juan

with 18.9.13 i still get the same error:
balena-engine: Error response from daemon: unable to find “net_prio” in controller set: unknown.

Are you running it with --network=host ?

hm this sounds like https://github.com/docker/for-linux/issues/545
which should be fixed since balena-engine 18.09.6

what version of systemd are you running?

Are you sure? I think I got the error before reloading the daemon or something like that. Maybe try restarting the system just to move that possibility out of the way?

Hi Jairo,

Can you confirm your version of systemd? if it’s 420, that’s a known issue that was corrected with the newer version of balenaEngine 18.09.6.

John

Hi there,

Just wanted to check in again and see if you were able to check that version or not. Please do let us know!

Hi Juan

What is the status of this?
I am unsure how to install the latest version, like which version (arch) to use, so an updated install script would be very much appreciated!

Thanks in advance

We are updating the engine site and we’ll let you know shortly. If you want this now though I’d recommend you download the install script and manually edit the tag variable found on line 3 to be:

tag="v18.9.7"

I tried to reproduce the problem again using the “steps to reproduce” from my original post. It seems to be working now. From my perspective, the issue is now resolved. Thank you very much for your support.