NTPD seems to be not syncing !!! | Unix Linux Forums | Linux

  Go Back    


Linux RedHat, Ubuntu, SUSE, Fedora, Debian, Mandriva, Slackware, Gentoo linux, PCLinuxOS. All Linux questions here!

NTPD seems to be not syncing !!!

Linux


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 01-02-2006
csaha's Avatar
csaha csaha is offline
Registered User
 
Join Date: Feb 2005
Last Activity: 11 April 2007, 12:34 AM EDT
Posts: 81
Thanks: 0
Thanked 0 Times in 0 Posts
NTPD seems to be not syncing !!!

Hi Linux Admin Guys

My onsite server is always 15 min slow and seems like NTPD (Network Time Protocol (NTP) daemon) not running properly. can anyone suggest me how to rectify this problem? we can't seem to get NTP to properly sync the clock.

Any help is resolving the issue will be helpful. Thanks in advance to all

Thanks
Chirantan
Sponsored Links
    #2  
Old 01-02-2006
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon (Administrator Emeritus)
 
Join Date: Aug 2001
Last Activity: 25 July 2014, 6:22 AM EDT
Location: Ashburn, Virginia
Posts: 9,895
Thanks: 58
Thanked 413 Times in 248 Posts
First, I would manually adjust the clock to be closer. You're 900 seconds off assuming your 15 minutes is accurate. ntp maxes out at about 1000 seconds. Next, any errors in the logs? And check your ntp config: use a good server and use a drift file.
Sponsored Links
    #3  
Old 01-02-2006
csaha's Avatar
csaha csaha is offline
Registered User
 
Join Date: Feb 2005
Last Activity: 11 April 2007, 12:34 AM EDT
Posts: 81
Thanks: 0
Thanked 0 Times in 0 Posts
Hi Perderabo

Thanks a lot for the reply. I have few clarifications required and information to be given here ....

Quote:

First, I would manually adjust the clock to be closer. You're 900 seconds off assuming your 15 minutes is accurate. ntp maxes out at about 1000 seconds. Next, any errors in the logs? And check your ntp config: use a good server and use a drift file.
What exactly is the meaning that "ntp maxes out at about 1000 seconds" ?

There is no errors in the logs ... actually the logfile is not updated after NOV 2005. Thats really amazing.

Can you pls suggest a good server? My server is located in US California.

How to use a drift file? Whats the use of that?

Thanks a lot in advance
Chirantan
    #4  
Old 01-02-2006
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon (Administrator Emeritus)
 
Join Date: Aug 2001
Last Activity: 25 July 2014, 6:22 AM EDT
Location: Ashburn, Virginia
Posts: 9,895
Thanks: 58
Thanked 413 Times in 248 Posts
ntp gives up completely if your clock is too far off. You should set your clock so it is as close as you can get it. Is your clock 5 seconds slow or fast? No problem. Is your clock 1001 seconds(or more) too slow or too fast? Forget ntp... it will not even try to sync the clock.

ntp needs to figure out how bad your clock is. If you reboot a lot, it has to keep starting from zero. With a drift file, it writes the drift into the file. Later when ntp restarts, it rereads the drift file. So it doesn't need to start completely over.

What server are you using? Post your whole ntp config file.
Sponsored Links
    #5  
Old 01-03-2006
csaha's Avatar
csaha csaha is offline
Registered User
 
Join Date: Feb 2005
Last Activity: 11 April 2007, 12:34 AM EDT
Posts: 81
Thanks: 0
Thanked 0 Times in 0 Posts
Here is my ntp conf file ...

Here is my ntp config file ...

Quote:

$ more /etc/ntp.conf


# Prohibit general access to this service.
restrict default ignore

# Permit all access over the loopback interface. This could
# be tightened as well, but to do so would effect some of
# the administrative functions.
restrict 127.0.0.1


# -- CLIENT NETWORK -------
# Permit systems on this network to synchronize with this
# time service. Do not permit those systems to modify the
# configuration of this service. Also, do not use those
# systems as peers for synchronization.
# restrict 192.168.1.0 mask 255.255.255.0 notrust nomodify notrap


# --- OUR TIMESERVERS -----
# or remove the default restrict line
# Permit time synchronization with our time source, but do not
# permit the source to query or modify the service on this system.

# restrict mytrustedtimeserverip mask 255.255.255.255 nomodify notrap noquery
# server mytrustedtimeserverip



# --- NTP MULTICASTCLIENT ---
#multicastclient # listen on default 224.0.1.1
# restrict 224.0.1.1 mask 255.255.255.255 notrust nomodify notrap
# restrict 192.168.1.0 mask 255.255.255.0 notrust nomodify notrap



# --- GENERAL CONFIGURATION ---
#
# Undisciplined Local Clock. This is a fake driver intended for backup
# and when no outside source of synchronized time is available. The
# default stratum is usually 3, but in this case we elect to use stratum
# 0. Since the server line does not have the prefer keyword, this driver
# is never used for synchronization, unless no other other
# synchronization source is available. In case the local host is
# controlled by some external source, such as an external oscillator or
# another protocol, the prefer keyword would cause the local host to
# disregard all other synchronization sources, unless the kernel
# modifications are in use and declare an unsynchronized condition.
#
server 127.127.1.0 # local clock
fudge 127.127.1.0 stratum 10

#
# Drift file. Put this in a directory which the daemon can write to.
# No symbolic links allowed, either, since the daemon updates the file
# by creating a temporary in the same directory and then rename()'ing
# it to the file.
#
driftfile /etc/ntp/drift
broadcastdelay 0.008

#
# Authentication delay. If you use, or plan to use someday, the
# authentication facility you should make the programs in the auth_stuff
# directory and figure out what this number should be on your machine.
#
authenticate yes

#
# Keys file. If you want to diddle your server at run time, make a
# keys file (mode 600 for sure) and define the key number to be
# used for making requests.
#
# PLEASE DO NOT USE THE DEFAULT VALUES HERE. Pick your own, or remote
# systems might be able to reset your clock at will. Note also that
# ntpd is started with a -A flag, disabling authentication, that
# will have to be removed as well.
#
keys /etc/ntp/keys

server 132.249.20.60 # billthecat.sdsc.edu
server 204.152.184.72 # clock.isc.org
Please have a look ...
Sponsored Links
    #6  
Old 01-03-2006
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon (Administrator Emeritus)
 
Join Date: Aug 2001
Last Activity: 25 July 2014, 6:22 AM EDT
Location: Ashburn, Virginia
Posts: 9,895
Thanks: 58
Thanked 413 Times in 248 Posts
This configuration looks like it is intended as the ntp server for your organization. It obtains the time from external sources. And it is will to distribute the time to other boxes. So there might be other boxes that use this box as their ntp server. Or maybe this box is the only system in your organization.

server 127.127.1.0 # local clock
fudge 127.127.1.0 stratum 10

This is a NOT great idea in your situation. You have specified, that in the special case where no other servers can be contacted, to use the local clock as if it were a server. Well, you have also stated that your local clock is off by 15 minutes. Any other boxes that get ntp through this box will try to sync to this box's local clock. If you remove those lines, if this box can't contact a server, you have no ntp service. Everyone just uses their local clocks. If this box does not serve others, there is no harm, but I still would not do it. This should be done only on systems with great internals clocks.

driftfile /etc/ntp/drift
You are using a driftfile. That is good.

server 132.249.20.60 # billthecat.sdsc.edu
server 204.152.184.72 # clock.isc.org
I did not find the first site on the lists. The second site is a stratum 1. I would just use the second entry. If you use multiple servers, you need at least 3. Two servers does not work very well.

Read the NTP FAQ, especially the part about NTP in real life.
Sponsored Links
    #7  
Old 01-03-2006
csaha's Avatar
csaha csaha is offline
Registered User
 
Join Date: Feb 2005
Last Activity: 11 April 2007, 12:34 AM EDT
Posts: 81
Thanks: 0
Thanked 0 Times in 0 Posts
Hi Friend

Quote:
I did not find the first site on the lists. The second site is a stratum 1. I would just use the second entry. If you use multiple servers, you need at least 3. Two servers does not work very well.
which site are you talking about ? I am able so get response from all the websites/links/ip adresses given here.

See below ===

Quote:
C:\Documents and Settings\csaha>ping billthecat.sdsc.edu

Pinging billthecat.sdsc.edu [132.249.20.60] with 32 bytes of data:

Reply from 132.249.20.60: bytes=32 time=315ms TTL=232
Reply from 132.249.20.60: bytes=32 time=306ms TTL=232
Reply from 132.249.20.60: bytes=32 time=332ms TTL=232
Reply from 132.249.20.60: bytes=32 time=319ms TTL=232

Ping statistics for 132.249.20.60:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 306ms, Maximum = 332ms, Average = 318ms

C:\Documents and Settings\csaha>ping clock.isc.org

Pinging clock.isc.org [204.152.184.72] with 32 bytes of data:

Reply from 204.152.184.72: bytes=32 time=312ms TTL=42
Reply from 204.152.184.72: bytes=32 time=304ms TTL=42
Reply from 204.152.184.72: bytes=32 time=304ms TTL=42
Reply from 204.152.184.72: bytes=32 time=301ms TTL=42

Ping statistics for 204.152.184.72:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 301ms, Maximum = 312ms, Average = 305ms
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
ntpd -gq not working ahmad.zuhd Red Hat 6 09-07-2010 03:03 AM
ntpd version alanlkw AIX 3 07-18-2007 07:48 AM
Ntpd satinet HP-UX 0 08-03-2005 08:27 AM



All times are GMT -4. The time now is 09:40 AM.