Trouble Getting balena run Command to Work

Hi, I’ve pulled a docker image from dockerhub onto a Raspberry Pi 3 running balenaOS, but I can’t manage to get the balena equivalent of docker run [imageName] to work on the Raspberry Pi 3. Every time I try the command balena run, I get an output that repeats:

balena0: port 1(vethd2d807c) entered blocking state

Or instead of “blocking state” it may be “forwarding state” or “disabled state”. After these messages repeat for maybe 15 lines or so, the container still isn’t running, and I’m back where I started. Any advice?

Hello, would you mind sharing what version of balena-engine and balenaOS you are experiencing this issue on? To obtain the engine version you can simply run balena --version from the Pi

Here’s what balena --version output:

Docker version 18.09.10-dev, build 7cb464a406748016f2df0c31a9851d20456a3d31

Hi there, can you please provide is with a bit more information on what you are trying to achieve? What image are you trying to run? What balenaOS version are you using? Does the image need any special privileges enabled (like dbus, for example)? Any information about your setup will help a lot. What you can also try doing is the usual balena workflow (see reference here: https://www.balena.io/docs/learn/getting-started/raspberrypi3/nodejs/):

  1. Create a docker-compose.yaml (version 2) file that has the image you are trying to run as a service
  2. use the CLI to push the docker-compose to the application where your device is enabled
  3. See if the device runs the release successfully

Let us know about your setup details and what you have tried so far, so we can rule out any potential issues.

I’m trying to run a modified Debian docker image (https://hub.docker.com/r/balenalib/raspberrypi3-debian/). According to balenaCloud, my Rasbperry Pi 3 is running balenaOS 2.46.1+rev1. All I’m trying to accomplish is run this container on my Raspberry Pi 3 because I’d like to access the files of the docker container.

I suspect it may have something to do with the permissions of the Docker Machine not being granted on the balenaOS on the Raspberry Pi 3, but I’m not sure of what I could do to remedy this. Perhaps try a different base image?

I’ll try walking through the balena workflow you’ve recommended to see if that fixes anything.

Hi, you shouldn’t use balena run on the device as the containers are managed by the device Supervisor. Instead you should use the CLI to push a Dockerfile/docker-compose file to the device. The getting started links posted above will walk you through this with a sample project.