-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
set-system-time ignores chrony #12
Comments
This the output of the command set-system-time uses:
|
The log lines The real problem here seems to be that something is producing bad datetime data, time jumps forward to March 12. Note that this would happen with any loss of internet connectivity, so imho that is the real problem to solve, otherwise it makes no sense to keep If this is easy to reproduce I suggest you add logging of what chrony is actually outputting for example with |
We could change set-system-time behavior so that a single zero sources count does not activate it but ntp needs to be unavailable for a longer period. |
Oh I missed the message that set-system-time has set time four times. But there's still something odd going on with the sources: your first |
Thanks for the tips. I can reproduce this every time in a fresh installation. I think I have find out why set-system-time is ignoring chrony:
It seems that sources marked as '?' are ignored and that makes sense.
I will try more GPSs |
I don't have an RPI with me ATM, so im guessing things out of my head, but I'm wondering if there would be some kind of race condition between |
@FredericGuilbault check the screenshot, where set-system-time says it has set the time. From the log it looks like it jumps forward exactly one month. Now that it is February that is 2419200 seconds. I suspect your source just produces navigation.datetime off by one month. Earlier you said Time coming from GPS is ok - was that literally just time or date and time? |
This is really weird. Time and date from GPS are OK and navigation.datetime key is also correct in the server. It is only after set-system-time sets the system time when there is the 1 month jump but the navigation.datetime key keeps the right date/time. I will make more tests this afternoon. Data comes from a Raymarine E80 display by Seatalk1 connection. I will switch to NMEA 0183 and CAN connection and try another GPS. |
Rather log the input and the set tume command, another source may just work and we won’t be any wiser. |
I am getting more and more suspicious of the plugin. This is my navigation.datetime key values before enabling set-system-time plugin:
after enabling the plugin this is the SK log, the entry"[object Object]" is in red:
this is the service log:
and this is how the navigation.datetime key looks now:
as you can see the values is still ok. If I use that date/time with date command everything works:
It seems that is the plugin who adds a unit to the month. Is it working for you? |
I got it! Changed to CAN connection and after 8 iterations set-system-time keeps the right date and everything works. this is the key value:
as you can see the difference with the seatalk1 source is the amount of decimals in seconds. Any idea how to fix this? |
I sincerely doubt it is up to the number of decimals. Looking at full data before and after does not work, if seatalk produces always two datagrams in succession and the first one is bad and the second one is good. You’ll just see the second, good one’s data. At least that is one possibility. There are two st datagrams with datetime, I think the bug is at compare to but if they always come in succession you never see the off by 1 month alue! But the first one is what triggers this plugin. |
Agree, probably that is the bug not the decimals. I will try later adding -1 to the datagrama 54 but I am afraid this is beyond my knowledge of signal k code. Let me know if you want me to make any test. |
tested and confirmed! |
chrony installed and working OK synchronizing time at boot in Debian bullseye.
set-system-time plugin enabled:
even though chrony is present and working the plugin is setting time:
sources:
chrony log:
This has critical side effects as failing handshakes when updating repositories:
disabling set-system-time and restarting chrony everything works OK:
The text was updated successfully, but these errors were encountered: