1833772 Members
2313 Online
110063 Solutions
New Discussion

Re: NTP problem

 
Norman Lowe
Frequent Advisor

NTP problem

I have a box running 11.23 Itanium and am trying to get NTP to work. If I configure the /etc/ntp.conf and /etc/rc.config.d/netdamons files and startup xntpd using /sbin/init.d/xntpd start it works okay, but rebooting the machine breaks it. My /etc/ntp.conf file looks like this:

server timehost1.devenv1.bt.co.uk prefer
server timehost2.devenv1.bt.co.uk
driftfile /var/ntp/ntp.drift

and the relevant lines in netdaemons are:

export NTPDATE_SERVER=
XNTPD=1
export XNTPD_ARGS=

After starting xntpd, ntpq -p shows:

remote refid st t when poll reach delay offset disp
==============================================================================
hwdusi04e2 10.240.52.101 3 u 59 64 17 0.27 -0.794 1879.20

However, after a reboot I find that the server names have been changed to 0.0.0.0 like so:

server 0.0.0.0 prefer
server 0.0.0.0
driftfile /var/ntp/ntp.drift

and the following line in the netdaemons file has also been changed:

export NTPDATE_SERVER="0.0.0.0"

ntpq -p now gives:

remote refid st t when poll reach delay offset disp
==============================================================================
0.0.0.0 0.0.0.0 16 - - 64 0 0.00 0.000 16000.0

I two other similar systems which are both behaving normally andI'm struggling to find any differences between this one and those. What's going on?
8 REPLIES 8
Geoff Wild
Honored Contributor

Re: NTP problem

Well - the issue is your netdaemons file is being over written at boot...

You need to find out what is doing that - check for a newconfig file:

/usr/newconfig/etc/rc.config.d/netdaemons

Does that have
export NTPDATE_SERVER="0.0.0.0"

The rest of your stuff is fine...

Also check /sbin/init.d/xntpd

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
James R. Ferguson
Acclaimed Contributor

Re: NTP problem

Hi Norman:

See if yuo have PHCO_33171 installed. This would appear to the be source of your problem.

http://www2.itrc.hp.com/service/patch/patchDetail.do?BC=patch.breadcrumb.main|patch.breadcrumb.search|&patchid=PHCO_33171&context=hpux:800:11:23

Regards!

...JRF...
rick jones
Honored Contributor

Re: NTP problem

If the patch suggestion doesn't pan-out, any chance you are using DHCP to configure your IP address(es)?
there is no rest for the wicked yet the virtuous have no pillows
Nguyen Anh Tien
Honored Contributor

Re: NTP problem

The steps to configure a system to be an NTP Server are:
1. Edit the /etc/rc.config.d/netdaemons file to configure the xntpd daemon to startup every time the system boots. Set the XNTPD variable to equal 1
export NTPDATE_SERVER= Timer server IP
export XNTPD=1
export XNTPD_ARGS=
For NTP servers, do not set the NTPDATE_SERVER variable (leave it blank). This variable is for NTP clients.
2. Edit the /etc/TIMEZONE file and specify the correct time zone for the system. Set the TZ variable to equal the time zone for the system. See the /usr/lib/tztab file for a list of all the available time zones.
TZ=CST6CDT
export TZ
3. Edit the /etc/ntp.conf file and define the NTP server (as described earlier in this module). Below is an example for defining an NTP server to use its local clock:
server 127.127.1.1
fudge 127.127.1.1 stratum 10
4. Start the xntpd daemon manually by executing the following command:
sbin/init.d/xntpd start
5. Wait. It could take up to 6 minutes for the xntpd daemon to start.
6. Verify the NTP server configuration (and its association with peer NTP servers) by executing the following command:
ntpq -p
HP is simple
Nguyen Anh Tien
Honored Contributor

Re: NTP problem

Remember that:
At server: U only need to set: the XNTPD variable to equal 1 (/etc/rc.config.d/netdaemon). Others parameter should keep it be blank.
At client: U must set all below parameter:
export NTPDATE_SERVER='NTP server1 NTP server2'
export XNTPD=1
export XNTPD_ARGS=
and /etc/ntp.conf:
broadcastclient yes
server NTP server
driftfile /etc/ntp.drift


Pls review your confs again

HP is simple
Shameer.V.A
Respected Contributor

Re: NTP problem

Hi Norman,
Please find the attached procedure to follow for install /verify your NTP Installation.

Regards,

Shameer
.... See invisible, feel intangible and achieve impossible as everything is possible ....
Norman Lowe
Frequent Advisor

Re: NTP problem

Thanks for all your replies. The notes for the patch and the mention of DHCP helped me to track down and solve the problem.

DHCP was for some reason enabled for the primary network interface in the netconf file, even though we don't use DHCP. Having turned it off, the NTP client now behaves perfectly.
rick jones
Honored Contributor

Re: NTP problem

BTW, it is excellent you have more than one server configured but you may want to add a server unrelated to the two you have in your ntp.conf file.
there is no rest for the wicked yet the virtuous have no pillows