NTP Sync not Syncing?


Hi All,

I’m having a little difficulty with time sync. I realize it occurs in the host OS https://docs.resin.io/runtime/time/, but even though I’m setting the timezone (my application needs correct local time), the OS clock isn’t syncing. I’ve tried the dbus-send to systemd, that just confirms that it hasn’t sync’d.

The time on the device log files is a weird portion of an hour out of sync, not a nice multiple of hours as I would see with a simple TZ error.

Is there a way to see what problems the host OS is having with Sync?

Raspberry Pi Zero W
Pimoroni InkyPhat card
ResinOS: Resin OS 2.2.0+rev1
Local Wifi NATd, and connecting fine to Resin.IO dashboard.
Docker image: resin/rpi-raspbian


Typically this issue is caused by problems accessing NTP servers on UDP port 123. Is this port being blocked by your firewall?


No, other Windows 10 PC and Ubuntu VM’s update ok. [[https://www.cs.cmu.edu/~help/networking/ntp.html](https://www.cs.cmu.edu/~help/networking/ntp.html)].

edit. Installed ntpdate in the container and it runs and syncs fine from the terminal.

root@b92e483:/app# ntpdate time1.google.com
20 Sep 23:50:24 ntpdate[313]: step time server offset 4684686.221160 sec
root@b92e483:/app# ntpdate time1.google.com
20 Sep 23:50:39 ntpdate[314]: adjust time server offset 0.001058 sec


By default resinOS uses e.g. 0.resinio.pool.ntp.org can you successfully synchronize to that server?


Yes, it syncs with that server using ntpdate, just doesn’t work at start.
Interestingly, the local time inside the container is set, but cron remains in UTC.

EDIT: Some more useful info here: Tricks and Traps, Cron in containers