Unix/Linux Go Back    


HP-UX HP-UX (Hewlett Packard UniX) is Hewlett-Packard's proprietary implementation of the Unix operating system, based on System V.

Ntp time synchronization problems

HP-UX


Closed    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 06-06-2016
anaigini45 anaigini45 is offline
Registered User
 
Join Date: Oct 2009
Last Activity: 7 December 2016, 9:59 PM EST
Posts: 46
Thanks: 0
Thanked 0 Times in 0 Posts
Ntp time synchronization problems

There is one server in my company where the time is out of sync.
When I checked (compared with other servers whose time is correct), the XNTPD variable in /etc/rc.config.d/netdaemons was set as 0.
I changed this to 1, and tried restarting the xntpd process with :

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

however seems like there is no effect.

I also tried and used this command :

Code:
# ntpq -p

But I get this error :
ntpq: read: Can't assign requested address

Some solutions I googled have suggested killing processes which are using the port 123, which is the default port for ntp. And then try restarting xntpd.

Another option given was to try and reboot the server after making changes required in configuration files.

However, there are too many important processes that are running on port 123 at the moment, like nfs, and rpcbind. I am afraid killing these processes will cause problems.

Will a reboot resolve this problem?

I have checked and compared all settings in the configuration files for ntp setup (like /etc/rc.config.d/netdaemons, /etc/ntp.conf, /etc/TIMEZONE) with other servers(where ntp works), and everything is the same.
Sponsored Links
    #2  
Old Unix and Linux 06-06-2016
hicksd8 hicksd8 is offline Forum Advisor  
Registered User
 
Join Date: Feb 2012
Last Activity: 23 January 2017, 2:52 AM EST
Location: Devon, UK
Posts: 1,331
Thanks: 156
Thanked 327 Times in 275 Posts
I haven't used HP-UX for years so I'm not an expert but have you checked that the DNS (services and configuration) is working because a NTP server name needs to be resolved like any other URL. Can you ping the NTP server name?
Sponsored Links
    #3  
Old Unix and Linux 06-06-2016
anaigini45 anaigini45 is offline
Registered User
 
Join Date: Oct 2009
Last Activity: 7 December 2016, 9:59 PM EST
Posts: 46
Thanks: 0
Thanked 0 Times in 0 Posts
Yes, I have checked and both the NTP servers are pingable.
Now I believe the problem is not with the DNS settings, but the port that ntp is running on.

The port 123 is used by other processes, and probably killing it(like suggested by other forums) and then starting ntp will help, but I have yet to try this.

Also when I check with other servers which have ntp installed and running, the ports that use ntp are not 123. Those are customized ports. How is this done (customizing the ports on which ntp runs)?
    #4  
Old Unix and Linux 07-06-2016
gexacor gexacor is offline
Registered User
 
Join Date: Jul 2016
Last Activity: 6 July 2016, 5:23 AM EDT
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by anaigini45 View Post
Also when I check with other servers which have ntp installed and running, the ports that use ntp are not 123. Those are customized ports. How is this done (customizing the ports on which ntp runs)?
Looks like you can't change NTP port directly but you can use iptables to redirect UDP:123 requests to your actual target UDP port your NTP servers are running at.

Take a look here for few examples.
Sponsored Links
    #5  
Old Unix and Linux 07-13-2016
Peasant's Unix or Linux Image
Peasant Peasant is offline Forum Advisor  
Registered User
 
Join Date: Mar 2011
Last Activity: 23 January 2017, 2:17 AM EST
Posts: 1,016
Thanks: 27
Thanked 283 Times in 253 Posts
Does it work if you issue with ntp daemon off :

Code:
ntpdate <your ntp server>

If it works command should return data indicated that time was synced.
You can run it multiple times if you want.

Can you check your NTP conf on the client (that box) ?
Does netstat or lsof show what is holding the port open ?

Perhaps your HPUX box is configured as NTP server with some other (copied) /etc/ntp.conf config file and directives in it to bind to non existing address ?

If your server is NTP client (wants to sync time from your NTP servers), all you should have is couple of lines in ntp.conf (with additional steps you did correctly - netdaemons etc) for things to work (with resolving working or hosts/resolv.conf file configured).
Sponsored Links
Closed

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Auto NTP Time Synchronization YSupport Red Hat 12 12-16-2011 06:58 PM
ntp time synchronization rahul11c Red Hat 1 10-11-2011 03:49 AM
How often does Linux NTP server update its time with the external NTP server? MichaelLi Linux 1 03-25-2011 10:43 AM
time synchronization inquirer UNIX for Advanced & Expert Users 2 02-03-2005 10:54 AM
Time synchronization skotapal UNIX for Dummies Questions & Answers 1 10-29-2003 04:44 PM



All times are GMT -4. The time now is 04:36 AM.