NTP synchronized: no

Rick Stevens ricks at alldigital.com
Tue Sep 8 17:59:27 UTC 2015


On 09/08/2015 10:42 AM, John Pilkington wrote:
> On 08/09/15 18:02, Rick Stevens wrote:
>> On 09/08/2015 03:27 AM, John Pilkington wrote:
>>> On 08/09/15 10:52, Ed Greshko wrote:
>>>> On 09/08/15 17:29, Patrick Dupre wrote:
>>>>> I cannot synchronize the date:
>>>>> My undestanding is that it should be set by:
>>>>> timedatectl set-ntp yes
>>>>>
>>>>> Here, the results of some commands:
>>>>>
>>>>> netstat -a |grep ntp
>>>>> udp        0      0 localhost.localdo:51314 ns346276.ip-94-23-3:ntp
>>>>> ESTABLISHED
>>>>> udp        0      0 localhost.localdo:39994 tomia.ordimatic.net:ntp
>>>>> ESTABLISHED
>>>>> udp        0      0 localhost.localdo:45035 ntp.tuxfamily.net:ntp
>>>>> ESTABLISHED
>>>>> udp        0      0 localhost.localdo:49209 host3.nuagelibre.or:ntp
>>>>> ESTABLISHED
>>>>> warning, got bogus l2cap line.
>>>
>>> That looks different: here's mine.
>>>
>>> [john at HP_Box ~]$ netstat -a | grep ntp
>>> udp        0      0 0.0.0.0:ntp             0.0.0.0:*
>>> udp6       0      0 [::]:ntp                [::]:*
>>> [john at HP_Box ~]$ netstat -a | grep 323
>>> udp        0      0 localhost:323           0.0.0.0:*
>>> udp6       0      0 localhost:323           [::]:*
>>> plus a few irrelevant responses.
>>>
>>> but ...grep 123 shows nothing that looks relevant.
>>>
>>> Quoting from the faq:
>>>
>>> Perhaps you have a firewall set up in a way that blocks packets on port
>>> 323/udp.  You need to amend the firewall configuration in this case.
>>
>> ntp is UDP port 123 as is shown in your output. By default, netstat
>> will translate port numbers to services found in your /etc/services
>> file. If you want to verify it, try "netstat -apn | grep :123" and you
>> should see something on that port:
>>
>> [root at prophead ~]# netstat -pna | grep :123
>> ...
>> udp        0      0 192.168.1.50:58156      104.41.150.68:123
>> ESTABLISHED 841/chronyd
>> ...
>>
>> So you can see that chronyd is connected to 104.41.150.68 via UDP port
>> 123.
>
> Thanks Rick.  On my system, ( which does have a working chrony setup)  I
> see:
>
> $ uname -a
> Linux HP_Box 3.10.0-229.11.1.el7.x86_64 #1 SMP Wed Aug 5 14:37:37 CDT
> 2015 x86_64 x86_64 x86_64 GNU/Linux
>
> [john at HP_Box ~]$ netstat -pna | grep :123
> (Not all processes could be identified, non-owned process info
>   will not be shown, you would have to be root to see it all.)
> udp        0      0 0.0.0.0:123             0.0.0.0:*         -
> udp6       0      0 :::123                  :::*         -
> [john at HP_Box ~]$ su
> Password:
> [root at HP_Box john]# netstat -pna | grep :123
> udp        0      0 0.0.0.0:123             0.0.0.0:*         692/chronyd
> udp6       0      0 :::123                  :::*         692/chronyd
> [root at HP_Box john]# netstat -pna | grep :323
> udp        0      0 127.0.0.1:323           0.0.0.0:*         692/chronyd
> udp6       0      0 ::1:323                 :::*         692/chronyd
> [root at HP_Box john]# exit
> exit
> [john at HP_Box ~]$

So you have chronyd listening on UDP port 123. Whether or not it's
"ESTABLISHED" (I use that term loosely with UDP) depends on if chronyd
was actively talking to an NTP server or client at the time you ran the
"netstat" command.

In my case it was (just caught it right) and in your case, it wasn't.
Right now, mine isn't "ESTABLISHED", either.

Keep in mind that netstat will try to a) translate IP addresses to host
names via DNS, b) translate network ports to service names using
/etc/services; and c) translate UIDs to usernames using the various UID
mapping things unless you include the "-n" flag (or "--numeric-hosts",
"--numeric-ports" or "--numeric-users" depending on your desires).
----------------------------------------------------------------------
- Rick Stevens, Systems Engineer, AllDigital    ricks at alldigital.com -
- AIM/Skype: therps2        ICQ: 226437340           Yahoo: origrps2 -
-                                                                    -
-      To err is human, to forgive, beyond the scope of the OS       -
----------------------------------------------------------------------


More information about the users mailing list