NTP configuration not recognized?
Solution 1:
On Red Hat there are a couple of things that happen when you do service ntpd restart
.
-
ntpd
is stopped -
ntpdate
is run to set an initial time. This is because, by default,ntpd
will not adjust the system time past a certain threshold.ntpdate
does a one off time set using a specified time server. You can do this manually withntpdate 10.45.68.47
as long as ntpd isn't running. -
ntpd
is started again
ntpd's servers are specified in /etc/ntp.conf
but ntpdate
takes them from a file called /etc/ntp/step-tickers
. If you look in the ntpd
script in /etc/init.d
you'll notice that ntpdate
uses this file if there is anything in it (if it is empty, the ntpdate
step is skipped). You can put your time servers in here:
server 10.45.68.47
and ntpdate
will use them to set the initial time.
As an aside, you shouldn't have localhost as a time server. Use a local server and maybe some servers from the ntp pool project. Make sure they are geographically close to you for best results. Also, I would re-instate the default Red Hat config as it has some sensible defaults i.e. not allowing other servers to set the time on your server.
Solution 2:
You're apparently using Debian.
Default config options are in /etc/default/<daemon-name>
.
EDIT: okay, not Debian :)
The simple truth is that you cannot run ntpdate and ntpd on the same computer without a port collision - ntpd listens on UDP 123, and ntpdate sends from UDP 123.