LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Red Hat (https://www.linuxquestions.org/questions/red-hat-31/)
-   -   Auto synchronization NTP not worked (https://www.linuxquestions.org/questions/red-hat-31/auto-synchronization-ntp-not-worked-4175541583/)

noureddinek 05-04-2015 09:06 AM

Auto synchronization NTP not worked
 
Hello every body,

This is my first post here and I hope found answer dear you.

I'm searching several time for a solution to my problem described below but in vain.

Indeed, I have an NTP server (17.17.78.172).
And two client NTP (One solaris x86 87.71.8.10 and the other Linux RedHat 104.26.226.10)

Here information about servers:

Solaris x86 (synchronized without porblem):

bash-3.2# uname -a
SunOS host1 5.10 Generic_147441-01 i86pc i386 i86pc
bash-3.2#

bash-3.2# cat /etc/release
Oracle Solaris 10 8/11 s10x_u10wos_17b X86
Copyright (c) 1983, 2011, Oracle and/or its affiliates. All rights reserved.
Assembled 23 August 2011
bash-3.2#

bash-3.2# ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
bnx0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet 87.71.8.10 netmask fffffff0 broadcast 87.71.8.15
ether 44:1e:a1:48:1e:24
...
bash-3.2#

bash-3.2# ntpq -p
remote refid st t when poll reach delay offset disp
==============================================================================
#17.17.78.172 .LOCL. 1 u 185 1024 377 13.50 -1.667 3.23
bash-3.2#

bash-3.2# cat /etc/inet/ntp.conf
server 17.17.78.172
multicastclient 224.0.1.1
driftfile /var/ntp/ntp.drift
bash-3.2#

bash-3.2# cat /var/ntp/ntp.drift
-75.333
bash-3.2#


Linux RedHat (not auto synchronized):

[root@redhat ~]# uname -a
Linux host2 2.6.32-279.el6.x86_64 #1 SMP Wed Jun 13 18:24:36 EDT 2012 x86_64 x86_64 x86_64 GNU/Linux
[root@redhat ~]#

[root@redhat ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.3 (Santiago)
[root@redhat ~]#

[root@redhat ~]# ifconfig -a eth0
eth0 Link encap:Ethernet HWaddr 10:60:4B:AF:7D:98
inet addr:104.26.226.10 Bcast:104.26.226.231 Mask:255.255.255.248
inet6 addr: fe80::1260:4bff:feaf:7d98/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:23808311 errors:0 dropped:0 overruns:0 frame:0
TX packets:37718817 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:10832771125 (10.0 GiB) TX bytes:28517578927 (26.5 GiB)
Interrupt:30 Memory:f4000000-f4012800

[root@redhat ~]#

[root@redhat ~]# ping -c 5 17.17.78.172
PING 17.17.78.172 (17.17.78.172) 56(84) bytes of data.
64 bytes from 17.17.78.172: icmp_seq=1 ttl=122 time=6.11 ms
64 bytes from 17.17.78.172: icmp_seq=2 ttl=122 time=6.03 ms
64 bytes from 17.17.78.172: icmp_seq=3 ttl=122 time=13.6 ms
64 bytes from 17.17.78.172: icmp_seq=4 ttl=122 time=6.03 ms
64 bytes from 17.17.78.172: icmp_seq=5 ttl=122 time=5.96 ms

--- 17.17.78.172 ping statistics ---
5 packets transmitted, 5 received, 0 packet loss, time 4011ms
rtt min/avg/max/mdev = 5.969/7.560/13.656/3.048 ms
[root@redhat ~]#

[root@redhat ~]# ls -l /etc/localtime
lrwxrwxrwx 1 root root 37 Apr 28 16:25 /etc/localtime -> /usr/share/zoneinfo/Africa/Casablanca
[root@redhat ~]#

[root@redhat ~]# ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
17.17.78.172 .LOCL. 1 u 22 64 377 6.066 306632. 6.237
[root@redhat ~]#

[root@redhat ~]# cat /etc/ntp.conf
server 17.17.78.172
multicastclient 224.0.1.1
driftfile /etc/ntp/drift
[root@redhat ~]#

[root@redhat ~]# cat /etc/ntp/drift
-58.960
[root@redhat ~]#


What is strange, is that the manual synchro goes successfully, but not manually.

[root@redhat ~]# date
Mon May 4 14:29:38 WEST 2015
[root@redhat ~]# ntpdate 17.17.78.172
4 May 14:29:48 ntpdate[24246]: the NTP socket is in use, exiting
[root@redhat ~]# service ntpd stop
Shutting down ntpd: [ OK ]
[root@redhat ~]# ntpdate 17.17.78.172
4 May 14:35:04 ntpdate[24264]: step time server 17.17.78.172 offset 306.633503 sec
[root@redhat ~]# date
Mon May 4 14:35:06 WEST 2015
[root@redhat ~]# service ntpd start
Starting ntpd: [ OK ]
[root@redhat ~]#


Diagnostics:

[root@redhat ~]# ntpstat
unsynchronised
time server re-starting
polling server every 64 s
[root@redhat ~]#

[root@redhat ~]# ntpq
ntpq> peers
remote refid st t when poll reach delay offset jitter
==============================================================================
17.17.78.172 .LOCL. 1 u 35 64 1 5.982 -0.499 0.000
ntpq> ass

ind assID status conf reach auth condition last_event cnt
===========================================================
1 44313 9014 yes yes none reject reachable 1
ntpq> rv 44313
assID=44313 status=9014 reach, conf, 1 event, event_reach,
srcadr=17.17.78.172, srcport=123, dstadr=10.104.26.226, dstport=123,
leap=00, stratum=1, precision=-6, rootdelay=0.000,
rootdispersion=10550.385, refid=LOCL, reach=001, unreach=1, hmode=3,
pmode=4, hpoll=6, ppoll=6, flash=400 peer_dist, keyid=0, ttl=0,
offset=-0.499, delay=5.982, dispersion=7945.313, jitter=0.000,
reftime=d8f13f96.9fbc8e91 Mon, May 4 2015 1:45:10.623,
org=d8f1f414.4b833680 Mon, May 4 2015 14:35:16.294,
rec=d8f1f414.4c67f08b Mon, May 4 2015 14:35:16.298,
xmt=d8f1f414.4adfe1b4 Mon, May 4 2015 14:35:16.292,
filtdelay= 5.98 0.00 0.00 0.00 0.00 0.00 0.00 0.00,
filtoffset= -0.50 0.00 0.00 0.00 0.00 0.00 0.00 0.00,
filtdisp= 15.63 16000.0 16000.0 16000.0 16000.0 16000.0 16000.0 16000.0
ntpq>


Please, advice.

Best Regards,

noureddinek 05-04-2015 09:19 AM

Hello,

One more thing, even if the server (host2) can't be synchronized with server, it exchange NTP packets with NTP server:

[root@redhat ~]# tcpdump -i eth0 udp port 123 or tcp port 123
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
15:10:45.305624 IP host2.ntp > 17.17.78.172.ntp: NTPv4, Client, length 48
15:10:45.311976 IP 17.17.78.172.ntp > host2.ntp: NTPv3, Server, length 48
15:11:49.337639 IP host2.ntp > 17.17.78.172.ntp: NTPv4, Client, length 48
15:11:49.343714 IP 17.17.78.172.ntp > host2.ntp: NTPv3, Server, length 48
15:12:53.337563 IP host2.ntp > 17.17.78.172.ntp: NTPv4, Client, length 48
15:12:53.343801 IP 17.17.78.172.ntp > host2.ntp: NTPv3, Server, length 48
^C
6 packets captured
6 packets received by filter
0 packets dropped by kernel
[root@redhat ~]#

[root@redhat ~]# ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
17.17.78.172 .LOCL. 1 u 12 64 377 6.267 13.068 6.781
[root@redhat ~]#


Best Regards,

lazydog 05-07-2015 02:19 PM

Your request are being rejected form the server. Could be because of the network you are coming from.
Have you tried a different time server?


All times are GMT -5. The time now is 04:32 PM.