Server time about 15 minutes wrong!

Discussion in 'Server Operation' started by edge, Aug 7, 2006.

  1. edge

    edge Active Member Moderator

    Hmmm I have no clue what is causing this!

    I'm using Debian Sarge 3.1 and I've used Falko's "The Perfect Setup - Debian Sarge (3.1)"

    In it (page 5) there is a "Synchronize the System Clock" part.
    Code:
    apt-get install ntp ntpdate
    
    I've done that.. But for some reason the server time is "now" about 15 slower than the real time!

    real time now: 19:44

    Time on server:
    Code:
    date
    Mon Aug  7 19:30:46 CEST 2006
    
    Is there a way to see if the ntpdate is working okay?
     
  2. edge

    edge Active Member Moderator

    Okay.. I think I found the problem..

    Code:
    ntpdate
     7 Aug 19:32:05 ntpdate[13128]: no servers can be used, exiting
    
    The problem is no servers can be used

    So... How do I fix this again ?
     
  3. falko

    falko Super Moderator ISPConfig Developer

    What's in /etc/default/ntpdate?
     
  4. edge

    edge Active Member Moderator

    This:

    Code:
    NTPSERVERS="pool.ntp.org"
    NTPOPTIONS="-u"
    
    I've done a ntpdate time.nist.gov, and this did set the time correct again (for now)
    Should I change the pool.ntp.org to time.nist.gov in ntpdate?
     
    Last edited: Aug 8, 2006
  5. falko

    falko Super Moderator ISPConfig Developer

    That's exactly what I wanted to suggest. :)
     
  6. Hans

    Hans Moderator ISPConfig Developer

    If I change the pool.ntp.org to time.nist.gov in ntpdate will it automaticly synchronise with the time.nist.gov timeserver or do i have to reload/restart something? If yes, what is the command.
    Please let me know.
     
  7. falko

    falko Super Moderator ISPConfig Developer

    You have to run
    Code:
    /etc/init.d/ntpdate restart
    to synchronize the time. You could create a cron job for it.
     
  8. Hans

    Hans Moderator ISPConfig Developer

    Ok thanks Falko.
     
  9. Ovidiu

    Ovidiu Active Member

    I have a strange problem: somehow my time was completely reset,... its 1. january 2000 !? but that is not the problem I am looking at... have a look at this:

    so a simple ntpdate says no servers can be used although inside /etc/default/ntpdate its says the same server:

    how strange.... any idea whats wrong?
     
  10. falko

    falko Super Moderator ISPConfig Developer

    What's the output of
    Code:
    /etc/init.d/ntpdate restart
    ?
     
  11. Ovidiu

    Ovidiu Active Member

    I do not udnerstand this anymore:

     
  12. falko

    falko Super Moderator ISPConfig Developer

    Code:
    /etc/init.d/ntpdate restart
    is the correct command to update the time. If there's no error, then it's working. :)
     
  13. Jcorrea920

    Jcorrea920 New Member

    What about FC6?

    I am running Fedora Core 6, there is no ntpdate file or deamon. I tried restarting with

    Code:
    /etc/init.d/ntpd restart
    and I don't get a single error but the clock is still 15 minutes slow. There is no /etc/default/ntpdate file. So, Where do I add

    :confused:

    Waiting for time fix.
    Thank you guys for all your wonderful support.
     
  14. falko

    falko Super Moderator ISPConfig Developer

Share This Page