[CentOS] Problem with ntp

Mon Mar 9 12:29:08 UTC 2015
C.L. Martinez <carlopmart at gmail.com>


On 03/09/2015 11:48 AM, Ashish Yadav wrote:
> Hi,
>
> On Mon, Mar 9, 2015 at 4:43 PM, C.L. Martinez <carlopmart at gmail.com> wrote:
>
>> Hi all,
>>
>>   I have a problem with ntpd daemon in my CentOS7 vm. When I try to list
>> peers, command fails:
>>
>> [root at c7tst ntpstats]# ntpq
>> ntpq> pe
>> ntpq: read: Connection refused
>> ntpq>
>>
>>
> By default NTP daemon is stopped in CentOS. Please see NTP daemon is
> running or not?
>
> Please share the output of "netstat -nupl | grep 123" command for more
> information.
>
> --Regards
> Ashishkumar S. Yadav

Hi Ashish,

  of course, ntpd daemon is running:

[root at c7tst tmp]$ ps xauw | grep ntp
ntp       8238  0.0  0.0  29360  2076 ?        Ss   11:09   0:00 
/usr/sbin/ntpd -u ntp:ntp -g -4

And:

[root at c7tst tmp]$ sudo ss -putan | grep 123
tcp    UNCONN     0      0            172.22.55.1:123 
*:*      users:(("ntpd",8238,18))
tcp    UNCONN     0      0              127.0.0.1:123 
*:*      users:(("ntpd",8238,17))
tcp    UNCONN     0      0                      *:123 
*:*      users:(("ntpd",8238,16))


And /var/log/messages:

Mar  9 09:31:04 c7tst ntpd[6030]: proto: precision = 0.055 usec
Mar  9 09:31:04 c7tst ntpd[6030]: 0.0.0.0 c01d 0d kern kernel time sync 
enabled
Mar  9 09:31:04 c7tst ntpd[6030]: Listen and drop on 0 v4wildcard 
0.0.0.0 UDP 123
Mar  9 09:31:04 c7tst ntpd[6030]: Listen normally on 1 lo 127.0.0.1 UDP 123
Mar  9 09:31:04 c7tst ntpd[6030]: Listen normally on 2 prodif 
172.22.55.1 UDP 123
Mar  9 09:31:04 c7tst ntpd[6030]: Listening on routing socket on fd #19 
for interface updates
Mar  9 09:31:04 c7tst ntpd[6030]: 0.0.0.0 c016 06 restart
Mar  9 09:31:04 c7tst ntpd[6030]: 0.0.0.0 c012 02 freq_set kernel -2.019 PPM
Mar  9 09:31:05 c7tst ntpd[6030]: 0.0.0.0 c615 05 clock_sync
Mar  9 11:09:05 c7tst ntpd[6030]: ntpd exiting on signal 15
Mar  9 11:09:09 c7tst ntpd[8237]: ntpd 4.2.6p5 at 1.2349-o Sat Dec 20 
01:24:55 UTC 2014 (1)
Mar  9 11:09:09 c7tst ntpd[8238]: proto: precision = 0.066 usec
Mar  9 11:09:09 c7tst ntpd[8238]: 0.0.0.0 c01d 0d kern kernel time sync 
enabled
Mar  9 11:09:09 c7tst ntpd[8238]: Listen and drop on 0 v4wildcard 
0.0.0.0 UDP 123
Mar  9 11:09:09 c7tst ntpd[8238]: Listen normally on 1 lo 127.0.0.1 UDP 123
Mar  9 11:09:09 c7tst ntpd[8238]: Listen normally on 2 prodif 
172.22.55.1 UDP 123
Mar  9 11:09:09 c7tst ntpd[8238]: Listening on routing socket on fd #19 
for interface updates
Mar  9 11:09:10 c7tst ntpd[8238]: 0.0.0.0 c016 06 restart
Mar  9 11:09:10 c7tst ntpd[8238]: 0.0.0.0 c012 02 freq_set kernel -1.971 PPM
Mar  9 11:09:10 c7tst ntpd[8238]: 0.0.0.0 c615 05 clock_sync

But, I am worried about two things. First in /var/log/messages:

Mar  9 11:09:09 c7tst ntpd[8238]: Listen and drop on 0 v4wildcard 
0.0.0.0 UDP 123

¿¿????

And second: ss output shows an "UNCONN", that means "unconnected" .... 
Uhmmm, and I don't understand why .... There is no firewall or blocking 
gateway between this C7 vm and Internet ...