[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: ntpdate



Clyde <bytor1@telia.com> wrote:

Hello I am having a problem with ntpdate and wonder if someone could give me a clue. I have used apt-get to install ntpdate and I have found three ntp
> servers which I would like use.
My problem is how do I get it up and running. I do not have a
> permanent internet connection so that is why I was thinking of using
> ntpdate with cron to update the time when I am on line.

I used this:
/usr/sbin/ntpdate ntp.lth.se clock.netcetera.dk clock2.netcetera.dk
and got this response:
 9 Aug 15:55:53 ntpdate[31009]: the NTP socket is in use, exiting
I am not sure if this is right but it does not seem like it to me. Thanks for any help,
Clyde

Clyde,

Pardon me for re-formatting your message, but it was posted as a "rtf" attachment that I had to process through an external editor that could read it. I hope I captured it correctly.

Getting to your problem... It appears that something else is running that is using the NTP socket, and the prime suspect is the "ntp" program. You can check and see if this package is installed by looking for /etc/init.d/ntp and/or looking for a 'ntpd' process that is running. If you find either or both, I would suggest you first remove this package. While both offer time tracking services, they are quite different packages and you have to take some care in setting them up to have both on your system. NTPDATE will not run if NTP is running. Once you either stop ntpd or remove the NTP package, then try your command again and see if it updates the system time. If you don't find the ntp package installed, then I am at a loss as to what is going on. Perhaps an examination of your running processes might reveal the culprit.

You don't describe the nature of your intermittant connection, but if it is via a dial-up modem connection (either ppp or pppoe) then an alternative to running this as a "cron" job would be to place the ntpdate run-script in the "/etc/ppp/ip-up.d/ " directory. This way it will update your system clock everytime you connect, whereas the cron job will fail if the automatic time set in cron comes during a period when you are not connected. If you have some type of autodial installed this becomes a "nit", and will probably only annoy you with periodic dial-outs when the cron job is run.

Cheers,
-Don Spoon-





Reply to: