This morning, I started the backup server to copy the Domoticz database which is the home automation software running on a Raspberry Pi. Since the backup script is not yet completed, I left the server powered off until an email warned me that it had been 15 days since a backup was made. As expected, the database was copied ot the backup server. On the other hand, the archive created on August 17 had August 15 as the creation date. Moreover, August 15 was the current date according to the system. Suddenly, I was asking myself a few questions.
- Could the hardware clock be so imprecise that it could loses 48 hours in 15 days?
- Was it more likely that the battery in the clock module could already be dead after only two or three months?
- How was it that
systemd-timesyncdhad not synchronized system clock and date?
Leaving the first two questions aside, I looked at the timing synchronization issue. The
systemd-timesyncd service was starting to synchronize the time with an NTP server, but it could not get the date. It took a little too long before I realized that the system could no longer resolve domain names. It was then that I remembered an important change made recently. I had replaced my ISP's domain name servers with quad9 servers.
By placing the IP addresses of the quad9 servers in the
resolv.conf configuration file, the system was able to resolve domain names again. Here is the original configuration file
And I edited it to become.
Surprisingly, the Raspberry Pi which is the host of the home automation system and which also has a static IP address had no problems when the change in DNS servers was made. Here is the configuration file on the Pi.
So the Pi sends DNS requests to the router which is configured to forward domain names to the quad9 servers. I tried using this configuration file with the backup server but that did not work. If this substitution had succeeded, I would have been surprised since the original configuration file of on the backup server and the one on the Raspberry Pi both specify
The lesson is clear, if you change domain name servers then you have to be careful with local network systems with static IP addresses, since they do not get the DNS server address from the local network DHCP server.