I am working on ntp. I have to connect to some external NTP server to get my system date updated. The issue is that ntpd Daemon is always using my local clock (127.127.1.0) and it is not using the NTP server that I have provided in ntp.conf. I am using 123.108.225.6 as NTP server and I am able to ping this IP. For the purpose of testing i executed ntpdate but i got the following result.
[root@commander_a ~]# sudo ntpdate -dv 123.108.225.6
18 Nov 06:11:47 ntpdate[4781]: ntpdate [email protected] Fri Aug 28 07:43:22 UTC 2015 (1)
Looking for host 123.108.225.6 and service ntp
host found : 123.108.225.6
transmit(123.108.225.6)
transmit(123.108.225.6)
transmit(123.108.225.6)
transmit(123.108.225.6)
transmit(123.108.225.6)
123.108.225.6: Server dropped: no data
server 123.108.225.6, port 123
stratum 0, precision 0, leap 00, trust 000
refid [123.108.225.6], delay 0.00000, dispersion 64.00000
transmitted 4, in filter 4
reference time: 00000000.00000000 Sun, Dec 31 1899 18:00:00.000
originate timestamp: 00000000.00000000 Sun, Dec 31 1899 18:00:00.000
transmit timestamp: d9f6e989.bbb84d5f Wed, Nov 18 2015 6:11:53.733
filter delay: 0.00000 0.00000 0.00000 0.00000
0.00000 0.00000 0.00000 0.00000
filter offset: 0.000000 0.000000 0.000000 0.000000
0.000000 0.000000 0.000000 0.000000
delay 0.00000, dispersion 64.00000
offset 0.000000
18 Nov 06:11:55 ntpdate[4781]: no server suitable for synchronization found
[root@commander_a ~]# ^C
I find it strange that "originate timestamp" it is taking some old time. It is not my local system time.
disable stats server 123.108.225.6 server 127.127.1.0 # local clock fudge 127.127.1.0 stratum 10
I have spent lot of time finding the solution, But i didnt succeeded. Please help me !!
This website maybe helpful to you
ntpdate: no server suitable for synchronization found
I use this command to modify the date
sudo date -s "$(wget -qSO- --max-redirect=0 google.com 2>&1 | grep Date: | cut -d' ' -f5-8)Z"