Time synchronous Incorrect

635 views
Skip to first unread message

Gagan Chandrashekar J

unread,
Sep 22, 2017, 11:34:39 PM9/22/17
to public-ntp-discuss
  • I am not getting the correct time from ntp.ubuntu.com, it showing 30 to 40 minutes addition to the IST timezone
  • My Location : India
  • Platform : Lubuntu, Linux
  • Every time I have to set the time manually before using the PC
  • After adding the lines : 
  • but the time after ntp reload is not getting corrected.
  • please anyone know the solution for this

Jamie Wilkinson

unread,
Sep 24, 2017, 7:04:24 PM9/24/17
to Gagan Chandrashekar J, public-ntp-discuss
Are you getting responses from the service?   Assuming you're using the standard ntpd on ubuntu, then 'ntpq -c pe' will print out some peer state information from the local daemon.   If both ntp.ubuntu.com and our service are not responding, then the problem might be local.

The 'reach' column will have an octal number representing the responses from each peer: if it's 0, it has never received a response, if it's all 1s (i.e. says 377) then it is getting responses.

for example, one line might look like:
-time1.google.co .GOOG.           1 u 1006 1024  377  212.200   -0.129  11.633
for a fully reachable service.

If you're not getting responses, then check that the packets are not being filtered by a local firewall, perhaps with the command 'sudo tcpdump port 123 and udp'; if no packets are returning then the problem is upstream.  You should expect to see something like this 
08:59:46.510996 IP6 2001:xxxxx.ntp > time3.google.com.ntp: NTPv4, Client, length 48
08:59:46.810760 IP6 time3.google.com.ntp > 2001:xxxxx.ntp: NTPv4, Server, length 48
if packets are coming back.

If they're not, then a traceroute to the server would be useful for us to help diagnose: sudo traceroute time1.google.com


--
You received this message because you are subscribed to the Google Groups "public-ntp-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to public-ntp-discuss+unsub...@googlegroups.com.
To post to this group, send email to public-ntp-discuss@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/public-ntp-discuss/85f6f050-d1fe-4d1b-a124-b25644cd2fce%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jamie Wilkinson

unread,
Sep 26, 2017, 7:27:51 PM9/26/17
to Gagan Chandrashekar J, public-ntp-discuss
The reachability in all your peers is zero, so no responses are being received.

The tcpdump looks like it's sending them, and they never come back.  This is the same for all upstream NTP servers, so it's not unique to Google Public NTP.  My guess is that you have a firewall somewhere.  Given that we don't see the reply packets on tcpdump, I expect the firewall is upstream from you, preventing the packets returning.

The traceroute looks normal, you get to the Google network at least, and it doesn't use the same ports as NTP so I'm not surprised that works despite the NTP packets not.  We can try to guess where the firewall is:

sudo traceroute -P udp -port 123 time1.google.com

might shed some light.

Finally, just to be sure, are you running a local firewall?  I might be mistaken and the packets are not able to even leave your machine, so if you have outbound or inbound UDP port 123 blocked, that might be the simple explanation.

On 26 September 2017 at 23:37, Gagan Chandrashekar J <gaganjch...@gmail.com> wrote:
thanks for seeing through this,
'ntpq -c pe' command gave me


          remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 0.ubuntu.pool.n .POOL.          16 p    -   64    0    0.000    0.000   0.000
 1.ubuntu.pool.n .POOL.          16 p    -   64    0    0.000    0.000   0.000
 2.ubuntu.pool.n .POOL.          16 p    -   64    0    0.000    0.000   0.000
 3.ubuntu.pool.n .POOL.          16 p    -   64    0    0.000    0.000   0.000
 ntp.ubuntu.com  .POOL.          16 p    -   64    0    0.000    0.000   0.000
 time1.google.co .INIT.          16 u    -   64    0    0.000    0.000   0.000
 time2.google.co .INIT.          16 u    -   64    0    0.000    0.000   0.000
 time3.google.co .INIT.          16 u    -   64    0    0.000    0.000   0.000
 time4.google.co .INIT.          16 u    -   64    0    0.000    0.000   0.000


'sudo tcpdump port 123 and udp' gives

tcpdump: listening on enp2s0, link-type EN10MB (Ethernet), capture size 262144 bytes
19:34:25.272724 IP (tos 0xb8, ttl 64, id 36073, offset 0, flags [DF], proto UDP (17), length 76)
    192.168.0.12.ntp > time4.google.com.ntp: NTPv4, length 48
Client, Leap indicator: clock unsynchronized (192), Stratum 0 (unspecified), poll 6 (64s), precision -23
Root Delay: 0.000000, Root dispersion: 0.002929, Reference-ID: (unspec)
  Reference Timestamp:  0.000000000
  Originator Timestamp: 0.000000000
  Receive Timestamp:    0.000000000
  Transmit Timestamp:   3715164265.272673825 (2017/09/23 19:34:25)
    Originator - Receive Timestamp:  0.000000000
    Originator - Transmit Timestamp: 3715164265.272673825 (2017/09/23 19:34:25)
19:34:27.269182 IP (tos 0xb8, ttl 64, id 54460, offset 0, flags [DF], proto UDP (17), length 76)
    192.168.0.12.ntp > time1.google.com.ntp: NTPv4, length 48
Client, Leap indicator: clock unsynchronized (192), Stratum 0 (unspecified), poll 6 (64s), precision -23
Root Delay: 0.000000, Root dispersion: 0.002960, Reference-ID: (unspec)
  Reference Timestamp:  0.000000000
  Originator Timestamp: 0.000000000
  Receive Timestamp:    0.000000000
  Transmit Timestamp:   3715164267.269139033 (2017/09/23 19:34:27)
    Originator - Receive Timestamp:  0.000000000
    Originator - Transmit Timestamp: 3715164267.269139033 (2017/09/23 19:34:27)
19:34:27.269241 IP (tos 0xb8, ttl 64, id 6976, offset 0, flags [DF], proto UDP (17), length 76)
    192.168.0.12.ntp > 139.59.21.22.ntp: NTPv4, length 48
Client, Leap indicator: clock unsynchronized (192), Stratum 0 (unspecified), poll 6 (64s), precision -23
Root Delay: 0.000000, Root dispersion: 0.002960, Reference-ID: (unspec)
  Reference Timestamp:  0.000000000
  Originator Timestamp: 0.000000000
  Receive Timestamp:    0.000000000
  Transmit Timestamp:   3715164267.269232488 (2017/09/23 19:34:27)
    Originator - Receive Timestamp:  0.000000000
    Originator - Transmit Timestamp: 3715164267.269232488 (2017/09/23 19:34:27)
19:34:29.268325 IP (tos 0xb8, ttl 64, id 13228, offset 0, flags [DF], proto UDP (17), length 76)
    192.168.0.12.ntp > time3.google.com.ntp: NTPv4, length 48
Client, Leap indicator: clock unsynchronized (192), Stratum 0 (unspecified), poll 6 (64s), precision -23
Root Delay: 0.000000, Root dispersion: 0.002990, Reference-ID: (unspec)
  Reference Timestamp:  0.000000000
  Originator Timestamp: 0.000000000
  Receive Timestamp:    0.000000000
  Transmit Timestamp:   3715164269.268282697 (2017/09/23 19:34:29)
    Originator - Receive Timestamp:  0.000000000
    Originator - Transmit Timestamp: 3715164269.268282697 (2017/09/23 19:34:29)
19:34:29.268382 IP (tos 0xb8, ttl 64, id 33503, offset 0, flags [DF], proto UDP (17), length 76)
    192.168.0.12.ntp > golem.canonical.com.ntp: NTPv4, length 48
Client, Leap indicator: clock unsynchronized (192), Stratum 0 (unspecified), poll 6 (64s), precision -23
Root Delay: 0.000000, Root dispersion: 0.002990, Reference-ID: (unspec)
  Reference Timestamp:  0.000000000
  Originator Timestamp: 0.000000000
  Receive Timestamp:    0.000000000
  Transmit Timestamp:   3715164269.268374350 (2017/09/23 19:34:29)
    Originator - Receive Timestamp:  0.000000000
    Originator - Transmit Timestamp: 3715164269.268374350 (2017/09/23 19:34:29)
19:34:30.262835 IP (tos 0xb8, ttl 64, id 49563, offset 0, flags [DF], proto UDP (17), length 76)
    192.168.0.12.ntp > ec2-52-66-76-135.ap-south-1.compute.amazonaws.com.ntp: NTPv4, length 48
Client, Leap indicator: clock unsynchronized (192), Stratum 0 (unspecified), poll 6 (64s), precision -23
Root Delay: 0.000000, Root dispersion: 0.003005, Reference-ID: (unspec)
  Reference Timestamp:  0.000000000
  Originator Timestamp: 0.000000000
  Receive Timestamp:    0.000000000
  Transmit Timestamp:   3715164270.262769151 (2017/09/23 19:34:30)
    Originator - Receive Timestamp:  0.000000000
    Originator - Transmit Timestamp: 3715164270.262769151 (2017/09/23 19:34:30)
