ntp
ntp copied to clipboard
i/o timeout error and bogus values
The following is the output of a program querying the ntp servers 0.centos.pool.ntp.org
and 1.centos.pool.ntp.org
while sleeping for a few seconds between queries.
I've run into two kinds of errors
-
Failed to reach NTP server: 1.centos.pool.ntp.org error: read udp 10.4.67.150:37627->171.66.97.126:123: i/o timeout
. I've tried increasing the timeout to 10 seconds from the default of 5 but that hasn't helped. Please share any suggestions you might have. -
And the other is for invalid values Reached NTP server: 1.centos.pool.ntp.org offset: 3754691965.127657. Where the
3754691965.127657
is way higher than the expected offset.
I've been using the 0.3 release but have experienced the same errors in the 0.2 release.
Reached NTP server: 0.centos.pool.ntp.org offset: 19.631600
Failed to reach NTP server: 1.centos.pool.ntp.org error: read udp 10.4.67.150:57557->104.155.144.4:123: i/o timeout
Reached NTP server: 0.centos.pool.ntp.org offset: 19.626120
Reached NTP server: 1.centos.pool.ntp.org offset: 19.636507
Reached NTP server: 0.centos.pool.ntp.org offset: 19.631544
Failed to reach NTP server: 1.centos.pool.ntp.org error: read udp 10.4.67.150:38249->104.155.144.4:123: i/o timeout
Reached NTP server: 0.centos.pool.ntp.org offset: 19.626148
Failed to reach NTP server: 1.centos.pool.ntp.org error: read udp 10.4.67.150:34181->162.248.241.94:123: i/o timeout
Reached NTP server: 0.centos.pool.ntp.org offset: 19.631553
Reached NTP server: 1.centos.pool.ntp.org offset: 19.636571
Reached NTP server: 0.centos.pool.ntp.org offset: 19.633790
Reached NTP server: 1.centos.pool.ntp.org offset: 3754691965.127657
Reached NTP server: 0.centos.pool.ntp.org offset: 19.635017
Reached NTP server: 1.centos.pool.ntp.org offset: 19.626531
Reached NTP server: 0.centos.pool.ntp.org offset: 19.626131
Reached NTP server: 1.centos.pool.ntp.org offset: 19.634028
Reached NTP server: 0.centos.pool.ntp.org offset: 19.631843
Failure count: 6 bogus values: 4
I tried increasing the timeout further to 30 seconds and that didn't help either. I noticed that the queries that don't timeout return very quickly and increasing the timeout hasn't helped reduce the queries that timeout.
After using the validate function (2) is gone. One the timeout errors remain.
I'm unable to reproduce either of the issues you discovered using those NTP server addresses. Can you post a sample program that reproduces your issue?
I frequently get errors like this. I've added ntp query to my server monitoring (doing every 5 minutes), running on ten-ish machines: https://github.com/julian7/sensu-base-checks/blob/master/cmd/sensu-base-checks/time.go (the code since updated, but released code still doesn't have the loop mentioned later)
Every now and then I'm receiving a random timeout.
I just checked ntpdate.c and it looks like it probes and adds all the items the DNS query responds to the servers list, and it does query all of them.
Now I'm looping through all the IPs I'm receiving from net.LookupIP
, until I get a valid answer. Better than querying only one, but it doesn't do triangulation either ;)
I know this issue is a bit old but i am encountering the same issue at the moment in my application.
I found out that the teimout mostly occured during excessive ntp requests. Multiple requests per second but it also occured during some single requests every hour.
Could it be that the ntp Server we are quering have issues?
Hello, I was having a similar issue to this. I fixed it by removing the limited
options in my ntp.conf
on the line with restrict -4 default...
. I believe this option would limit the rate of request and cause issue in certain cases. Don't forget to restart the service once you make that modification.