1834646 Members
2296 Online
110069 Solutions
New Discussion

Re: xntpd problem

 
SOLVED
Go to solution
Luca Rasconi
Frequent Advisor

xntpd problem

Hi all,
when i try to execute xntpd in the syslog i have this message:
Nov 25 16:26:25 h3mih076 xntpd[3685]: bind() fd 4, family 2, port 123, addr 0000
0000, in_classd=0 flags=1 fails: Address already in use

What's the meaning of that message?
When I execute ntpq -p whats the meaning of refid?

Thank you
Luca
Luca
14 REPLIES 14
Armin Feller
Honored Contributor
Solution

Re: xntpd problem

Hi,

this problem may be resolved by commenting out the following
line in /etc/ntp.conf:

"broadcastclient no"

then restart 'xntpd'.

Best regards,
Armin
Robert-Jan Goossens
Honored Contributor

Re: xntpd problem

Hi Luca,

It means the proces ntpd is running.

#ps -ef | grep ntp

#/sbin/init.d/xntpd stop

now you can execute your script.

after that
#/sbin/init.d/xntp start

Kind regards

Robert-Jan.
MANOJ SRIVASTAVA
Honored Contributor

Re: xntpd problem

Hi Luca


check for the port 123 using losf and see wheter some other process is using it or not , incase there is some other process using it , either u need to kill / stop it to chcek wheter ntp restarts .

lsof | grep 123
kill -9 process id
/usr/sbin/init.d/xntpd stop
/usr/sbin/init.d/xntpd start


Manoj Srivastava
Luca Rasconi
Frequent Advisor

Re: xntpd problem

Well,
1)broadcastclient no is the default, so i don't need change ntp.conf

2)ps -ef | grep ntp tell me there are no other ntp process runnig

3)is netstat -an the same of lsof? With netstat -an, when xntpd is stopped, tell me there are no process listing on 123 port, but when xntpd is running this is the output of netstat -an | grep 123:
udp 0 0 10.215.37.1.123 *.*
udp 0 0 10.213.164.129.123 *.*
udp 0 0 *.123 *.*
udp 0 0 10.213.37.1.123 *.*
udp 0 0 127.0.0.1.123 *.*

Thank you for your response
Luca
Luca
Jean-Louis Phelix
Honored Contributor

Re: xntpd problem

Hi,

Just for your other question ... From KBRC00001347 you can read :

refid REFERENCE IDENTIFICATION

Usually the IP address of the server or the name of the external clock, but
can also be a router between the client and server.

Regards.
It works for me (© Bill McNAMARA ...)
Luca Rasconi
Frequent Advisor

Re: xntpd problem

And if refid is 0.0.0.0?

Luca
Luca
Robert-Jan Goossens
Honored Contributor

Re: xntpd problem

Hi Luca,

Refid states what kind of server GPS or HPUX or SUN/OS.

You better use this one

#ntpq -c readlist ipadres
status=06f4 leap_none, sync_ntp, 15 events, event_peer/strat_chg
system="UNIX/HPUX", leap=00, stratum=2, rootdelay=0.67,
rootdispersion=0.15, peer=41788, refid=145.4.1.2,
reftime=c18cce72.26bdc000 Mon, Nov 25 2002 17:29:38.151, poll=7,
clock=c18cced4.e4332000 Mon, Nov 25 2002 17:31:16.891, phase=0.003,
freq=-24933.67, error=0.05

Hope it helps,

Robert-Jan.
Robert-Jan Goossens
Honored Contributor

Re: xntpd problem

Just adding a bit information, the hpux server above reverse to a network GPS timeserver. (refid). 145.4.1.2

Robert-Jan.
Luca Rasconi
Frequent Advisor

Re: xntpd problem

On my host:
[h3mih076] / # ntpq -c readlist ipadres
***Can't find host ipadres

Luca
Luca
Luca Rasconi
Frequent Advisor

Re: xntpd problem

and
[h3mih076] / # ntpq -p
remote refid st t when poll reach delay offset disp
==============================================================================
10.213.37.30 0.0.0.0 16 - - 64 0 0.00 0.000 16000.0
Luca
Luca Rasconi
Frequent Advisor

Re: xntpd problem

I think i have found the cause of the problem.

[h3mih076] / # ntpdate 10.213.37.30
25 Nov 18:02:19 ntpdate[12224]: no server suitable for synchronization found

And, i don'know why, xntpd instead tell me that there are no server suitable for sync, tell me, another error. I said that, because other similar machine, with different server, suitable for sync, works fine.

This is the only explanation i found.

Regards.

Luca
Luca
James R. Ferguson
Acclaimed Contributor

Re: xntpd problem

Hi Luca:

The "address alread in use" error indicates that *at that moment*, another process was using port-123.

As suggested, the easist way to isolate it if the problem persists, is with 'lsof':

# lsof -i tcp:123
# lsof -i udp:123

Aside from 'xntp', 'ntpdate' also uses port-123. You cannot run both concurrently.

Remember too, that 'xntp' will fail to synchronize with a time source if the source time differs from the server's time by more than about 1000-seconds. In this case, 'xntpd' will die.

Use 'ntpq -pn' for checking your time associations. The 'refid' is the clock to which you are trying to synchronize. An asterisk character will appear before the address in the 'remote' column if/when time synchronization occurs.

Regards!

...JRF...

Luca Rasconi
Frequent Advisor

Re: xntpd problem

Hi James, I can't use lsof, infact I asked if netstat -an was the same.
However when I use ntpdate i stopped xntpd. I said so, because, when I try to use the able to sync server, it works fine. And when i re-use the non-able to sync server the messages with "address already in use" disappear.

However thank you very much for your information.

By Luca

Luca
MANOJ SRIVASTAVA
Honored Contributor

Re: xntpd problem