Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: can't syncronize ntp

Hybrid View

  1. #1
    Join Date
    Jan 2014
    Beans
    13

    can't syncronize ntp

    hi guys, i have server 2012 with ntp service,
    on ubuntu if have configured /etc/ntp.conf , i have added my server
    and i can see it with the command ntpq -p

    remote refid st t when poll reach delay offset jitter
    ================================================== ============================
    server2012dom.a .LOCL. 1 u 47 64 377 0.408 0.872 8.676

    i have tried
    sudo ntpdate -u 192.168.16.207
    sudo ntpdate -s 192.168.16.207

    restart the service and reboot the computer
    the date remain the same as he was,
    any solution?
    10x

  2. #2
    Join Date
    Jul 2013
    Location
    Wisconsin
    Beans
    4,501

    Re: can't syncronize ntp

    Try it with the -d flag for debugging mode.
    Try it without the -s flag so output is to the screen instead of log.

  3. #3
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    12,981
    Distro
    Kubuntu 14.04 Trusty Tahr

    Re: can't syncronize ntp

    You also need to write the timestamp to the hardware clock after updating. NTP only updates the system time, not the hardware clock. To do that, run the command
    Code:
    sudo hwclock --systohc
    after running ntpdate.

    If you run ntpdate and then use the "date" command, is the time updated? If so, then the problem is the hardware clock.
    If you ask for help, do not abandon your request. Please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  4. #4
    Join Date
    Aug 2009
    Location
    Makati City, Philippines
    Beans
    2,270
    Distro
    Xubuntu 16.04 Xenial Xerus

    Re: can't syncronize ntp

    Code:
    sudo ntpq -c lpeer
    Show which NTP servers the machine is contacting. * symbol before the server means the local machine is currently syncing on this server.

    Code:
    ntpdate ntp_server_IPaddress
    If the time difference from an NTP server to your local machine is too great (e.i. more than 30 mins) ntp service can take a long time to synchronize their times.
    To synchronize quickly, use ntpdate.


    Stop the ntp service, because you can't use ntpdate while ntp service is running.
    Code:
    sudo service ntp stop
    Run ntpdate at least 3 times and you'll see that time adjustment it made.
    Code:
    ntpdate ntp_server_IPaddress
    Run the ntp service again
    Code:
    sudo service ntp start
    After a few minutes, try checking the ntp peer on which your machine is synced.
    Code:
    sudo ntpq -c lpeer
    Last edited by nerdtron; August 12th, 2014 at 07:29 PM.

  5. #5
    Join Date
    Oct 2005
    Location
    Al Ain
    Beans
    8,937

    Re: can't syncronize ntp

    Howdy,
    If the time difference between the computer and the NTP server is very different, then the NTP client will refuse to change the clock. The ntpdate command however doesn't have any such protection.

  6. #6
    Join Date
    Jan 2014
    Beans
    13

    Re: can't syncronize ntp

    the main server that run ntp is server 2012 running on vmware so how can if fix hardware clock problem?
    the server date and time is exact as the physical computer he has installed.
    when i syncronize xp ,7 or any microsoft vmware with the server there is no problem, its only on ubuntu, i have only just one ubuntu that sync as exact time as my real machine.

    i have typed the command
    sudo hwclock --systohc



    i have turn of the UTC on /etc/default/rcS , still the saem

  7. #7
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    12,981
    Distro
    Kubuntu 14.04 Trusty Tahr

    Re: can't syncronize ntp

    As I asked earlier
    If you run ntpdate and then use the "date" command, is the time updated?
    Is UDP port 123 open on all these machines? Firewalls?
    If you ask for help, do not abandon your request. Please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  8. #8
    Join Date
    Jan 2014
    Beans
    13

    Re: can't syncronize ntp

    i can't understand the syntax ntpdate date, how?
    there is no firewall on the server , on windows xp it works.

  9. #9
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    12,981
    Distro
    Kubuntu 14.04 Trusty Tahr

    Re: can't syncronize ntp

    Quote Originally Posted by aviv2 View Post
    i can't understand the syntax ntpdate date, how?
    Code:
    [Seiji@GhostWorld ~]$ sudo ntpdate 0.centos.pool.ntp.org
    21 Aug 13:30:39 ntpdate[31482]: adjust time server 199.102.46.75 offset -0.003638 sec
    [Seiji@GhostWorld ~]$ date
    Thu Aug 21 13:30:49 EDT 2014
    If you ask for help, do not abandon your request. Please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  10. #10
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    12,981
    Distro
    Kubuntu 14.04 Trusty Tahr

    Re: can't syncronize ntp

    As I asked earlier
    If you run ntpdate and then use the "date" command, is the time updated?
    If you ask for help, do not abandon your request. Please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

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