I’m running into an issue where the timestamp is incorrect when the system starts up. I am running on a setup where the machine could be off for days at a time. Its internet connection is via a USB hotspot that is powered by the device. The hotspot therefore takes a few seconds to startup.
I’m able to see my device through the Balena dashboard but all my https calls are failing. They are failing because the system clock is incorrect. When I ssh to the device and run
date the result is from many months ago.
I’m able to resolve this issue by restarting chronyd via
systemctl restart chronyd
My theory is that because the hotspot takes time to warmup that the system has already made all of it’s attempts to update its clock. As the docs say this happens in the first 8 seconds
For the device’s initial sync, the first four requests are sent at an interval of two seconds or less, before transitioning to the approximate four and half hour polling interval.
After that it won’t try again for 4.5 hours.
I tried to update
/etc/chrony.conf to change the interval to be 2^8 seconds instead of 2^14 seconds. However, I get the following error when I try to save the changes.
‘/etc/chrony.conf’ Read-only file system
I don’t see any settings that I can change in config.json. It looks like you can only set the NTP servers but not the time.
Any ideas on how I can change this interval to be more frequent for to fire after an internet connection is detected?