Operating System - HP-UX
1833777 Members
2160 Online
110063 Solutions
New Discussion

Re: xntpd is not synchronizing with the time server.

 
Rodolfo Monge
New Member

xntpd is not synchronizing with the time server.

Hi.

I can't make work the xnpd daemon.

The /etc/ntp.conf file has configured the next line:

server timeserv version 3 prefer

In the /etc/hosts :
192.168.4.50 timeserv

In the /etc/rc.config.d/netdaemons

export NTPDATE_SERVER=
XNTPD=1
export XNTPD_ARGS=

When i run the command ntpd -p the result is:
# ntpq -p
remote refid st t when poll reach delay offset disp
==============================================================================
timeser 0.0.0.0 15 u 593 1024 377 1.54 -239.96 91.96



Why didn't the daemon synchronize ?


6 REPLIES 6
Patrick Wallek
Honored Contributor

Re: xntpd is not synchronizing with the time server.

Is there an NTP daemon running on 192.168.4.50?

# ntpq -p 192.168.4.50

What does the above return?
Rodolfo Monge
New Member

Re: xntpd is not synchronizing with the time server.

The 192.168.4.50 server is a W2K Advance Server, Running a Time Server (Net Time 2.0)
(see the screenshot)

The result:

# ntpq -p 192.168.4.50
192.168.4.50: timed out, nothing received
***Request timed out

but, when a run
ntpdate 192.168.4.50

it's work.

Jeff Schussele
Honored Contributor

Re: xntpd is not synchronizing with the time server.

Hi Rodolfo,

IF this system is more than 15 minutes or so (1000 seconds to be exact) away from the server then xntpd cannot sync - it's too far to slew.

If it is then you'll need to use the ntpdate or date commands to get closer & then kick off xntpd.

You should check the syslog.log file for confirmation of this.

DO NOT move time backwards while applications are up & running. Most DBs will choke & die if time moves backwards. Instead use date -a to slowly slew time backwards - it just makes each actual second a little longer so actual time catches up.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Angus Crome
Honored Contributor

Re: xntpd is not synchronizing with the time server.

Not that this is the case, but you should check your hosts file, dns service and ntp.conf file (again to see if the spelling is correct). There is a discrepancy between your two posted names (timeser and timeserv). It is probably just a cut and paste problem, but worth checking, none the less.
There are 10 types of people in the world, those who understand binary and those who don't - Author Unknown
Cole L.
Advisor

Re: xntpd is not synchronizing with the time server.

Check the /etc/ntp.conf file for the time server stuff or set it up through SAM.

Sample /etc/ntp.conf
server server.name.com version 3
server server2.name.com version 3 prefer
Bill Hassell
Honored Contributor

Re: xntpd is not synchronizing with the time server.

ntpq -p should respond. If it does not, it may not be running NTP protocol at all. NTP predates Windows-anything and it's only recently that Windows (XP) has even provided an NTP client. Now if the Windows program is truly NTP-compliant, then the admin may have disabled ntpq queries due to a minor denial of service bug a couple of years ago. So to make sure that ntpdate actually works, check the time on the server, then use:

ntpdate -d 192.168.4.50

If it reports lots of details, all is well. Then force the setting of the clock with:

ntpdate -b 192.168.4.50

NOTE: NEVER do this with a database running. Same with the date command--never change the date or time with a database running. ntpdate is only to be used during bootup.

Change your startup parameters:

export NTPDATE_SERVER=192.168.4.50

and in your /etc/ntp.conf file, you can keep the server line, but add:

server 127.127.1.0
fudge 127.127.1.0 stratum 10
driftfile /etc/ntp.drift

The two 127... lines tell NTP to use the internal clock in case the external clock is not responding. Note also that you can see what's happening with xntpd with:

grep xntpd /var/adm/syslog/syslog.log

If you make changes to /etc/ntp.conf, ne sure to:

/sbin/init.d/xntpd stop
/sbin/init.d/xntpd start

and then:

tail /var/adm/syslog/syslog.log


Bill Hassell, sysadmin