rancher / os

Tiny Linux distro that runs the entire OS as Docker containers
https://rancher.com/docs/os/v1.x/en/
Apache License 2.0
6.44k stars 655 forks source link

kernel reports TIME_ERROR in NTP logs #2678

Open niusmallnan opened 5 years ago

niusmallnan commented 5 years ago

RancherOS Version: (ros os version) v1.5.1 Where are you running RancherOS? (docker-machine, AWS, GCE, baremetal, etc.) ALL

[rancher@ip-172-16-16-140 ~]$ sudo system-docker logs ntp
2019/02/15 15:13:15 Writing file to "/etc/ntp.conf"
2019/02/15 15:13:15 Wrote file to "/etc/ntp.conf"
time="2019-02-15T15:13:15Z" level=info msg="Wrote file /etc/ntp.conf to filesystem" 
+ echo 'starting in one shot mode to fix large time differences'
starting in one shot mode to fix large time differences
+ ntpd -gq
15 Feb 15:13:15 ntpd[12]: ntpd 4.2.8p12@1.3728-o Thu Oct 25 18:43:20 UTC 2018 (1): Starting
15 Feb 15:13:15 ntpd[12]: Command line: ntpd -gq
15 Feb 15:13:15 ntpd[12]: proto: precision = 0.142 usec (-23)
15 Feb 15:13:15 ntpd[12]: Listen and drop on 0 v6wildcard [::]:123
15 Feb 15:13:15 ntpd[12]: Listen and drop on 1 v4wildcard 0.0.0.0:123
15 Feb 15:13:15 ntpd[12]: Listen normally on 2 lo 127.0.0.1:123
15 Feb 15:13:15 ntpd[12]: Listen normally on 3 eth0 172.16.16.140:123
15 Feb 15:13:15 ntpd[12]: Listen normally on 4 lo [::1]:123
15 Feb 15:13:15 ntpd[12]: Listen normally on 5 eth0 [fe80::41d:ebff:fea7:99c2%2]:123
15 Feb 15:13:15 ntpd[12]: Listening on routing socket on fd #22 for interface updates
15 Feb 15:13:22 ntpd[12]: ntpd: time set -0.149650 s
ntpd: time set -0.149650s
starting long running nptd
+ echo 'starting long running nptd'
+ exec ntpd --nofork -g
15 Feb 15:13:22 ntpd[1]: ntpd 4.2.8p12@1.3728-o Thu Oct 25 18:43:20 UTC 2018 (1): Starting
15 Feb 15:13:22 ntpd[1]: Command line: ntpd --nofork -g
15 Feb 15:13:22 ntpd[1]: proto: precision = 0.109 usec (-23)
15 Feb 15:13:22 ntpd[1]: Listen and drop on 0 v6wildcard [::]:123
15 Feb 15:13:22 ntpd[1]: Listen and drop on 1 v4wildcard 0.0.0.0:123
15 Feb 15:13:22 ntpd[1]: Listen normally on 2 lo 127.0.0.1:123
15 Feb 15:13:22 ntpd[1]: Listen normally on 3 eth0 172.16.16.140:123
15 Feb 15:13:22 ntpd[1]: Listen normally on 4 lo [::1]:123
15 Feb 15:13:22 ntpd[1]: Listen normally on 5 eth0 [fe80::41d:ebff:fea7:99c2%2]:123
15 Feb 15:13:22 ntpd[1]: Listening on routing socket on fd #22 for interface updates
15 Feb 15:13:22 ntpd[1]: kernel reports TIME_ERROR: 0x41: Clock Unsynchronized
15 Feb 15:13:22 ntpd[1]: kernel reports TIME_ERROR: 0x41: Clock Unsynchronized
Jawenba commented 5 years ago

I test in rancheros v1.4.3,find the same error , ping 0.pool.org.cn is disconected, then I modify ntp.conf server to china pools, commit, the time zone is ok.

Rancheroo commented 4 years ago

I find the same in ROS v1.5.1

However when I switch to ubuntu console using ros console switch

and install ntp utils apt update && apt install ntp I can see it is synchronised

ntpq -pn
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
*203.52.62.212   .gPPS.           1 u  303 1024  377   12.592    0.009  73.601
+27.124.125.250  162.159.200.1    4 u  667 1024  377   53.329   -0.036   1.863
+150.101.186.48  172.22.254.53    2 u  641 1024  377   43.350    0.964   2.701
-220.158.215.21  203.4.241.5      2 u  625 1024  377   45.890   -9.369   4.229
Rancheroo commented 4 years ago

The message seems to be a false positive

the0neWhoKnocks commented 3 years ago

Seeing the same issue. I've been on 1.5.1, just upgraded to 1.5.6 and am still seeing the error. I tailed /var/log/syslog and am seeing the correct time being logged on boot, but at some point ntpd kicks in and switches the clock over to another zone and I'm seeing

Jan 20 18:23:39 rancheros ntpd[1]: kernel reports TIME_ERROR: 0x41: Clock Unsynchronized
Jan 20 18:23:39 rancheros ntpd[1]: kernel reports TIME_ERROR: 0x41: Clock Unsynchronized