Spark Sim Not connecting

Not sure when it started occurring, but the spark-sim service isn’t connecting with this message “Your Spark service is online, but not connected to your controller”. Only issue is it stops me from performing a backup. Any recommendations on how to correct?

Could you please run brewblox-ctl log

It looks like a bug on our side is the most likely scenario. I’ll check it out and get back to you.

1 Like

I’m failing to reproduce the issue here. If you run brewblox-ctl service pull spark-sim , does it download and use a new version of the image?

It seems to have the latest.

pi@brewblox2:~/brewblox $ brewblox-ctl service pull spark-sim
[+] Pulling 1/1
:heavy_check_mark: spark-sim Pulled 1.0s
Do you want to restart your Brewblox services? [Press ENTER for default value ‘yes’]

[+] Building 0.0s (0/0)
[+] Running 9/0
:heavy_check_mark: Container brewblox-spark-sim-1 Running 0.0s
:heavy_check_mark: Container brewblox-hass-1 Running 0.0s
:heavy_check_mark: Container brewblox-spark-one-1 Running 0.0s
:heavy_check_mark: Container brewblox-ui-1 Running 0.0s
:heavy_check_mark: Container brewblox-victoria-1 Running 0.0s
:heavy_check_mark: Container brewblox-history-1 Running 0.0s
:heavy_check_mark: Container brewblox-eventbus-1 Running 0.0s
:heavy_check_mark: Container brewblox-traefik-1 Running 0.0s
:heavy_check_mark: Container brewblox-redis-1 Running 0.0s

Could you please run the following diagnostics?

docker image inspect -f '{{json .Config.Labels }}'
docker compose exec spark-sim ls /app/firmware

pi@brewblox2:~/brewblox $ docker image inspect -f ‘{{json .Config.Labels }}’ Package brewblox-devcon-spark · GitHub
{“org.opencontainers.image.created”:“2023-05-30T14:28:04.692Z”,“org.opencontainers.image.description”:“Communicating with Spark controllers”,“org.opencontainers.image.licenses”:“GPL-3.0”,“org.opencontainers.image.revision”:“e852f402a733c32945ad0f6c78bb2edec87e65c1”,“org.opencontainers.image.source”:“",“org.opencontainers.image.title”:“brewblox-devcon-spark”,“org.opencontainers.image.url”:“”,“org.opencontainers.image.version”:"edge”}
pi@brewblox2:~/brewblox $ docker compose exec spark-sim ls /app/firmware
bootloader-esp32.bin eeprom system-part1-p1.bin
bootloader-p1.bin firmware.ini system-part1-photon.bin
bootloader-photon.bin flash system-part2-p1.bin
brewblox-arm32.sim flash-bootloader system-part2-photon.bin
brewblox-esp32.bin inspect trigger-dfu
brewblox-p1.bin partition-table-esp32.bin wifi
brewblox-photon.bin serial-trigger.js
pi@brewblox2:~/brewblox $

It appears to have downloaded the 32-bit version of the image. You can try to reset the image by running:

brewblox-ctl down
docker rmi
docker pull
docker image inspect -f '{{ .Architecture }}'

If correct, the last command should print “arm64”.

Seems to still just be pulling the arm version. edge: Pulling from brewblox/brewblox-devcon-spark
a27027e97f26: Already exists
9c18fa1eb965: Already exists
c40b00875c85: Already exists
8f5389f7afcc: Already exists
df127cfcda92: Already exists
c7e2eafee034: Pull complete
3837773fb9e4: Pull complete
f29b38047d4e: Pull complete
3f1c33014218: Pull complete
af04ce28c997: Pull complete
Digest: sha256:b26479c6e6b06714b72bb7c80f5538fa48e895544577c56dd0ea2c31d169be18
Status: Downloaded newer image for Package brewblox-devcon-spark · GitHub
Package brewblox-devcon-spark · GitHub

You can try forcing a platform-specific download with

docker pull --platform linux/arm64/v8

Given that it pulled cached versions for base layers, I suspect something carried over, and it decided pulling arm32 was easier.

It’s looking more like we’ll probably need to remove all images and cached layers, but trying a platform-specific pull is quicker for initial verification.

It seems my Pi may not be happy with life.

! spark-sim The requested image’s platform (linux/arm64) does not match the detected host platform (linux/arm/v8) and no specific platform was requested 0.0s
! spark-one The requested image’s platform (linux/arm64) does not match the detected host platform (linux/arm/v8) and no specific platform was requested 0.0s

Then I guess the next step is to nuke things anyway.

docker kill $(docker ps -aq)
sudo rm -rf /var/lib/docker/*

This will remove all stored docker images and volumes. It will not remove brewblox data.

Then, to check whether it’s happy again:

docker pull --platform linux/arm64/v8

Bob, that did the trick. All is working correct now.