When I try to synchronize time using NTP. Using the below command
sudo ntpdate -b pool.ntp.org
I get this error saying NTP socket is in use. How to fix this?
18 Jan 05:53:49 ntpdate[21340]: the NTP socket is in use, exiting
12.04ntp
When I try to synchronize time using NTP. Using the below command
sudo ntpdate -b pool.ntp.org
I get this error saying NTP socket is in use. How to fix this?
18 Jan 05:53:49 ntpdate[21340]: the NTP socket is in use, exiting
Best Answer
Indicates that you have an NTP daemon running, usually the one via the
ntp
package. You can't have two applications adjusting the clock at the same time.First stop the current NTP daemon running:
Run your
ntpdate
command.Start the NTP daemon again:
Background
The NTP daemon will not take large steps forwards or backwards, but is useful for very smooth and small transitions. Before it will work correctly, sync the time using
ntpdate
first, for that reason. You can query the status of the daemon like this: