LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
LinkBack Search this Thread
Old 12-16-2009, 12:22 PM   #1
csmith7383
LQ Newbie
 
Registered: Dec 2009
Posts: 3

Rep: Reputation: 0
Question ntpd communicates with server, doesn't set clock


I've been trying to get NTP to synchronize our workstations and servers on an isolated network (not connected to anything in the outside world). The two Linux servers on the network will not synchronize with the NTP server and keep their clocks accurate. I have managed to sync Windows XP workstations to the NTP server.

I've run ntpd -q to do an initial synchronization, but that fails. Running ntptime 192.168.40.40 successfully updates the clock, however.

Running ntpd in debug mode shows requests being sent and responses received (sorry, I can't paste it here because I'd have to type it all out by hand). When I run ntpd -q, 16 send/receive statements are shown, but then ntpd exits saying "no reply; clock not set."

My ntp.conf file has:

server 192.168.40.40
driftfile /var/lib/ntp/drift

In ntpq I get:

ntpq> pe
remote refid st t when poll reach delay offset jitter
=====================================================================
192.168.40.40 192.168.40.1 2 u 32 64 377 0.174 -5.062 14.726

ntpq> as
ind assID status conf reach auth condition last_event cnt
==========================================================
1 15804 9014 yes yes none reject reachable 1

ntpq> rv 15804
assID=15804 status=9014 reach, conf, 1 event, event_reach,
srcadr=192.168.40.40, srcport=123, dstadr=192.168.40.72, dstport=123, leap=00, stratum=2, precision=-6, rootdelay=31.250, rootdispersion=11072.174, refid=192.168.40.1, reach=377, unreach=0, hmode=3, pmode=4, hpoll=6, ppoll=6, flash=00 ok, keyid=0, ttl=0, offest=-3.552, delay=0.174, dispersion=455.268, jitter=9.651

On the other server, running the rv command in ntpq results in similar output, but with flash=400 indicating peer distance exceeded, which I find odd since the NTP server is only separated by a switch, so I don't understand why ntpd would decide it's too far away.

So, if anyone can help me figure out how to get my setup to accept the NTP server I set up as valid, I would appreciate it. Thanks.
 
Old 12-16-2009, 03:07 PM   #2
harry edwards
Member
 
Registered: Nov 2007
Location: Lincolnshire, UK
Distribution: CentOS, Fedora, and Suse
Posts: 360

Rep: Reputation: 47
Could you run and post the results of the following:

Code:
ntpq -pn
I seen ntpd synchronise against the server running against the local host instead of the remote server. This is because the stratum assigned to the remote host is higher; thus, not it's trusted.

Last edited by harry edwards; 12-16-2009 at 03:22 PM.
 
Old 12-16-2009, 03:15 PM   #3
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,048

Rep: Reputation: 471Reputation: 471Reputation: 471Reputation: 471Reputation: 471
I seem to remember that ntp will stop accepting updates from an ntp server if that server hasn't been able to sync from a higher (smaller number) stratum server, it may be because your servers are isolated that you're having the issue.

hth
 
Old 12-17-2009, 09:09 AM   #4
csmith7383
LQ Newbie
 
Registered: Dec 2009
Posts: 3

Original Poster
Rep: Reputation: 0
ntpq -pn has the same output as the interactive peer command (i.e. same output as the output below the line that says ntpq> pe above).

To lay out the whole setup, (and I know this is more complicated than it needs to be, but there's a good reason) we have a "stratum 1" NTP server (whose time source is its local clock) at 192.168.40.1 that the stratum 2 NTP server at 192.168.40.40 syncs to. Then all of our workstations and servers are supposed to sync to 192.168.40.40. I can't get the two Linux machines to sync to .40 or .1. I have left them running overnight just to make sure it wasn't that I was being impatient, and they still hadn't synced when I came in in the morning.
 
Old 12-17-2009, 11:50 AM   #5
csmith7383
LQ Newbie
 
Registered: Dec 2009
Posts: 3

Original Poster
Rep: Reputation: 0
I configured one of my Linux servers to synchronize with its local clock, then set the other server to synchronize to it. Works perfectly, even with the server set at stratum 11. The main difference I can see is that rootdispersion (from ntpq command peers) is >10000 when I sync to the .40 or .1 NTP server, but is <15 when I sync to the Linux server. Maybe my .40 or .1 servers have a bad configuration that is causing the problem. Sound reasonable?
 
Old 03-16-2012, 07:07 PM   #6
gchibas
LQ Newbie
 
Registered: Mar 2012
Posts: 2

Rep: Reputation: Disabled
ntpd communicates with server, doesn't set clock

hi csmith7383,
i have the same issue, how did you solve this?


thanks,
gchibas
 
  


Reply

Tags
ntp, ntpd


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Keeping clock in sync with ntpd as client only? lukesc Linux - Server 7 12-04-2009 11:10 AM
ntpd does not adjust system clock kannerke Linux - Software 1 01-15-2009 10:31 AM
GPS or Atomic Clock for NTPD slacky Linux - Networking 3 12-15-2006 06:13 AM
On FC3 ntpd mostly uses localhost - stuffs up system clock Streagan2 Linux - Networking 3 12-23-2004 09:47 AM
Set up server as a NTPD server hanava Linux - Newbie 1 05-04-2004 02:34 PM


All times are GMT -5. The time now is 07:31 AM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration