Network brewblox_default not found and 'docker-compose up -d traefik influx history'

Hi!

Ive tried for a while get my spark running and ive been searching the forum like a maniac.
Anyone with an idea whats wrong?

pi@raspberrypi:~/brewblox $ brewblox-ctl setup
INFO Stopping services…
Removing network brewblox_default
INFO Checking ports…
This directory already contains a docker-compose.yml file. Do you want to keep it? [Press ENTER for default value ‘yes’]

This directory already contains Redis datastore files. Do you want to keep them? [Press ENTER for default value ‘yes’]

This directory already contains InfluxDB history files. Do you want to keep them? [Press ENTER for default value ‘yes’]

This directory already contains Traefik gateway files. Do you want to keep them? [Press ENTER for default value ‘yes’]

INFO Setting .env values…
INFO Checking Avahi config…
INFO Copying docker-compose.shared.yml…
INFO Stopping services…
Removing network brewblox_default
WARNING: Network brewblox_default not found.
INFO Pulling docker images…
Pulling redis … done
Pulling spark-one … done
Pulling history … done
Pulling ui … done
Pulling influx … done
Pulling traefik … done
Pulling eventbus … done
INFO Starting configured services…
Building with native build. Learn about native build in Compose here: https://docs.docker.com/go/compose-native-build/
Creating network “brewblox_default” with the default driver
Creating brewblox_traefik_1 …
Creating brewblox_history_1 …
Creating brewblox_influx_1 … error

Creating brewblox_traefik_1 … done
Creating brewblox_history_1 … done
3e81487df9b8556218a8bbfc0ce9e90ae10-init/merged: no such file or directory

ERROR: for influx Cannot create container for service influx: error creating overlay mount to /var/lib/docker/overlay2/70ec82c9bd2fba18121c1cf30b17f3e81487df9b8556218a8bbfc0ce9e90ae10-init/merged: no such file or directory
ERROR: Encountered errors while bringing up the project.
Command ‘docker-compose up -d traefik influx history’ returned non-zero exit status 1.
pi@raspberrypi:~/brewblox $

EDIT

pi@raspberrypi:~/brewblox $ sudo systemctl status docker
● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: e
Active: active (running) since Thu 2021-02-11 09:24:23 GMT; 45min ago
Docs: https://docs.docker.com
Main PID: 532 (dockerd)
Tasks: 36
CGroup: /system.slice/docker.service
├─532 /usr/sbin/dockerd -H fd://
└─545 docker-containerd --config /var/run/docker/containerd/container

Feb 11 10:08:33 raspberrypi dockerd[532]: time=“2021-02-11T10:08:33.514709024Z”
Feb 11 10:08:33 raspberrypi dockerd[532]: time=“2021-02-11T10:08:33.523804007Z”
Feb 11 10:08:49 raspberrypi dockerd[532]: time=“2021-02-11T10:08:49.079894433Z”
Feb 11 10:08:50 raspberrypi dockerd[532]: time=“2021-02-11T10:08:50.294082805Z”
Feb 11 10:08:51 raspberrypi dockerd[532]: time=“2021-02-11T10:08:51.944835801Z”
Feb 11 10:08:51 raspberrypi dockerd[532]: time=“2021-02-11T10:08:51.953426775Z”
Feb 11 10:09:35 raspberrypi dockerd[532]: time=“2021-02-11T10:09:35.732498436Z”
Feb 11 10:09:37 raspberrypi dockerd[532]: time=“2021-02-11T10:09:37.763749762Z”
Feb 11 10:09:38 raspberrypi dockerd[532]: time=“2021-02-11T10:09:38.412534942Z”
Feb 11 10:09:38 raspberrypi dockerd[532]: time=“2021-02-11T10:09:38.421685915Z”
lines 1-20/20 (END)

The network not found error is normal - services weren’t running when it tried to stop them.

The error while starting influx looks like it’s caused by a minor file corruption.

You could run docker system prune --volumes --force. To verify, you can run docker-compose up influx. If that starts without errors press Ctrl-C and re-run setup.

Hi!
Right now I’m not at the computer anymore but before I left it I tried docker run hello-world and it didn’t work anymore. I’ve had trouble with its installation when i follow your guide. My work around was after a clean install with raspbian lite I ran the “sudo apt install docker.io” wich made docker run fine and then I tried brewblox installation which left me here.

