Closed imamouse111 closed 5 months ago
If it helps...
root@XXXXXXXXX:~# gravity-sync push
โ Initializing Gravity Sync (4.0.7)
โ Loading gravity-sync.conf
โ Detecting local Pi-hole installation
โ Detecting remote Pi-hole installation
โ Gravity Sync remote peer is configured
โ Evaluating arguments: PUSH
ยป Remote target pi@192.168.86.154
โ Validating pathways to Pi-hole
โ Validating pathways to DNSMASQ
โ Hashing the remote Gravity Database
โ Comparing to the local Gravity Database
โ Hashing the remote DNS Records
โ Comparing to the local DNS Records
! DNS CNAMEs not detected on the local Pi-hole
! Static DHCP Addresses not detected on the local Pi-hole
! No replication is required at this time
โ Gravity Sync PUSH exited after 6 seconds
root@XXXXXXXXX:~# gravity-sync auto
โ Initializing Gravity Sync (4.0.7)
โ Loading gravity-sync.conf
โ Detecting local Pi-hole installation
โ Detecting remote Pi-hole installation
โ Gravity Sync remote peer is configured
โ Evaluating arguments: AUTOMATE
โ Customizing service file username
โ Customizing service file executable path
โ Randomizing service timers
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down
โ Moving systemd timer into place
โ Moving systemd service into place
โ Reloading systemd daemonSystem has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down
โ Reloading systemd daemon
For anyone else who come across this issue in the future, it seems the Pihole Docker container can not use systemd, which gravity-sync uses to run 'auto'. My solution was to run a cron job on the Docker container every 6hrs with the command 'gravity-sync push' to sync with my bare metal Pihole.
You shouldn't be installing Gravity Sync inside of the Pi-hole container, but directly on the container host, which it then has logic to manage the container operations. Otherwise whenever you restart/update the image everything about it will be overwritten.
You shouldn't be installing Gravity Sync inside of the Pi-hole container, but directly on the container host, which it then has logic to manage the container operations. Otherwise whenever you restart/update the image everything about it will be overwritten.
So you're saying, if I have a Pihole Docker container on a Linux host, Gravity Sync should be installed on the Linux host? Not the Pihole container?
Yes
Thank you, I'll try that.
Yes
Just wanted to say thanks again, this absolutely worked. Appreciate your help.
Looking for advice on how to get 'gravity-sync auto' to work in Pihole Docker instance. I can get 'gravity-sync push' to work but 'auto' throws back 'System has not been booted with systemd as init system (PID 1). Can't operate.' And that's after I've already installed systemd.
Here's my basic setup:
Pihole Docker (Openmediavault (Portainer (Pihole + macvlan))) = Primary 192.168.86.222 Pihole Raspi (bare metal) = Secondary 192.168.86.154
Here is my Docker Compose YAML:
I'm able to install Gravity Sync on the raspi pretty easily using this guide, but installing in the Docker Pihole requires a whole process that involves doing a 'docker exec' into the container and installing the OpenSSH client and systemd, but it eventually worked. I got Gravity Sync to successfully install but I don't want to have to re-do this process everytime I restart the container (suggestions on how to avoid this are welcome).
Per the above guide, I was able to modify the gravity-sync.conf files on each instance as below. I'm not totally confident I've done everything correctly, so these honestly might be my main issue.
Raspi Pihole gravity-sync.conf:
Docker Pihole gravity-sync.conf:
If someone can share how they were able to get this to work or point out what I'm doing wrong, I would be eternally grateful. Thanks in advance =)