Operating System - HP-UX
1827611 Members
3359 Online
109966 Solutions
New Discussion

Re: NTP not working - coundn't start !

 
SOLVED
Go to solution
DnD_1
Regular Advisor

NTP not working - coundn't start !

i had tried to start the ntp from SAM, but it couldn't start.....

anyone pls suggest the solution ?

here are the information...

bank1:/sbin/init.d #ntpq -p
ntpq: read: Can't assign requested address

bank1:/sbin/init.d #/sbin/init.d/xntpd start

bank1:/sbin/init.d #ps -ef | grep ntp
root 9596 9496 0 16:00:06 pts/2 0:00 grep ntp

bank1:/sbin/init.d #ntpdate -d 10.15.144.1
transmit(10.15.144.1)
transmit(10.15.144.1)
transmit(10.15.144.1)
transmit(10.15.144.1)
transmit(10.15.144.1)
server 10.15.144.1, port 123
stratum 0, precision 0, leap 00, trust 000
refid [0.0.0.0], delay 0.00000, dispersion 64.00000
transmitted 4, in filter 4
reference time: 00000000.00000000 Thu, Feb 7 2036 7:28:16.000
originate timestamp: 00000000.00000000 Thu, Feb 7 2036 7:28:16.000
transmit timestamp: cdd7980f.029d7000 Mon, Jun 8 2009 16:00:47.010
filter delay: 0.00000 0.00000 0.00000 0.00000
0.00000 0.00000 0.00000 0.00000
filter offset: 0.000000 0.000000 0.000000 0.000000
0.000000 0.000000 0.000000 0.000000
delay 0.00000, dispersion 64.00000
offset 0.000000

8 Jun 16:00:48 ntpdate[9600]: no server suitable for synchronization found


bank1:/sbin/init.d #ntpdate 10.15.144.1
8 Jun 16:01:32 ntpdate[9603]: no server suitable for synchronization found

15 REPLIES 15
James R. Ferguson
Acclaimed Contributor
Solution

Re: NTP not working - coundn't start !

Hi:

If you server's time differs from true time by more than 1000 seconds, NTP will fail to attempt to synchronize. Verify _your_ time with 'date -u'. Remember, NTP uses universal (UTC) time. Your server displays local time according to your TZ setting.

Regards!

...JRF...
DnD_1
Regular Advisor

Re: NTP not working - coundn't start !

hi james...

the time almost the same, different about 30 seconds...

but the ntp still cannot start...
Rita C Workman
Honored Contributor

Re: NTP not working - coundn't start !

Not too long ago we found our systems getting out of time sync. We had one internal server (serverTime) sync to an external internet-time-server. Hadn't noticed that the external internet-time-server had been removed, so all our other internal servers that sync to(serverTime) began to get farther and farther off.

I'd suggest starting from the beginning to fix time (...that sounds so Isaac Asimov..).
Stop xntpd
Confirm and assign internal server(s) to external time source.
Confirm your primary internal time server(s) are now syncing properly to external time source(s).

Once the above looks good....stop/start time on your secondary servers that sync internally to your internal primary time server(s).

...and like Jim said - if they are too far off, you'll have to manually reset the time to something closer. But if your going forward in time - not so bad. Do NOT go backwards in time, as you could have database issues. Co-ordinate for those situations.

Rgrds,
Rita
Mel Burslan
Honored Contributor

Re: NTP not working - coundn't start !

if you are gettign this error,

ntpq: read: Can't assign requested address

more than likely, the ntp port is occupied by another program, most probably a hung ntp related command.

lsof -i :123

should give you who is holding the port 123 (port that ntp uses) If there is nothing holding this port, I am not sure what to say
________________________________
UNIX because I majored in cryptology...
Steven E. Protter
Exalted Contributor

Re: NTP not working - coundn't start !

Shalom,

NTP will not correct time differences more than a few hours.

The message is clear:
8 Jun 16:01:32 ntpdate[9603]: no server suitable for synchronization found

The server configured is not suitable for Unix ntp.

I know Windows Server 2000 is not appropriate as a time server without patches.

Most firewalls close the ntp port as well.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
DnD_1
Regular Advisor

Re: NTP not working - coundn't start !

hi steve..

how do we know if the server is not suitable for the ntp server ?

the bank2 hp server run the same environment as bank1, but it working perfectly fine...

any more suggestion ?
Michal Kapalka (mikap)
Honored Contributor

Re: NTP not working - coundn't start !

hi,

the bank2 hp server run the same environment as bank1, but it working perfectly fine...

any more suggestion ?

check the

grep -i ntp /var/adm/syslog/syslog.log

and check it on both servers, may there will be a difference.

mikap
DnD_1
Regular Advisor

Re: NTP not working - coundn't start !

hi mikap..