I will get back to ya later. Thank you for your insanely quick reply.

What problems were you having with the install guide? The docker.io version installed by apt tends to be outdated, which is why it’s not recommended.

I redone it all according to your guide except adding some reboots in between since docker always fucked up. Now it’s this…

Also I got this before only warning.

What OS / architecture are you using? (Debian, Raspberry Pi OS, Ubuntu, 32-bit / 64-bit)?

What was the problem with Docker?

What is the output from these commands?

docker version
sudo apt list --installed | grep docker

If this is a new install, it may be advisable to remove the brewblox dir to get rid of any corrupted files, and then run brewblox-ctl install / brewblox-ctl setup again.

Script warnings about PATH are typically caused by ~/.bashrc not including /home/$USER/.local/bin on path. Normally this is fixed by running exec $SHELL --login, but some custom OS versions have irregular .bashrc files.

cat ~/.bashrc | nc termbin.com 9999 will upload yours.

rPi 3B used raspbian pi imager and lite version.

Want the termbin output too?

Yes, it’s the URL to where it uploaded the file.

https://termbin.com/qpqg

Problems with docker went away after I changed from putty to other telnet client :hugs:

Before it complaind on docker dependencies and compose. Can’t remember em all…

Docker version looks good.

Looks like I requested the wrong file. Path extension on a Pi is stored in the ~/.profile file.

You can check it yourself - it should include

# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/.local/bin" ] ; then
    PATH="$HOME/.local/bin:$PATH"
fi

That’s a new one, but I must admit I never used putty anyway - I prefer having a terminal where I can just type ssh pi@raspberrypi.local.

Looks right to me

1 Like

Getting closer :+1:t2:

It looks like only history, influx, and traefik are up. Did you run brewblox-ctl up after setup?

Neither brewblox-ctl up
Building with native build. Learn about native build in Compose here: https://docs.docker.com/go/compose-native-build/
Creating network “brewblox_default” with the default driver
ERROR: layer does not exist
Command ‘docker-compose up -d’ returned non-zero exit status 1.

nor the brewblox-ctl flash worked.
Removing brewblox_influx_1 … error

ERROR: for brewblox_influx_1 removal of container 1ffaabaf82a7876d8fdba4ebe07c1755dd1b75bbb7e8f57d4843dd777fa6dec8 is already in progress
Removing network brewblox_default
WARNING: Network brewblox_default not found.
INFO Flashing Spark…
Triggering dfu on port /dev/serial/by-id/usb-Particle_P1_20003c001947383434353030-if00
[Error: Error Resource temporarily unavailable Cannot lock port]
Flashing P1…
Flashing System 1 file…/app/node_modules/particle-cli/dist/lib/log.js:34
verbosqA7t+8Hh1UXPmaFw)u3x/gcXgm3lXhg
^

SyntaxError: Unexpected token ‘+’
at wrapSafe (internal/modules/cjs/loader.js:992:16)
at Module._compile (internal/modules/cjs/loader.js:1040:27)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:1097:10)
at Module.load (internal/modules/cjs/loader.js:941:32)
at Function.Module._load (internal/modules/cjs/loader.js:782:14)
at Module.require (internal/modules/cjs/loader.js:965:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object. (/app/node_modules/particle-cli/dist/app/cli.js:7:13)
at Module._compile (internal/modules/cjs/loader.js:1076:30)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:1097:10)
Command ‘docker run -it --rm --privileged -v /dev:/dev brewblox/firmware-flasher:edge flash’ returned non-zero exit status 1.

At a guess, there are still some leftovers from the earlier problems.

To clean up all running containers and then remove all compose images:

brewblox-ctl kill
docker image rm -f $(docker-compose images -q)

Afterwards, try brewblox-ctl up again.

Didn’t work for me… Asks for argument.
Kill and remove all? Found this, does it work?
‘docker container stop $(docker container ls -aq)’
docker container prune --force
docker image prune --all --force
docker volume prune --force

Are you in the brewblox dir when running compose commands? Compose image command by itself should yield a handful of hashes.

brewblox-ctl kill is a shortcut for that stop command. Run brewblox-ctl -v kill`, and it’ll print the shell commands it uses.

Image prune --all will also work. Idea is to remove the images to get rid of corrupted data, and then re-download and start.

https://github.com/coreos/bugs/issues/1808 suggests that removing /var/lib/docker may do the trick.