gravity-sync icon indicating copy to clipboard operation
gravity-sync copied to clipboard

Gravity Sync only working in one direction.

Open tomevison opened this issue 3 years ago โ€ข 3 comments

Issue Description gravity-sync only seems to be working in one direction:

[not working] Commands executed from PI01 to PI02:

`b@PIH01:~$ gravity-sync push โˆž Initializing Gravity Sync (4.0.3) โœ“ 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 [email protected] โœ“ Validating pathways to Pi-hole โœ“ Validating pathways to DNSMASQ โˆž Hashing the remote Gravity Databasemd5sum: /etc/pihole/gravity.db: No such file or directory โœ“ Hashing the remote Gravity Database โœ“ Comparing to the local Gravity Database ! Differences detected in the Gravity Database ! DNS Records not detected on the remote Pi-hole ! DNS CNAMEs not detected on the local Pi-hole ! Replication of Pi-hole settings is required โœ“ Performing backup of remote Gravity Database โœ“ Performing backup of local Gravity Database โœ“ Checking Gravity Database copy integrity โœ— Pushing the local Gravity Database

b@PIH01:~$ gravity-sync pull โˆž Initializing Gravity Sync (4.0.3) โœ“ Loading gravity-sync.conf โœ“ Detecting local Pi-hole installation โœ“ Detecting remote Pi-hole installation โœ“ Gravity Sync remote peer is configured โœ“ Evaluating arguments: PULL ยป Remote target [email protected] โœ“ Validating pathways to Pi-hole โœ“ Validating pathways to DNSMASQ โˆž Hashing the remote Gravity Databasemd5sum: /etc/pihole/gravity.db: No such file or directory โœ“ Hashing the remote Gravity Database โœ“ Comparing to the local Gravity Database ! Differences detected in the Gravity Database ! DNS Records not detected on the remote Pi-hole ! DNS CNAMEs not detected on the local Pi-hole ! Replication of Pi-hole settings is required โœ“ Performing backup of local Gravity Database โœ“ Performing backup of remote Gravity Database โœ“ Checking Gravity Database copy integrity โœ— Pulling the remote Gravity Database`

[working] Commands executed from PI02 to PI01: `b@PIH02:~$ gravity-sync push โˆž Initializing Gravity Sync (4.0.3) โœ“ 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 [email protected] โœ“ 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 ! No replication is required at this time โˆž Gravity Sync PUSH exited after 18 seconds

b@PIH02:~$ gravity-sync pull โˆž Initializing Gravity Sync (4.0.3) โœ“ Loading gravity-sync.conf โœ“ Detecting local Pi-hole installation โœ“ Detecting remote Pi-hole installation โœ“ Gravity Sync remote peer is configured โœ“ Evaluating arguments: PULL ยป Remote target [email protected] โœ“ 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 ! No replication is required at this time โˆž Gravity Sync PULL exited after 13 seconds`

Configuration Details Same on Both hosts:

  • Raspberry Pi 3B
  • Ubuntu 22.04 LTS
  • Gravity Sync (4.0.3)
  • PiHole v5.10 (Running on Docker 20.10.14)

tomevison avatar May 01 '22 02:05 tomevison

@tomevison I believe I had this issue too when I first updated to GS4, and consequently installed GS on my primary node (as before it was only on the backup and only did compare/pull via cron).

Are you able to SSH from Pi1 to Pi2 (ssh -p 22 [email protected] from your Pi1? I was not. Something didn't create/copy correctly when it installed so I had to manually add the RSA key of Pi1 to Pi2 authorized_keys

ringhidb avatar May 11 '22 18:05 ringhidb

I also have this issue. The SSH key seems to be added properly. Any other ideas? :(

gravufo avatar Aug 31 '22 13:08 gravufo

Fixed it, turns out the sudo setup was not passwordless on the other end, so it was probably blocking on that. Once I was able to sudo on both machines without password, it worked perfectly.

gravufo avatar Aug 31 '22 16:08 gravufo