Submit Your Article Forum Rules
Results 1 to 4 of 4

Thread: server is not getting synchronized with ntp server

  1. #1

    server is not getting synchronized with ntp server

    Hello Guys,

    i have a problem my local server is not getting synchronized with ntpd server.

    1)ntpq -p is giving the following output

    remote refid st t when poll reach delay offset jitter

    ================================================== ============================

    ntp1 16 u - 64 0 0.000 0.000 4000.00

    ntp2 16 u - 64 0 0.000 0.000 4000.00

    (i)i know that if there is no * mark in front of any ntp server means no ntp server is running is my understanding correct?

    (ii)in the above output of ntpq -p what is the significance of refid and it's value here is can some body explain this?

    2) while i am trying to restart ntps service it's failing and saying the following message

    service ntpd start

    ntpd: Synchronizing with time server: [FAILED]

    Starting ntpd: [ OK ]

    3) here i am pasting the /etc/ntp.conf file

    vi /etc/ntp.conf

    # Prohibit general access to this service.

    driftfile /var/lib/ntp/drift


    restrict nomodify notrap noquery

    restrict nomodify notrap noquery

    server ntp1 version 3

    server ntp2 version 3

    restrict default ignore

    # Permit all access over the loopback interface. This could

    # be tightened as well, but to do so would effect some of

    # the administrative functions.

    # -- CLIENT NETWORK -------

    # Permit systems on this network to synchronize with this

    # time service. Do not permit those systems to modify the

    # configuration of this service. Also, do not use those

    # systems as peers for synchronization.

    # restrict mask notrust nomodify notrap

    # --- OUR TIMESERVERS -----

    # or remove the default restrict line

    # Permit time synchronization with our time source, but do not

    # permit the source to query or modify the service on this system.

    # restrict mytrustedtimeserverip mask nomodify notrap noquery

    # server mytrustedtimeserverip


    #multicastclient # listen on default

    # restrict mask notrust nomodify notrap

    # restrict mask notrust nomodify notrap



    # Undisciplined Local Clock. This is a fake driver intended for backup

    # and when no outside source of synchronized time is available. The

    # default stratum is usually 3, but in this case we elect to use stratum

    # 0. Since the server line does not have the prefer keyword, this driver

    # is never used for synchronization, unless no other other

    # synchronization source is available. In case the local host is

    # controlled by some external source, such as an external oscillator or

    # another protocol, the prefer keyword would cause the local host to

    # disregard all other synchronization sources, unless the kernel

    (i)in the above ntp.conf file i found the following lines are these correct and are ntp servers we are using

    restrict nomodify notrap noquery

    restrict nomodify notrap noquery

    4) pls also find ntpdate -d (ntp server )

    ntpdate -d

    11 Jun 14:43:38 ntpdate[12230]: ntpdate 4.1.2@1.892 Tue Feb 24 06:32:26 EST 2004 (1)





    transmit( Server dropped: no data

    server, port 123

    stratum 0, precision 0, leap 00, trust 000

    refid [], delay 0.00000, dispersion 64.00000

    transmitted 4, in filter 4

    reference time: 00000000.00000000 Thu, Feb 7 2036 14:28:16.000

    originate timestamp: 00000000.00000000 Thu, Feb 7 2036 14:28:16.000

    transmit timestamp: cddb261d.f2249a13 Thu, Jun 11 2009 14:43:41.945

    filter delay: 0.00000 0.00000 0.00000 0.00000

    0.00000 0.00000 0.00000 0.00000

    filter offset: 0.000000 0.000000 0.000000 0.000000

    0.000000 0.000000 0.000000 0.000000

    delay 0.00000, dispersion 64.00000

    offset 0.000000

    11 Jun 14:43:42 ntpdate[12230]: no server suitable for synchronization found

    5) drift file from /var/lib/ntp/drift


    is it compulsory drift value always should be 0 if it's so how can we change here this value to 0.

    kindly check this and provide your valuable feedback why ntp server is not synchronizing with my server.

  2. #2

    Re: server is not getting synchronized with ntp server

    The output of the ntpq command is indicating that the configured ntp servers don't exist, or aren't talking. Looking at your config file, it would appear you have blocked the two NTP servers you want to talk to, and have configured the client to talk to the default example servers that are set when you first install NTP, and which don't actually exist (ntp1 and ntp2 not being valid hostnames).

    It looks like your server is set up to not query the two ntp servers you want to use. Stop the NTP service and rename the current configuration file to "/etc/ntp.conf.bak" and create a new config file at the old location. The contents of the file should be as follows:
    server prefer
    #Only include this line if you want to use this server to sync other servers on your internal network
    fudge <your ip> stratum 10
    driftfile /var/lib/ntp/drift
    broadcastdelay 0.008
    authenticate no
    Then, restart the ntp service. It should try to sync automatically, which should get you all set. Just to be sure, or if the sync fails, try running the ntpq -p command again. This time it should list the two IPs that you want to get the time from, with the first one having a * since it is prefferred. Refid may still be - that is normal. The timing columns should get valid times in seconds showing timeouts and response times.

    If this fails, you can create a cron job that will automatically update the time every hour, by entering the following on the command line:
    echo 'ntpdate -b' > /etc/cron.hourly/time.cron
    chmod a+x /etc/cron.hourly/time.cron
    The best way to learn anything, is to question everything.
    Hidden Content

  3. #3
    My setup
    From FreeBSD 8.0

    # $FreeBSD: ports/net/openntpd/files/ntpd.conf,v 1.1 2009/08/03 13:58:59 naddy E
    # sample ntpd configuration file, see ntpd.conf(5)

    # Addresses to listen on (ntpd does not listen by default)
    listen on your servers ip address ie:

    # sync to a single server

    We use Virginia Tech; but you should use one closer to you.
    "The future is here. It's just not evenly distributed.

  4. #4
    I had the same problem
    And add the servers ip in /etc/ntp/step-tickers
    and restart the service ntpd and it will work...

Similar Threads

  1. backup local server to web server - recommend service or software?
    By Katt in forum Web Programming Discussion Forum
    Replies: 5
    Last Post: 11-09-2009, 02:26 PM
  2. Image hosting - Same server or different server?
    By AjiNIMC in forum Search Engine Optimization Forum
    Replies: 9
    Last Post: 05-18-2007, 05:45 AM
  3. Power up your Server; world's first vegetable powered server
    By TrafficProducer in forum The Castle Breakroom (General: Any Topic)
    Replies: 3
    Last Post: 12-21-2005, 03:58 PM
  4. Looking to Share Dedicated Server - MS SQL Server 2000
    By supernatural_247 in forum IT Discussion Forum
    Replies: 3
    Last Post: 04-22-2005, 02:03 PM
  5. Windows Server - E-Mail Server
    By gofer01 in forum IT Discussion Forum
    Replies: 0
    Last Post: 01-08-2004, 10:36 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts