Raspberry DNS problems with ArchLinuxARM and DNSSEC

Some of my Raspberry PIs are offline for some days/weeks. After that the system time is off big time.

I thought: We have systemd-timesyncd. That should be fixed after a few minutes. But DNSSEC doesn't work when the time is off this much.

Problem analysis

For example: ping google.com results in

ping: google.com: Name or service not known

But dig works. (When you have it installed! Not the default on archlinuxarm.)

The log in the systemd journal helps here:

DNSSEC validation failed for question google.com IN A: signature-expired

And the same for all the ntp domains:

DNSSEC validation failed for question ntp.org IN DS: no-signature

Possible solutions

a) use an IP address in timesyncd config

Add some of the ntp ip addresses to /etc/systemd/timesyncd.conf

NTP=185.120.22.23 185.126.112.98 104.248.145.172 46.29.176.73

After that restart timesyncd with systemctl restart systemd-timesyncd.

But the timesyncd always gets a time out:

systemd-timesyncd[295]: Timed out waiting for reply from 185.120.22.23:123 (185.120.22.23).

b) disable dnssec in resolved

Add this line at the end of /etc/systemd/resolved.conf:

DNSSEC=false

After that restart resolved with systemctl restart systemd-resolved.

And after some minutes and the next update from timesyncd you have the correct system time again.

Conclusion

Disabling DNSSEC is not what I wanted, but atm I don't see another way to solve this reliably.

Raspberry PI tty1 monitor autostart

We wanted to show a logfile on a display connected to a Raspberry PI.

As described in https://raymii.org/s/tutorials/Run_software_on_tty1_console_instead_of_login_getty.html we created the file: /etc/systemd/system/getty@tty1.service.d/override.conf with this content:

[Service]
ExecStart=
ExecStart=-/home/pi/monitor.sh
StandardInput=tty
StandardOutput=tty

[Install]
WantedBy=multi-user.target

The script started by systemd gets the current file in /home/pi/logs and tails it:

#!/bin/bash
(
  cd /home/pi/logs
  sleep 10
  fn=$(ls -t1 | head -n1)
  tail -F ${fn}
)

To reload and enable the service:

systemctl daemon-reload
systemctl restart getty@tty1.service