there is no ntp log in syslog..... :(....probably has been disable..how do i reactive that ?

also, there's no differences between bank1 and bank2.....both have the same ntp ip address...but the bank2 working fine...

many thanks !!
Michal Kapalka (mikap)
Honored Contributor

Re: NTP not working - coundn't start !

hi,

for example on our system :

kmsemng1:/>grep -i ntp /var/adm/syslog/syslog.log
Jun 28 17:24:04 kmsemng1 xntpd[1318]: tickadj = 625, tick = 10000, tvu_maxslew = 61875
Jun 28 17:24:04 kmsemng1 xntpd[1318]: precision = 6 usec
Jun 28 17:28:21 kmsemng1 xntpd[1318]: synchronized to 10.36.126.1, stratum=2
Jun 28 17:28:21 kmsemng1 xntpd[1318]: time reset (step) 0.658318 s
Jun 28 17:28:21 kmsemng1 xntpd[1318]: synchronisation lost
Jun 28 17:33:41 kmsemng1 xntpd[1318]: synchronized to 10.36.126.1, stratum=2
Aug 31 03:38:06 kmsemng1 xntpd[1318]: synchronisation lost
Aug 31 10:06:18 kmsemng1 xntpd[1318]: synchronized to 10.36.126.1, stratum=2
Nov 6 18:10:30 kmsemng1 xntpd[1318]: synchronisation lost
Nov 6 18:29:42 kmsemng1 xntpd[1318]: synchronized to 10.36.126.1, stratum=2
Jan 1 01:00:01 kmsemng1 xntpd[1318]: leap second occurred, stepped time back 1 second
May 16 21:46:12 kmsemng1 xntpd[1318]: synchronisation lost
May 17 00:29:17 kmsemng1 xntpd[1318]: synchronized to 10.36.126.1, stratum=2
May 17 03:50:21 kmsemng1 xntpd[1318]: synchronisation lost
May 18 12:45:36 kmsemng1 xntpd[1318]: synchronized to 10.36.126.1, stratum=2
May 18 15:24:00 kmsemng1 xntpd[1318]: synchronisation lost
May 22 13:23:07 kmsemng1 xntpd[1318]: synchronized to 10.36.126.1, stratum=2

that means the ntp client is synchronised, if you don't have this entries in your syslog, them the host is not synchronyzing the time.

mikap
Bill Hassell
Honored Contributor

Re: NTP not working - coundn't start !

> bank1:/sbin/init.d #ntpq -p
> ntpq: read: Can't assign requested address

There's no reason to try anything else. The NTP server listed in /etc/ntp.conf does not exist, is not an NTP server or has locked you out. Until ntpq -p works, xntpd will do nothing.

Start by locating a working NTP server using ntpq. Kill any xntpd process first. ALWAYS use: ntpq -p 12.34.56.78 (the IP address, not the hostname) and keep trying all the NTP servers you have. Also use traceroute 12.34.56.78 to see if you are blocked by routers. Also check with the networking department. Many firewalls and routers are configured as NTP servers but no one ever tells the sysadmins.

Once ntpq is working, then you can configure xntpd. NOTE: The start/stop script for xntpd will 'jump' the time rather then slowly change it. Make sure your time sensitive applications are not running when you try to get xntpd going. ntpdate has an option to slowly move the time to be in sync (ntpdate -B).


Bill Hassell, sysadmin
DnD_1
Regular Advisor

Re: NTP not working - coundn't start !

by the way.

some changes and i can see that all synchronized...but still could not brig up the ntp process !

bank1:/root #ntpq -p
ntpq: read: Can't assign requested address

bank1:/root #ntpq -p 10.15.144.1
remote refid st t when poll reach delay offset disp
==============================================================================
*10.15.136.6 .GPS. 1 u 33 64 377 2.14 -13.308 0.44
LOCAL(0) LOCAL(0) 3 l 32 64 377 0.00 0.000 10.01

bank1:/root #ntpdate 10.15.144.1
9 Jun 12:37:39 ntpdate[19716]: adjust time server 10.15.144.1 offset -0.008219 sec

bank1:/root #ntpdate -d 10.15.144.1
transmit(10.15.144.1)
receive(10.15.144.1)
transmit(10.15.144.1)
receive(10.15.144.1)
transmit(10.15.144.1)
receive(10.15.144.1)
transmit(10.15.144.1)
receive(10.15.144.1)
transmit(10.15.144.1)
server 10.15.144.1, port 123
stratum 2, precision -17, leap 00, trust 000
refid [10.15.136.6], delay 0.02582, dispersion 0.00000
transmitted 4, in filter 4
reference time: cdd8b9c6.8a750000 Tue, Jun 9 2009 12:36:54.540
originate timestamp: cdd8b9ff.2de0e000 Tue, Jun 9 2009 12:37:51.179
transmit timestamp: cdd8b9ff.2ce1d000 Tue, Jun 9 2009 12:37:51.175
filter delay: 0.02599 0.02583 0.02585 0.02582
0.00000 0.00000 0.00000 0.00000
filter offset: 0.003820 0.003769 0.003777 0.003771
0.000000 0.000000 0.000000 0.000000
delay 0.02582, dispersion 0.00000
offset 0.003771

9 Jun 12:37:51 ntpdate[19717]: adjust time server 10.15.144.1 offset 0.003771 sec

bank1:/root #ps -ef | grep ntp
root 19735 19683 1 12:38:58 pts/3 0:00 grep ntp


Michal Kapalka (mikap)
Honored Contributor

Re: NTP not working - coundn't start !

hi,

you need to edit this file :

/etc/rc.config.d/netdaemons

change the entry export XNTPD=0 =>> export XNTPD=1

and them you could go to /sbin/init.d

and them ./xntpd start

ot /sbin/init.d/xntpd start

mikap
DnD_1
Regular Advisor

Re: NTP not working - coundn't start !

hi mikap..

the config has export XNTPD=1
DnD_1
Regular Advisor

Re: NTP not working - coundn't start !

solution found!
PavanAgrawal
Visitor

Re: NTP not working - coundn't start !

what is the solution ?