1833476 Members
3003 Online
110052 Solutions
New Discussion

NTP Problem

 
Patricia Tang
Advisor

NTP Problem

I have recently setup NTP in HP-UX 10.20.
Everytime xntpd services start, Server prompt error messages of " /usr/sbin/ntpdate : the NTP socket is in use , existing" . I notice that the xntpd services is not startup properly.

Anyone know what's going wrong?

Thanks in advanced !!!

Regard,
Pat
5 REPLIES 5
Santosh Nair_1
Honored Contributor

Re: NTP Problem

First, check if xntpd is already running on the system. If not, then make sure that the upd port 123 is not already in use. You can check this using the netstat command, i.e.:

netstat -na|grep 123

and look for an entry like:

udp 0 0 *.123 *.*

If this you do see this, then some other process is using NTP's port. You can trace down the process using lsof using the syntax:

lsof -i UDP:123

which will give you the proc id and the owner of the proc (most likely root since that's a privledged port).

-Santosh
Life is what's happening while you're busy making other plans
James R. Ferguson
Acclaimed Contributor

Re: NTP Problem

Hi Patricia:

Are you trying to run BOTH 'ntpdate' and 'xntpd' concurrently? If so, this is the problem. Both processes use the same port. Do a 'ps -ef|grep ntpdate' to verify this.

Regards!

...JRF...
Santosh Nair_1
Honored Contributor

Re: NTP Problem

Opps, missed the fact that you were trying to run ntpupdate...like James said, you can't run ntpupdate while the xntpd daemon is running. But then why would you want to since xntpd should be synching up the time anyway.

Also take a look at this thread for some more information on ntp:

http://forums.itrc.hp.com/cm/QuestionAnswer/1,1150,0xb6388ffa98a2d5118ff10090279cd0f9,00.html

-Santosh
Life is what's happening while you're busy making other plans
John Payne_2
Honored Contributor

Re: NTP Problem

When you say ntp will not start, do you mean in the bootup process, or by stopping and starting manually, or both? If you are trying manual restarts, are you looking to see that ntp is actually dying? I used to see where ntp would not die properly from /sbin/init.d/xntpd stop...

Applying patch PHNE_23717 seems to have resolved this problem.

If not starting at reboot, I agree that you should verify that nothing else is using that port. If you determine that nothing else is using that port during normal runtime, possibly move the ntp startup to a later time in the bootup???
Spoon!!!!
Sridhar Bhaskarla
Honored Contributor

Re: NTP Problem

Try netstat -an |grep 123 to see if the port is already in use. If xntpd/ntpdate are both not running and if you are seeing this port in use, you may need to investigate why this port is being used.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try