ha-dockermon icon indicating copy to clipboard operation
ha-dockermon copied to clipboard

Error starting container on RPI Zero

Open Shaun-Harrison opened this issue 5 years ago • 6 comments

When using docker-compose to bring up the container I get the following error

Starting ha_dockermon ... error

ERROR: for ha_dockermon Cannot start service docker_mon: failed to create endpoint ha_dockermon on network bridge: failed to add the host (vetha02c8e5) <=> sandbox (veth8a752e8) pair interfaces: operation not supported

ERROR: for docker_mon Cannot start service docker_mon: failed to create endpoint ha_dockermon on network bridge: failed to add the host (vetha02c8e5) <=> sandbox (veth8a752e8) pair interfaces: operation not supported ERROR: Encountered errors while bringing up the project.

Here is my docker-compose.yml

docker_mon:
    image: philhawthorne/ha-dockermon:arm
    container_name: ha_dockermon
    restart: always
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    ports:
      - 8126:8126

This config works fine on RPI4 & RPI3

Shaun-Harrison avatar Jan 29 '20 18:01 Shaun-Harrison

Thanks Shaun,

I'll see if I can get Docker running on one of my Zero's and test it out.

In the mean time, do you mind changing your docker compose to this to test?

docker_mon:
    image: philhawthorne/ha-dockermon:edge
    container_name: ha_dockermon
    restart: always
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    ports:
      - 8126:8126

The edge tag has been updated to support docker manifests, so it should pull in the right version for your Pi. There's also a new base image jump which may solve the issue.

philhawthorne avatar Jan 29 '20 21:01 philhawthorne

Hi!

I googled further about the error, and seen that people have cleared the error with

 docker network prune 

I tried this out and it did work, as the container now built, but it was stuck in a restart loop, with nothing in the log

Added your suggested code in but sadly after rebuilding the image and container its still giving me the restart loop

Shaun-Harrison avatar Jan 30 '20 09:01 Shaun-Harrison

Any updates on this please?

Shaun-Harrison avatar Mar 30 '20 18:03 Shaun-Harrison

Hi @Shaun-Harrison

I installed Docker on my RpiZero over the weekend, and tried to run it. Unfortunately although the docker image is there, when running the container HA-Dockermon doesn't event start. My assumption here is that there is an issue running on the Zero completely, and it most likely won't be supported for the time being 😢

I'll leave this open as "help wanted" if someone wants to take a stab and get it working, but for now running on a Zero won't work.

philhawthorne avatar Mar 30 '20 21:03 philhawthorne

Hello @philhawthorne

Thank you for testing this out, hopefully someone will be able to get it working!

Shaun-Harrison avatar Mar 31 '20 07:03 Shaun-Harrison

fyi, fwiw: Testing today with Raspberry Pi OS on a Pi Zero W, I got exit code 139 with :edge, :edge-arm, and :arm.

$ docker-compose up
Creating ha_dockermon ... done
Attaching to ha_dockermon
ha_dockermon exited with code 139
More details...

Ran update in raspbi-config. Then did:

sudo apt update
sudo apt install docker.io docker-compose -y

sudo usermod -a -G docker pi
sudo reboot now

Set up the docker-compose file:

cat > docker-compose.yml <<EOM
docker_mon:
    image: philhawthorne/ha-dockermon:edge-arm
    container_name: ha_dockermon
    restart: always
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    ports:
      - 8126:8126
EOM

docker pull philhawthorne/ha-dockermon:edge-arm

And ran it:

$ docker-compose up
Creating ha_dockermon ... done
Attaching to ha_dockermon
ha_dockermon exited with code 139

$ docker ps -a
CONTAINER ID        IMAGE                                 COMMAND                  CREATED             STATUS                           PORTS               NAMES
a5a26be9afd8        philhawthorne/ha-dockermon:edge-arm   "/usr/bin/entry.sh /…"   56 seconds ago      Restarting (139) 8 seconds ago                       ha_dockermon

solvaholic avatar Oct 18 '20 16:10 solvaholic