Linux - SoftwareThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
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
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.
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.
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.
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.
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?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.