Page 1 of 1

check_ntp_peer times out

Posted: Fri Apr 12, 2019 6:45 am
by mksmr
Good afternoon all,

I'm currently having issues with check_ntp_peer and wondered if somebody could give me a hint to track this down.

On a Devuan 2.0 Ascii system:
openntpd 6.0p1-2
check_ntp_peer v2.2 (monitoring-plugins 2.2)

Code: Select all

# /usr/lib/nagios/plugins/check_ntp_peer -H pool.ntp.org -vvv
sending READSTAT requestcontrol packet contents:
        flags: 0x16 , 0x01
          li=0 (0x00)
          vn=2 (0x10)
          mode=6 (0x06)
          response=0 (0x00)
          more=0 (0x00)
          error=0 (0x00)
          op=1 (0x01)
        sequence: 1 (0x01)
        status: 0 (0x00)
        assoc: 0 (0x00)
        offset: 0 (0x00)
        count: 0 (0x00)
receiving READSTAT responseCRITICAL - Socket timeout after 10 seconds
On OpenBSD 6.4:
ntpd 4.2.8
check_ntp_peer v2.2 (monitoring-plugins 2.2)

Code: Select all

# /usr/local/libexec/nagios/check_ntp_peer -H ptbtime1.ptb.de -vvv
sending READSTAT requestcontrol packet contents:
        flags: 0x16 , 0x01
          li=0 (0x00)
          vn=2 (0x10)
          mode=6 (0x06)
          response=0 (0x00)
          more=0 (0x00)
          error=0 (0x00)
          op=1 (0x01)
        sequence: 1 (0x01)
        status: 0 (0x00)
        assoc: 0 (0x00)
        offset: 0 (0x00)
        count: 0 (0x00)
recieving READSTAT responseCRITICAL - Socket timeout after 10 seconds
I can change the reference server to whatever I like, even to a machine in my local network - the result remains the same.

Any ideas on this?

TIA
Matthias

Re: check_ntp_peer times out

Posted: Fri Apr 12, 2019 2:11 pm
by npolovenko
Hello, @mksmr. The most likely reason for the socket timeout is that your NTP servers are not allowing peer connections. On the NTP server open the /etc/ntp.conf config and change:
restrict default nomodify notrap nopeer noquery
to
restrict default nomodify notrap
Then restart the ntp deamon:
service ntpd restart