[Nagiosplug-devel] [ nagiosplug-Bugs-2550224 ] check_ntp: wrong output for host with both A and AAAA record

SourceForge.net noreply at sourceforge.net
Wed May 20 08:19:48 CEST 2009


Bugs item #2550224, was opened at 2009-01-30 15:40
Message generated for change (Comment added) made by dermoth
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=2550224&group_id=29880

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: General plugin execution
Group: CVS
>Status: Closed
>Resolution: Invalid
Priority: 5
Private: No
Submitted By: Jan Wagner (cyco_dd)
Assigned to: Nobody/Anonymous (nobody)
Summary: check_ntp: wrong output for host with both A and AAAA record

Initial Comment:
The following Bugreport we got against our debian package: 

Please consider this:

$ host -t any lipton.aai.niif.hu
lipton.aai.niif.hu  	A	193.225.14.195
lipton.aai.niif.hu  	AAAA	2001:738:0:701:80:C1E1:EC3:0
$ /usr/lib/nagios/plugins/check_ntp -H lipton.aai.niif.hu -v
sending request to peer 0
sending request to peer 1
response from peer 1: offset -2.680183388e-05
sending request to peer 1
response from peer 1: offset -1.871510176e-05
sending request to peer 1
response from peer 1: offset 3.834080417e-06
sending request to peer 1
response from peer 1: offset -3.614556044e-05
re-sending request to peer 0
re-sending request to peer 0
re-sending request to peer 0
re-sending request to peer 0
re-sending request to peer 0
re-sending request to peer 0
overall average offset: nan
NTP OK: Offset nan secs|offset=nan

This isn't serious, since one uses IP addresses anyway, but still a bug.
Sure the client doesn't respond to IPv6 packets, but its offset isn't NaN.

You can track the bugreport via http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=509589

----------------------------------------------------------------------

>Comment By: Thomas Guyot-Sionnest (dermoth)
Date: 2009-05-20 02:19

Message:
IPv6 "DO" work if your OS supports IPv6 and is configured/connected
properly (I just testes it on a dual v4/v6 server). In the other case you
can use the -4 switch to force IPv4 (tested on a system which isn't
IPv6-capable)

IPv6:

$ host -t any tmpntpsrv.join.uni-muenster.de.
tmpntpsrv.join.uni-muenster.de has address 128.176.191.9
tmpntpsrv.join.uni-muenster.de has IPv6 address
2001:638:500:101:2e0:4bff:fe04:bc5f
$ ./check_ntp -H tmpntpsrv.join.uni-muenster.de. -v
sending request to peer 0
sending request to peer 1
response from peer 0: offset 0.0126850605
sending request to peer 0
response from peer 1: offset 0.01730811596
sending request to peer 1
response from peer 0: offset 0.0123462677
sending request to peer 0
re-sending request to peer 0
response from peer 1: offset 0.01795887947
sending request to peer 1
response from peer 0: offset 0.01281118393
sending request to peer 0
response from peer 0: offset 0.01216220856
response from peer 1: offset 0.01737487316
sending request to peer 1
response from peer 1: offset 0.01733827591
overall average offset: 0.0126850605
NTP OK: Offset 0.0126850605 secs|offset=0.012685s;60.000000;120.000000;
$ ./check_ntp -H tmpntpsrv.join.uni-muenster.de. -4 -v
sending request to peer 0
response from peer 0: offset 0.02037644386
sending request to peer 0
response from peer 0: offset 0.02015924454
sending request to peer 0
response from peer 0: offset 0.02035975456
sending request to peer 0
re-sending request to peer 0
response from peer 0: offset 0.02017998695
overall average offset: 0.02037644386
NTP OK: Offset 0.02037644386 secs|offset=0.020376s;60.000000;120.000000;
$ 

IPv4:
$ host -t any tmpntpsrv.join.uni-muenster.de.
tmpntpsrv.join.uni-muenster.de has address 128.176.191.9
tmpntpsrv.join.uni-muenster.de has IPv6 address
2001:638:500:101:2e0:4bff:fe04:bc5f
$ ./check_ntp -H tmpntpsrv.join.uni-muenster.de. -v
Address family not supported by protocol
can not create new socket$
$ ./check_ntp -H tmpntpsrv.join.uni-muenster.de. -4 -v
sending request to peer 0
response from peer 0: offset 0.06370124064
sending request to peer 0
response from peer 0: offset 0.06318281766
sending request to peer 0
response from peer 0: offset 0.06347788981
sending request to peer 0
response from peer 0: offset 0.06340960733
overall average offset: 0.06370124064
NTP OK: Offset 0.06370124064 secs|offset=0.063701s;60.000000;120.000000;
$

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=2550224&group_id=29880




More information about the Devel mailing list