Skrevet av Emne: My xntpd server is running, but it is unusable for clients  (Lest 4826 ganger)

ATC

  • Gjest
My xntpd server is running, but it is unusable for clients
« på: 27. ſeptember 2008, 18:24 pm »
  • [applaud]0
  • [smite]0
  • The xntpd daemon appears to be working, but running ntpdate on a client yields the error message "no server suitable for synchronization found" or something to the similar effect.

    What's more, when trying to figure out what's going on you may discover than one or more of the setup/monitoring utilities segfault, thus adding insult to injury.



    ATC

    • Gjest
    [Solved] My xntpd server is running, but it is unusable for clients
    « Svar #1 på: 27. ſeptember 2008, 18:24 pm »
  • [applaud]0
  • [smite]0
  • First of all, there is an NTP FAQ available, which can be useful for your troubleshooting although it doesn't really explain how to solve the problems:

    http://www.eecis.udel.edu/~ntp/ntpfaq/NTP-s-trouble.htm#AEN3660

    Secondly, I found no RPMs with diagnostic/monitoring utilities that worked, so I had to cook my own setup. Be warned; this is what worked for me, I offer no promises or guarantees that it will work for anyone else:

    1. Download and install xntp3-5.91_export-3 (I found mine at ftp://sunsite.uio.no/) This step is optional, but you will save a lot of work setting up init scripts and so on.

    2. Edit "/etc/rc.d/init.d/xntpd.init":

        a) Insert a "restart" section, this is just to save you a lot of typing when working with NTP:
            restart)
                    $0 stop
                    $0 start
                    echo
                    ;;

        b) Insert an "/usr/sbin/ntpdate fartein.ifi.uio.no" command in the "start" section, specify the nameserver of your choice.

    3. Edit "/etc/ntp.conf" to contain the following:

    server fartein.ifi.uio.no
    server time.alcanet.no
    server 127.127.1.0
    fudge 127.127.1.0 stratum 10
    driftfile /var/run/ntp.drift
    logconfig =syncevents +peerevents +sysevents +allclock
    multicastclient                 # listen on default 224.0.1.1
    broadcastdelay  0.008

    4. Now download xntp3-5.93.tar.gz and extract it (tar xvfz xntp3-5.93.tar.gz)

    5. Configure it by running "./configure", I got no error messages

    6. Compile and install it by running "make" and then "make install"

    7. Stop any running NTP daemon; "service xntpd.init stop"

    8. Now you have two different versions of xntpd installed, but only one of them works. Now type the following three commands to copy the working binaries over the non-working ones installed by the RPM:

    cp /usr/local/bin/ntpq /usr/sbin/ntpq
    cp /usr/local/bin/xntpd /usr/sbin/xntpd
    cp /usr/local/bin/xntpdc /usr/sbin/xntpdc

    9. Start up your newly created monster by typing "service xntpd.init start"

    10. Now wait 5-10 minutes, then type "ntpq -p". You should get something like this:

         remote           refid      st t when poll reach   delay   offset    disp
    ==============================================================================
     LOCAL(0)        LOCAL(0)        10 l   15   64  377     0.00    0.000   10.01
    *fartein.ifi.uio err.ee.ethz.ch   2 u   44   64  377    15.50  -76.760   17.62
    +ns2.alcatel.no  faui44b.informa  2 u   44   64  377    24.03  -73.242   23.93

    11. Now try the client again, good luck.