Raspberry died while doing update

Hi Bob
Was running an update today when my network crashed. This then stopped the Raspberry being able to boot.
I reinstalled os and then brexblox. After that tried to load a previous snapshot. It would not work then checked and it looks as though snapshot name is now different. So changed the name and reloaded.

Now when I go to brewblox on webpage I see no dashboards, just a new page.

Here is the log https://termbin.com/ugnl

Please can you advise?
Many thanks

Could you please upload your snapshot somewhere? If it predates the name change, it may be quite old. I can have a look at what the issue is, but compatibility degrades if it’s very outdated.

Hi Bob
Do you have an ftp or something for me to load it to? The file is dated April 2022 - so not that old I don’t think.
Many thanks

A file sharing service like https://mega.io/ will work.

Hi Bob
Does this work for you?

Cheers

That looks like you requested me to upload a file.

How about this one?1.23 GB file on MEGA
cheers

1 Like

Your snapshot seems perfectly valid. Going back to your log, it does not have any user services active. I suspect it didn’t use the snapshot during installation.
I did have to update the ctl package to fix an error.

I suggest removing the “new” installation, and reloading from snapshot with the below commands:

cd
cd brewblox
brewblox-ctl down

cd
mv ./brewblox ./brewblox_bak
brewblox-ctl install --snapshot brewblox.tar.gz

cd brewblox
brewblox-ctl update-ctl
brewblox-ctl up

If it then works as expected, you can remove the brewblox_bak directory with sudo rm -rf ~/brewblox_bak

Thanks Bob
Did as suggested, but got this when i ran brewblox-ctl up

pi@raspberrypi:~/brewblox $ brewblox-ctl up
stat /home/pi/brewblox/docker-compose.shared.yml: no such file or directory
Command 'docker compose up -d ’ returned non-zero exit status 1.

Cheers

This suggests that the install did not succeed. What was its output?

It produced the full _bak directory.

When I tried a log I got this:
pi@raspberrypi:~/brewblox $ brewblox-ctl log
INFO Log file: /home/pi/brewblox/brewblox.log
INFO Writing Brewblox .env values…
INFO Writing software version info…
INFO Writing active containers…
INFO Writing docker compose configuration…
[Errno 2] No such file or directory: ‘docker-compose.yml’

This looks like brewblox-ctl install failed. Where do you have the snapshot file?

I put it in \home\pi and called brewblox.tar.gz, as it was originally created. Should it be renamed to brewblox-snapshot.tar.gz?

The name doesn’t matter, as long as it matches the --snapshot {file} argument of brewblox-ctl install.

Could you please run these commands, and copy the terminal output here?

cd
sudo rm -rf brewblox
brewblox-ctl install --snapshot brewblox.tar.gz

cd brewblox
ls