6 packets captured
6 packets received by filter
0 packets dropped by kernel

sudo traceroute time1.google.com gives


traceroute to time1.google.com (216.239.35.0), 30 hops max, 60 byte packets
 1  192.168.0.1 (192.168.0.1)  0.136 ms  0.521 ms  0.510 ms
 2  115.99.8.1 (115.99.8.1)  14.039 ms  14.426 ms  14.415 ms
 3  202.88.156.177 (202.88.156.177)  14.435 ms  14.739 ms  14.730 ms
 4  202.88.156.66 (202.88.156.66)  14.348 ms  14.339 ms  14.316 ms
 5  202.88.156.61 (202.88.156.61)  14.637 ms  14.633 ms  14.625 ms
 6  10.241.1.6 (10.241.1.6)  14.612 ms  15.419 ms  16.482 ms
 7  10.240.254.100 (10.240.254.100)  14.396 ms  14.777 ms  14.740 ms
 8  10.240.254.1 (10.240.254.1)  17.340 ms  17.723 ms  16.704 ms
 9  10.241.1.1 (10.241.1.1)  15.488 ms  15.470 ms  15.144 ms
10  202.88.157.29 (202.88.157.29)  22.816 ms  22.315 ms  23.166 ms
11  202.88.152.69 (202.88.152.69)  21.065 ms  20.629 ms  21.016 ms
12  209.85.252.188 (209.85.252.188)  21.305 ms 72.14.237.160 (72.14.237.160)  22.579 ms  22.145 ms
13  216.239.48.71 (216.239.48.71)  56.337 ms  54.049 ms  55.884 ms
14  72.14.234.32 (72.14.234.32)  124.079 ms 66.249.94.140 (66.249.94.140)  129.189 ms 209.85.249.22 (209.85.249.22) 119.361 ms
15  216.239.51.243 (216.239.51.243)  216.929 ms  217.232 ms  216.880 ms
16  209.85.254.168 (209.85.254.168)  272.241 ms 216.239.43.146 (216.239.43.146)  249.089 ms  250.683 ms
17  209.85.240.17 (209.85.240.17)  266.242 ms 209.85.243.161 (209.85.243.161)  260.508 ms 209.85.240.17 (209.85.240.17)  260.986 ms
18  209.85.248.53 (209.85.248.53)  270.230 ms 209.85.142.153 (209.85.142.153)  264.283 ms 216.239.46.97 (216.239.46.97)  264.633 ms
19  * * *
20  * * *
21  * * *
22  * * *
23  * * *
24  * * *
25  * * *
26  * * *
27  * * *
28  * * *
29  * * *
30  * * *

I don't know what to or how to read the status. please help me to fix it



On 25 September 2017 at 04:33, Jamie Wilkinson <j...@google.com> wrote:
Are you getting responses from the service?   Assuming you're using the standard ntpd on ubuntu, then 'ntpq -c pe' will print out some peer state information from the local daemon.   If both ntp.ubuntu.com and our service are not responding, then the problem might be local.

The 'reach' column will have an octal number representing the responses from each peer: if it's 0, it has never received a response, if it's all 1s (i.e. says 377) then it is getting responses.

for example, one line might look like:
-time1.google.co .GOOG.           1 u 1006 1024  377  212.200   -0.129  11.633
for a fully reachable service.

If you're not getting responses, then check that the packets are not being filtered by a local firewall, perhaps with the command 'sudo tcpdump port 123 and udp'; if no packets are returning then the problem is upstream.  You should expect to see something like this 
08:59:46.510996 IP6 2001:xxxxx.ntp > time3.google.com.ntp: NTPv4, Client, length 48
08:59:46.810760 IP6 time3.google.com.ntp > 2001:xxxxx.ntp: NTPv4, Server, length 48
if packets are coming back.

If they're not, then a traceroute to the server would be useful for us to help diagnose: sudo traceroute time1.google.com

On 23 September 2017 at 13:34, Gagan Chandrashekar J <gaganjch...@gmail.com> wrote:
  • I am not getting the correct time from ntp.ubuntu.com, it showing 30 to 40 minutes addition to the IST timezone
  • My Location : India
  • Platform : Lubuntu, Linux
  • Every time I have to set the time manually before using the PC
  • After adding the lines : 
  • but the time after ntp reload is not getting corrected.
  • please anyone know the solution for this

--
You received this message because you are subscribed to the Google Groups "public-ntp-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to public-ntp-discuss+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages