IP Change and how to recover

Hi Bob
I need some help from on high.
I had an issue with my wifi and it reset my ip values, which has knocked out my sparks.
I rebuilt my pi, to get the new address and then installed brewblox, after which I imported my old snap shot.
Now when I open brewblox, it shows waiting for Datastore. Any ideas on how to proceed?
Thanks in advance

Reinstalling to get new IP addresses seems a bit overkill - you can always recreate static DHCP leases in your router.

Are your services running? Does it work if you try HTTP or hard refresh? If not, could you please run brewblox-ctl log?

Hi Bob
The pi already has a new ip, as for the sparks, i do not know their ips to assign on the router.
To be honest, I am not sure how to check if the services are running they all say up to date. I am also not sure how to hard refresh.

Here is the log file as is https://termbin.com/b0ec

It looks like your datastore is a bit corrupted. This can be easily fixed.

brewblox-ctl down
sudo cp -p redis/appendonly.aof redis/appendonly.aof.bak
docker run --rm -v "$(pwd)/redis:/data" --entrypoint redis-check-aof redis:6.0 --fix /d
brewblox-ctl up

Hi Bob i get cannot open file

pi@Truffles:~/brewblox $ docker run --rm -v “$(pwd)/redis:/data” --entrypoint redis-check-aof redis:6.0 --fix /d
Cannot open file: /d

That’s the forum formatting the line weird. The line below (ata/appendonly.aof) should be included.

So should be this:
pi@Truffles:~/brewblox $ docker run --rm -v “$(pwd)/redis:/data” --entrypoint redis-check-aof redis:6.0 --fix /data/appendonly.aof ?
If so still waiting datastore, see log


Many thanks

Yes. What was the output of the command?

pi@Truffles:~/brewblox $ docker run --rm -v “$(pwd)/redis:/data” --entrypoint redis-check-aof redis:6.0 --fix /data/appendonly.aof
0x 17878ab: Expected prefix ‘*’, got: ’
AOF analyzed: size=24674304, ok_up_to=24672427, diff=1877
This will shrink the AOF from 24674304 bytes, with 1877 bytes, to 24672427 bytes
Continue? [y/N]: Aborting…

Run brewblox-ctl down and then the docker run command again.
When it says “Continue? [y/N]”, type y and then Enter.

it does the abort immediately, co no chance to hit y

Ah, you’ll need an additional argument then:
docker run -it --rm -v "$(pwd)/redis:/data" --entrypoint redis-check-aof redis:6.0 --fix /data/appendonly.aof

pi@Truffles:~/brewblox $ docker run -it --rm -v “$(pwd)/redis:/data” --entrypoint redis-check-aof redis:6.0 --fix /data/appendonly.aof
docker: Error response from daemon: create “/home/pi/brewblox/redis: ““/home/pi/brewblox/redis” includes invalid characters for a local volume name, only “[a-zA-Z0-9][a-zA-Z0-9_.-]” are allowed. If you intended to pass a host directory, use absolute path.
See ‘docker run --help’.

See edit in previous post: before I copy-pasted the command with wrong quotes. They should be straight, not curled.

like this?
docker run --rm -v “$[pwd]/redis:/data” --entrypoint redis-check-aof redis:6.0 --fix /data/appendonly.aof

This worked, many thanks
docker run -it --rm -v “$(pwd)/redis:/data” --entrypoint redis-check-aof redis:6.0 --fix /data/appendonly.aof

1 Like