pi@raspberrypi:~/brewblox $ cd
pi@raspberrypi:~ $ sudo rm -rf brewblox
pi@raspberrypi:~ $ brewblox-ctl install --snapshot brewblox.tar.gz
INFO Downloading brewblox-ctl for edge…
INFO Installing Python packages…
Looking in indexes: Simple index, piwheels - Simple index
Requirement already satisfied: pip in ./.venv/lib/python3.9/site-packages (20.3.4)
Requirement already satisfied: setuptools in ./.venv/lib/python3.9/site-packages (44.1.1)
Collecting wheel
Using cached https://www.piwheels.org/simple/wheel/wheel-0.40.0-py3-none-any.whl (64 kB)
Installing collected packages: wheel
Successfully installed wheel-0.40.0
Looking in indexes: Simple index, piwheels - Simple index
Processing ./brewblox-ctl.tar.gz
Installing build dependencies … done
Getting requirements to build wheel … done
Preparing wheel metadata … done
Collecting pyserial<4.0,>=3.5
Using cached https://www.piwheels.org/simple/pyserial/pyserial-3.5-py2.py3-none-any.whl (90 kB)
Collecting click<9.0.0,>=8.1.3
Using cached https://www.piwheels.org/simple/click/click-8.1.3-py3-none-any.whl (96 kB)
Collecting python-dotenv[cli]<0.22.0,>=0.21.1
Using cached https://www.piwheels.org/simple/python-dotenv/python_dotenv-0.21.1-py3-none-any.whl (19 kB)
Collecting requests<3.0.0,>=2.28.2
Downloading https://www.piwheels.org/simple/requests/requests-2.31.0-py3-none-any.whl (62 kB)
|████████████████████████████████| 62 kB 201 kB/s
Collecting psutil<6.0.0,>=5.9.4
Using cached https://www.piwheels.org/simple/psutil/psutil-5.9.5-cp39-abi3-linux_armv7l.whl (276 kB)
Collecting packaging<24.0,>=23.0
Using cached https://www.piwheels.org/simple/packaging/packaging-23.1-py3-none-any.whl (48 kB)
Collecting zeroconf<0.48.0,>=0.47.3
Using cached https://www.piwheels.org/simple/zeroconf/zeroconf-0.47.4-cp39-cp39-manylinux_2_31_armv7l.whl (2.1 MB)
Collecting pyusb<2.0.0,>=1.2.1
Using cached https://www.piwheels.org/simple/pyusb/pyusb-1.2.1-py3-none-any.whl (58 kB)
Collecting ruamel.yaml<0.18.0,>=0.17.21
Using cached https://www.piwheels.org/simple/ruamel-yaml/ruamel.yaml-0.17.26-py3-none-any.whl (109 kB)
Collecting configobj<6.0.0,>=5.0.6
Using cached https://www.piwheels.org/simple/configobj/configobj-5.0.8-py2.py3-none-any.whl (35 kB)
Collecting six
Using cached https://www.piwheels.org/simple/six/six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting charset-normalizer<4,>=2
Using cached charset_normalizer-3.1.0-py3-none-any.whl (46 kB)
Collecting certifi>=2017.4.17
Using cached https://www.piwheels.org/simple/certifi/certifi-2023.5.7-py3-none-any.whl (156 kB)
Collecting urllib3<3,>=1.21.1
Using cached https://www.piwheels.org/simple/urllib3/urllib3-2.0.2-py3-none-any.whl (123 kB)
Collecting idna<4,>=2.5
Using cached https://www.piwheels.org/simple/idna/idna-3.4-py3-none-any.whl (61 kB)
Collecting ruamel.yaml.clib>=0.2.7
Using cached https://www.piwheels.org/simple/ruamel-yaml-clib/ruamel.yaml.clib-0.2.7-cp39-cp39-linux_armv7l.whl (590 kB)
Collecting ifaddr>=0.1.7
Using cached https://www.piwheels.org/simple/ifaddr/ifaddr-0.2.0-py3-none-any.whl (12 kB)
Collecting async-timeout>=3.0.0
Using cached https://www.piwheels.org/simple/async-timeout/async_timeout-4.0.2-py3-none-any.whl (5.8 kB)
Building wheels for collected packages: brewblox-ctl
Building wheel for brewblox-ctl (PEP 517) … done
Created wheel for brewblox-ctl: filename=brewblox_ctl-1.0.0-py3-none-any.whl size=66742 sha256=af7fcab543d2eac64a046641c802c61769a23c49ef27b95cdad61c9e09672e07
Stored in directory: /home/pi/.cache/pip/wheels/1b/09/ba/3379589ccd424ef9a23f59e0d03e479035f385b96de0abd884
Successfully built brewblox-ctl
Installing collected packages: urllib3, six, ruamel.yaml.clib, python-dotenv, ifaddr, idna, click, charset-normalizer, certifi, async-timeout, zeroconf, ruamel.yaml, requests, pyusb, pyserial, psutil, packaging, configobj, brewblox-ctl
Successfully installed async-timeout-4.0.2 brewblox-ctl-1.0.0 certifi-2023.5.7 charset-normalizer-3.1.0 click-8.1.3 configobj-5.0.8 idna-3.4 ifaddr-0.2.0 packaging-23.1 psutil-5.9.5 pyserial-3.5 python-dotenv-0.21.1 pyusb-1.2.1 requests-2.31.0 ruamel.yaml-0.17.26 ruamel.yaml.clib-0.2.7 six-1.16.0 urllib3-2.0.2 zeroconf-0.47.4
Command is about to: Install Brewblox and its dependencies.
Do you want to continue? (yes, no, verbose, dry-run) [press ENTER for default value ‘yes’]
Do you want to install with default settings? [Press ENTER for default value ‘yes’]

INFO Docker is already installed.
INFO pi already belongs to the docker group.
INFO Installing apt packages…
Hit:1 Index of /debian bullseye InRelease
Get:2 Index of /raspbian bullseye InRelease [15.0 kB]
Hit:3 Index of linux/raspbian/ bullseye InRelease
Get:4 Index of /raspbian bullseye/main armhf Packages [13.2 MB]
Fetched 13.2 MB in 10s (1,313 kB/s)
Reading package lists… Done
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
Calculating upgrade… Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
avahi-daemon is already the newest version (0.8-5+deb11u2).
curl is already the newest version (7.74.0-1.3+deb11u7).
libffi-dev is already the newest version (3.3-6).
libssl-dev is already the newest version (1.1.1n-0+deb11u4+rpt1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
INFO Skipped: docker install.
INFO Skipped: adding pi to ‘docker’ group.
Docker Compose version v2.18.1
INFO Fixing Docker IPv6 settings…
INFO Using Docker config file /etc/docker/daemon.json
INFO IPv6 settings are already present. Making no changes.
INFO Setting .env values…
INFO Extracting snapshot to /home/pi/brewblox directory…
tar (child): brewblox.tar.gz: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
Command ‘tar -xzf brewblox.tar.gz -C /tmp/tmpfoovws0v’ returned non-zero exit status 2.
pi@raspberrypi:~ $ cd brewblox
pi@raspberrypi:~/brewblox $ ls
brewblox-ctl.tar.gz
pi@raspberrypi:~/brewblox $

It can’t find the snapshot file. It exists at /home/pi/brewblox.tar.gz ? Otherwise, retry the same commands, but use the complete path (starts with /) to the tar file instead of just brewblox.tar.gz

Hi Bob
Nearly there - managed to get the snapshot back, but now I cannot see one connect to one of the services on web interface - gives bad gateway message. Services seem to be all there in brewblox-ctl.
What am I missing?
Cheers

It may be the containers for the old install are still active. To check, run docker ps.

If you see a double set of services, run docker kill $(docker ps -aq) to kill everything, and then run brewblox-ctl up again

I have tried that, but getting this:
image

and from brewblox-ctl service pull

herms Skipped - Image is already being pulled by …

I am thinking this may be connected to the old spark-one service

Cheers

Could you please run brewblox-ctl log ?