check_ntp_peer times out

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
mksmr
Posts: 55
Joined: Thu Sep 22, 2016 7:17 am

check_ntp_peer times out

Post 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
Hulluna humpasta taas
Minä olen hulluna humpasta taas
Minen toivu koskaan, luotan voimaan votkan
Hulluna humpasta taas
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: check_ntp_peer times out

Post 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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked