Operating System - HP-UX
1825581 Members
2203 Online
109682 Solutions
New Discussion

Re: ntp syncronisation lost

 
David_246
Trusted Contributor

ntp syncronisation lost

Hi,

I have a question about ntp.

We very often get an error of synchronisation lost. When looking at "nptq -p" I can imagine that, just not why :
ntpq -p
remote refid st t when poll reach delay offset disp
==============================================================================
LOCAL(0) LOCAL(0) 10 l 14 64 377 0.00 0.000 10.01
#nlhpunx-prod-4. 10.164.248.2 3 u 51 64 377 6.15 -4.058 1.92

The "#" is explained in the manual as : selected for synchronization but distance exceeds maximum;

our /etc/ntp.conf file sais :
driftfile /etc/ntp.drift
authenticate no

server ntpserver version 3 prefer

server 127.127.1.0
fudge 127.127.1.0 stratum 10

----------
Has anyone a suggestion about what can be the cause ??
Your help will be much apreciated (and rewarded :)

Regs David
@yourservice
6 REPLIES 6
Hartmut Lang
Trusted Contributor

Re: ntp syncronisation lost

You have two server lines configured. The first one is a NTP-server the second one an attached clock. Maybe they conflict in time.

Use "ntpquery" to check your current synchronization status.

Use "ntpdate" once to update your local time to the servers time.

Hope this helps somehow,
Hartmut
David_246
Trusted Contributor

Re: ntp syncronisation lost

Hi Hartmut,

ntpquery is an unknown command, maybe it is replaced by ntpq -p ??

server 127.127.1.0 is the local clock, I don't know if we need this but my collegue told me it is recommended by an HP engineer by that time.

What I did find is another command I'dd not seen before called "ntptrace". Please look at the following :

client :
# ntptrace nlhpunx-prod-4 (same as ntpserver from config)
nlhpunx-prod-4.intern.domain.nl: stratum 3, offset -0.004801, synch distance 14.17863
10.164.248.2: *Timeout*

server (nlhpunx-prod-4):
ntpq -p
remote refid st t when poll reach delay offset disp
==============================================================================
LOCAL(0) LOCAL(0) 10 l 28 64 377 0.00 0.000 10.01
#10.164.248.2 172.24.164.34 2 u 245 256 377 7.42 11.247 7.93
+nlhpunx2n1.inte 10.164.248.2 3 u 90 256 366 0.63 4.482 4.18

So actioning :
# ntptrace 10.164.248.2
10.164.248.2: stratum 2, offset 0.003159, synch distance 1.00000
172.24.164.34: *Timeout*


Looking at this is seems that the second stratum is blocked ?? with ip : 172.24.164.34
Is this my problem ?? any ideas.

Regs David
@yourservice
Hartmut Lang
Trusted Contributor

Re: ntp syncronisation lost

Sorry,
ntptrace is the command i think is usefull.
Use ntptrace without any option to trace the ntp-hierachy your machine is using. I don't think the timeout you see is a problem.

I'm not a ntp-expert, but maybe it is not a good idea to add a remote ntp-server and a local clock here. What do you want? Sync your local time with the remote server or with your locally attached clock?

A would suggest that you comment-out the entries for your local clock, to see how your machines syncs without them.

Hartmut
Donny Jekels
Respected Contributor

Re: ntp syncronisation lost

David,

Might think about using a simple port scanner to 172.24.164.34 and check if you can connect to the port for NTP. (123/udp)

maybe your security dept blocked the port? who knows.

peace
Donny
"Vision, is the art of seeing the invisible"
Donny Jekels
Respected Contributor

Re: ntp syncronisation lost

1 #!/usr/bin/perl
2
3 # scan server ports on any OS
4
5 use IO::Socket;
6 my ($line, $port, $sock, @servers);
7
8 # got to start somewhere right?? haha
9 my $VERSION='1.0';
10
11 ($server = $ARGV[0]) || &usage;
12 $begin = ($ARGV[1] || 0);
13
14 # I am going to add a variable for range of ports to scan
15 # go upto 65000
16
17 for ($port=$begin;$port<=1024;$port++) {
18 $sock = IO::Socket::INET->new(PeerAddr => $server,
19 PeerPort => $port,
20 Proto => 'tcp');
21 if ($sock) {
22 print "Connected on port $port\n";
23 } else {
24 # print "$port failed\n";
25 # I am not printing this - way too much info
26 # besides I am only interrested in open Ports
27 }
28 }
29
30
31
32
33
34 sub usage {
35 print "Usage: portscan hostname [start at port number]\n";
36 exit(0);
37 }
"Vision, is the art of seeing the invisible"
Donny Jekels
Respected Contributor

Re: ntp syncronisation lost

verander 'tcp' na 'udp'
"Vision, is the art of seeing the invisible"