1819814 Members
4003 Online
109607 Solutions
New Discussion юеВ

NTP Socket problem

 
SOLVED
Go to solution
Craig A. Sharp
Super Advisor

NTP Socket problem

Hi,

I am using ntpdate to pull time info from our master router. Up until now this has been working fine.
All of a sudden, I am receiving the following error:

The NTP socket is in use, exiting.

I know that the socket on the router is working as I sync several servers to the router and they are working correctly.

This is only happening on the one server.

I have tried killing and restarting the xntpd process but this has not helped.

Any suggestions?

Thanks,

Craig
6 REPLIES 6
James R. Ferguson
Acclaimed Contributor
Solution

Re: NTP Socket problem

Craig:

Check /var/adm/syslog/syslog.log for the full message.

Are your running BOTH 'ntpdate' and 'xntpd' concurrently? If so, this is the problem.

...JRF...
Rita C Workman
Honored Contributor

Re: NTP Socket problem

Wait till you get more responses....

But, killing a process does not necessarily free up everything. A file could have been left open, so to the system....something is still trying to hold onto the socket. Or another process may be using the file, even though you killed one, the other is using it.
You may want to try using lsof (if you have this), it is a very handy tool that you can use to see what files are still open. The other thing would be, make sure when you stopped the process...everything got stopped. Do a ps -ef | grep ntp and if need be do a sigkill to get rid of anything that shouldn't be there. You can also use fuser to check for something hanging too.

Just a couple thoughts,
James R. Ferguson
Acclaimed Contributor

Re: NTP Socket problem

Craig:

Check /var/adm/syslog/syslog.log for the full message.

Are your running BOTH 'ntpdate' and 'xntpd' concurrently? If so, this is the problem.

...JRF...
Alan Riggs
Honored Contributor

Re: NTP Socket problem

I think James is on the right track. ntpdate is designed as a lower network load alternative to xntp. The two should not be run concurrently.
Rick Garland
Honored Contributor

Re: NTP Socket problem

The two commands should not be running at the same time. More than likely, this is what is happening.

The is 'lsof' which will enable you to comfirm this is what is happening. If it isn't happening, then 'lsof' will tell you what is on the port.
Craig A. Sharp
Super Advisor

Re: NTP Socket problem

Got it! xntpd was running. I shutdown xntpd and ntpdate started working.

Thanks for all the replies!

Craig