LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Password
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.

Notices

Reply
 
Search this Thread
Old 10-18-2013, 03:11 AM   #1
knspradeep
LQ Newbie
 
Registered: Nov 2012
Posts: 21

Rep: Reputation: Disabled
NTP Date


Hello All,

I have little bit problem that i am configuring ntpdate on remote machines and mapping ip to <ntpserver IP> on ntp server i using ntpdate <global time server ip> to sync gloabl ips written on shell script which will syncs the global time for every 3 secs.
Now the problem is it remote machines or not sync with ntpdate main server

Can any one help me on thi
 
Old 10-18-2013, 03:34 AM   #2
wildwizard
Member
 
Registered: Apr 2009
Location: Oz
Distribution: slackware64-14.0
Posts: 755

Rep: Reputation: 226Reputation: 226Reputation: 226
Wrong tool.

You do not run ntpdate more than once, if you need to keep the clocks in sync then you need to setup ntpd and have that do the job.

See here for some more information :-
http://doc.ntp.org/4.1.0/ntpd.htm

Your distro probably has a section of documentation devoted to this as well.
 
1 members found this post helpful.
Old 10-18-2013, 04:51 AM   #3
knspradeep
LQ Newbie
 
Registered: Nov 2012
Posts: 21

Original Poster
Rep: Reputation: Disabled
Hello Wildwizard thanks for replying me soon.
But we are facing little bit issues with ntpd due to this we want to sync it with ntpdate i dont know whether it is possible or not.
What i am thinking is can we let that ntpd running but commenting the time servers except local time and making this one as stratum 1 and will keep running ntpdate script backend so the time will syncs with local time and rest of the client machines has to sync with ntpd server.
Will you please let me know whether we can implement this or not.
 
Old 10-18-2013, 07:28 AM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 11,858

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
You can use ntpdate but as stated the preferred method is ntpd. ntpdate just forces time to be set while ntpd will discipline the clock for drift errors.

What issues are you facing with ntpd?

What are the errors when ntpdate fails to synch?

Are these physical or virtual machines?
Is the global time server a ntp pool server?

What do you mean by commenting the time servers except local time?

ntp uses UTC and the individual computer will display time based on the time zone set.
 
Old 10-18-2013, 07:43 AM   #5
knspradeep
LQ Newbie
 
Registered: Nov 2012
Posts: 21

Original Poster
Rep: Reputation: Disabled
Hello Michael

Thanks for replying while usin

While using ntpdate<ntpd server ip> on remote machine
###########################################################################
18 Oct 05:37:16 ntpdate[13651]: no server suitable for synchronization found
18 Oct 05:37:27 ntpdate[13668]: no server suitable for synchronization found
18 Oct 05:37:38 ntpdate[13686]: no server suitable for synchronization found
############################################################################
IF i use both NTPD and NTPDATE on ntpd server the below error it showing
##########################################################################
ntpdate[27395]: the NTP socket is in use, exiting
18 Oct 14:05:32 ntpdate[27415]: the NTP socket is in use, exiting
18 Oct 14:05:35 ntpdate[27467]: the NTP socket is in use, exiting
############################################################################

Commenting on ntp.conf
##########################################################################
########################################################################
# Reference servers
########################################################################
#ntpserver1
#server pool.ntp.org
# ntpserver3
#server 173.244.211.10 iburst
#ntpserver4
#server 63.245.214.135 iburst
# ntpserver3

server 127.127.1.0 # local clock
fudge 127.127.1.0 stratum 10
###########################################################################

after commenting those and i have started running script by using /usr/sbin/ntpdate -u 52320 50.23.135.154 63.245.214.135
Ntp date is running with out any issues.
But the problem is remote servers or not sync with this main server. how can i solve this problem.
 
Old 10-18-2013, 09:03 AM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 11,858

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
Post the output from the command:
ntpdate -d -u 52320 50.23.135.154 63.245.214.135
 
Old 10-18-2013, 10:20 AM   #7
knspradeep
LQ Newbie
 
Registered: Nov 2012
Posts: 21

Original Poster
Rep: Reputation: Disabled
Hello Michael

Here is the output
18 Oct 20:43:25 ntpdate[21724]: ntpdate 4.2.4p8@1.1612-o Thu May 13 14:38:25 UTC 2010 (1)
Looking for host 52320 and service ntp
host found : 0.0.204.96
Looking for host 50.23.135.154 and service ntp
host found : krillin.ecansol.net
Looking for host 63.245.214.135 and service ntp
host found : time1.scl3.mozilla.com
transmit(50.23.135.154)
transmit(63.245.214.135)
receive(50.23.135.154)
transmit(50.23.135.154)
receive(63.245.214.135)
transmit(63.245.214.135)
receive(50.23.135.154)
transmit(50.23.135.154)
receive(63.245.214.135)
transmit(63.245.214.135)
receive(50.23.135.154)
transmit(50.23.135.154)
receive(63.245.214.135)
transmit(63.245.214.135)
receive(50.23.135.154)
transmit(50.23.135.154)
receive(63.245.214.135)
transmit(63.245.214.135)
server 50.23.135.154, port 123
stratum 2, precision -20, leap 00, trust 000
refid [50.23.135.154], delay 0.26859, dispersion 0.00171
transmitted 4, in filter 4
reference time: d60bc6b1.40336feb Fri, Oct 18 2013 20:09:45.250
originate timestamp: d60bce96.ba52aa36 Fri, Oct 18 2013 20:43:26.727
transmit timestamp: d60bce96.99064e5e Fri, Oct 18 2013 20:43:26.597
filter delay: 0.27509 0.27275 0.27260 0.26859
0.00000 0.00000 0.00000 0.00000
filter offset: 0.011339 0.010410 0.010417 0.008565
0.000000 0.000000 0.000000 0.000000
delay 0.26859, dispersion 0.00171
offset 0.008565

server 63.245.214.135, port 123
stratum 1, precision -20, leap 00, trust 000
refid [GPS], delay 0.27942, dispersion 0.00058
transmitted 4, in filter 4
reference time: d60bce92.de8df5ec Fri, Oct 18 2013 20:43:22.869
originate timestamp: d60bce96.f2d1cecb Fri, Oct 18 2013 20:43:26.948
transmit timestamp: d60bce96.d217a9e2 Fri, Oct 18 2013 20:43:26.820
filter delay: 0.28360 0.28015 0.27942 0.28012
0.00000 0.00000 0.00000 0.00000
filter offset: 0.001930 0.000310 -0.00002 0.000518
0.000000 0.000000 0.000000 0.000000
delay 0.27942, dispersion 0.00058
offset -0.000026

18 Oct 20:43:27 ntpdate[21724]: adjust time server 63.245.214.135 offset -0.000026 sec
 
Old 10-18-2013, 10:29 AM   #8
michaelk
Moderator
 
Registered: Aug 2002
Posts: 11,858

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
Is that between the remote and the main server?
If not that run ntpdate again on the remote server.
 
Old 10-18-2013, 12:49 PM   #9
knspradeep
LQ Newbie
 
Registered: Nov 2012
Posts: 21

Original Poster
Rep: Reputation: Disabled
ntpdate

Hello Michel,

Please find the output of remote server.


18 Oct 17:47:26 ntpdate[3956]: ntpdate 4.2.4p8@1.1612-o Thu Jan 10 15:17:41 UTC 2013 (1)
Looking for host 52320 and service ntp
host found : 0.0.204.96
Looking for host 50.23.135.154 and service ntp
host found : krillin.ecansol.net
Looking for host 63.245.214.135 and service ntp
host found : time1.scl3.mozilla.com
transmit(50.23.135.154)
receive(50.23.135.154)
transmit(50.23.135.154)
receive(50.23.135.154)
transmit(50.23.135.154)
receive(50.23.135.154)
transmit(50.23.135.154)
transmit(63.245.214.135)
receive(50.23.135.154)
transmit(50.23.135.154)
receive(63.245.214.135)
transmit(63.245.214.135)
receive(63.245.214.135)
transmit(63.245.214.135)
receive(63.245.214.135)
transmit(63.245.214.135)
receive(63.245.214.135)
transmit(63.245.214.135)
server 50.23.135.154, port 123
stratum 2, precision -20, leap 00, trust 000
refid [50.23.135.154], delay 0.08698, dispersion 0.00002
transmitted 4, in filter 4
reference time: d60beaaf.7eae3523 Fri, Oct 18 2013 17:13:19.494
originate timestamp: d60bf2af.2b5c1425 Fri, Oct 18 2013 17:47:27.169
transmit timestamp: d60bf2af.26180f11 Fri, Oct 18 2013 17:47:27.148
filter delay: 0.08742 0.08698 0.08705 0.08713
0.00000 0.00000 0.00000 0.00000
filter offset: -0.01017 -0.01026 -0.01023 -0.01020
0.000000 0.000000 0.000000 0.000000
delay 0.08698, dispersion 0.00002
offset -0.010266

server 63.245.214.135, port 123
stratum 1, precision -20, leap 00, trust 000
refid [GPS], delay 0.07864, dispersion 0.00031
transmitted 4, in filter 4
reference time: d60bf2a0.55787042 Fri, Oct 18 2013 17:47:12.333
originate timestamp: d60bf2af.59005b8f Fri, Oct 18 2013 17:47:27.347
transmit timestamp: d60bf2af.532833c3 Fri, Oct 18 2013 17:47:27.324
filter delay: 0.07939 0.07930 0.07864 0.07982
0.00000 0.00000 0.00000 0.00000
filter offset: -0.00477 -0.00466 -0.00501 -0.00436
0.000000 0.000000 0.000000 0.000000
delay 0.07864, dispersion 0.00031
offset -0.005010

18 Oct 17:47:27 ntpdate[3956]: adjust time server 63.245.214.135 offset -0.005010 sec
 
Old 10-18-2013, 04:22 PM   #10
michaelk
Moderator
 
Registered: Aug 2002
Posts: 11,858

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
In both cases the ntp servers were found. The offset and dispersion values are low. I do not see the problem.

Please provide some additional information as to why you think the remote machines are not syncing with the time servers.

I would uncomment the servers in your ntpd.conf file. Restart nptd and after a few minutes post the output of the command
ntpq -pn

Make sure the reach value for the severs is 377.
 
Old 10-23-2013, 04:36 AM   #11
knspradeep
LQ Newbie
 
Registered: Nov 2012
Posts: 21

Original Poster
Rep: Reputation: Disabled
Yes thanks it is working fine after changing the pool servers.......
 
  


Reply

Tags
ntpconf


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Can't set date; manually, ntp or otherwise JNat Linux - Virtualization and Cloud 8 06-23-2011 12:14 PM
[SOLVED] Date and NTP devUnix Linux - Server 5 04-06-2011 01:50 PM
date / ntp problem sp149 Red Hat 3 02-07-2008 11:23 AM
ntp does not work.. date and time cannot be changed.. basis1980 Linux - Software 10 02-06-2008 08:09 AM
ntp port blocked - how to set date automatically unkie888 Linux - General 4 11-06-2007 05:57 AM


All times are GMT -5. The time now is 11:57 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration