CentOS NTPd Problem (Mostly) Resolved

The NTPd problem that I wrestled with in CentOS 4.1 and again in CentOS 4.2 has finally been resolved.  Mostly.  I think.  The specific steps I took to resolve the issue came from a number of sources, so read on for all the details.

Since these servers are virtual servers running under VMware, I first consulted the VMware Knowledge Base and turned up this article on slow and fast clocks for Linux guest VMs.  Based on that information, I added a few extra commands to the grub configuration:

noapic nosmp nolapic clock=pit

In addition, I found a number of forum postings in various sites (too many to list or link here) that referenced problems with NTP and ACPI.  So, based on that information, I further edited the grub configuration to look like this:

noapic nosmp nolapic clock=pit acpi=no

Finally, based on information regarding NTP itself and the NTP configuration parameters, I added the “burst iburst” parameters to the server lines in my ntp.conf file, like this:

server W.X.Y.Z burst iburst

This helped, as at least now NTP would synchronize against something other than the local clock (which was more than it had done previously).  For some reason, though, the /var/log/messages log file was filling up with messages about synchronizing against the local clock, then synchronizing against the server, then against the local clock, etc.  (You get the picture.)

Given that I was synchronizing against a Windows Server 2003-based computer, I thought perhaps that Microsoft’s NTP implementation was simply broken.  (This certainly wouldn’t be the first time.)  So I configured OpenNTPd on an OpenBSD server (running OpenBSD 3.8) and re-configured the CentOS server to synchronize against the OpenBSD NTP server.

<aside>OpenNTPd is ridiculously simple to configure and operate, and just works.</aside>

The repetitive synchronization messages still appeared, but were appearing with far less frequency.  And the time still isn’t synchronized to the level I would like, but it does stay within a minute or so of the rest of the network (well within the 5 minute gap required in order for Kerberos authentication to work).

So, it’s still not working as cleanly as the older Red Hat Linux 9.0-based servers, but it is working.  Given that I’m still running these servers under an old version of VMware (which, technically, doesn’t support Linux 2.6 kernels) I may try upgrading to a new version of VMware to see if that helps at all.

Tags: , , , ,

4 comments

  1. Clucien’s avatar

    This seemed to work for me on a windows vmware server.

    Got the idea from http://forum.openvz.org/index.php?t=msg&goto=7153&amp;

    You are adding ‘clock=pmtmr’ and booting from the ‘EL’ kernel.

    You then add the ‘burst iburst’ to your ntp.conf.

    1) grub.conf

    default=1
    timeout=5
    splashimage=(hd0,0)/grub/splash.xpm.gz
    hiddenmenu
    title CentOS_ServerCD (2.6.9-34.ELsmp)
    root (hd0,0)
    kernel /vmlinuz-2.6.9-34.ELsmp ro

    root=/dev/VolGroup00/LogVol00 clock=pmtmr
    initrd /initrd-2.6.9-34.ELsmp.img
    title CentOS_ServerCD-up (2.6.9-34.EL)
    root (hd0,0)
    kernel /vmlinuz-2.6.9-34.EL ro

    root=/dev/VolGroup00/LogVol00 clock=pmtmr
    initrd /initrd-2.6.9-34.EL.img

    2) ntp.conf

    server 3.us.pool.ntp.org burst iburst
    server 2.us.pool.ntp.org burst iburst
    server 1.us.pool.ntp.org burst iburst
    ———–

    I hope this helps someone.

  2. slowe’s avatar

    Clucien–I appreciate the info.

    Scott

  3. Chris Van Den Abbeele’s avatar

    just my 2 cents :
    I guess the correct syntax is acpi=off iso acpi=no
    VM clock drift depends on the cpu of the host, if it does speed stepping then you’ll need acpi=off (on the host and on the vm’s)
    chris

  4. slowe’s avatar

    Chris,

    I believe that I finally got it working reasonably well with “acpi=off nosmp clock=pit noapic” (or similar; I can’t remember the exact syntax right at this moment). In addition, I added “burst iburst” to the ntp.conf file where the server(s) were defined. After those changes, it seemed to work reasonably well (still the occasional synchronization message in the log files).

    Thanks for the help.

    Scott

Comments are now closed.