PDA

View Full Version : Server time about 15 minutes wrong!


edge
7th August 2006, 19:43
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.

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:

date
Mon Aug 7 19:30:46 CEST 2006


Is there a way to see if the ntpdate is working okay?

edge
7th August 2006, 19:47
Okay.. I think I found the problem..


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 ?

falko
8th August 2006, 18:30
What's in /etc/default/ntpdate?

edge
8th August 2006, 19:18
What's in /etc/default/ntpdate?

This:


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?

falko
9th August 2006, 16:37
Should I change the pool.ntp.org to time.nist.gov in ntpdate?
That's exactly what I wanted to suggest. :)

Hans
9th August 2006, 23:12
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.

falko
10th August 2006, 18:28
You have to run
/etc/init.d/ntpdate restart to synchronize the time. You could create a cron job for it.

Hans
10th August 2006, 23:02
Ok thanks Falko.

Ovidiu
1st October 2006, 16:17
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:

h898552:/home/ovi# ntpdate
1 Oct 16:14:19 ntpdate[30003]: no servers can be used, exiting
h898552:/home/ovi# ntpdate europe.pool.ntp.org
1 Oct 16:14:29 ntpdate[30011]: adjust time server 80.51.167.97 offset -0.074886 sec
h898552:/home/ovi#


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

# servers to check. (Separate multiple servers with spaces.)
NTPSERVERS="europe.pool.ntp.org"
#
# additional options for ntpdate
#NTPOPTIONS="-v"
NTPOPTIONS="-u"


how strange.... any idea whats wrong?

falko
2nd October 2006, 12:55
What's the output of /etc/init.d/ntpdate restart?

Ovidiu
3rd October 2006, 21:28
I do not udnerstand this anymore:

h898552:/var/www/web2/log# /etc/init.d/ntpdate restart
Running ntpdate to synchronize clock.

falko
4th October 2006, 18:20
/etc/init.d/ntpdate restart
is the correct command to update the time. If there's no error, then it's working. :)

Jcorrea920
8th November 2006, 19:45
I am running Fedora Core 6, there is no ntpdate file or deamon. I tried restarting with

/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

time.nist.gov:confused:

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

falko
9th November 2006, 16:52
Have a look at http://www.howtoforge.com/installing_a_lamp_system_with_fedora_core_6_p6 :

yum install ntp

chkconfig --levels 235 ntpd on
ntpdate 0.pool.ntp.org
/etc/init.d/ntpd start