NTPD seems to be not syncing !!!


 
Thread Tools Search this Thread
Operating Systems Linux NTPD seems to be not syncing !!!
# 1  
Old 01-02-2006
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
# 2  
Old 01-02-2006
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.
# 3  
Old 01-03-2006
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-03-2006
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.
# 5  
Old 01-03-2006
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 ...
# 6  
Old 01-03-2006
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.
# 7  
Old 01-04-2006
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
Login or Register to Ask a Question

Previous Thread | Next Thread

5 More Discussions You Might Find Interesting

1. Debian

Ntpd slow start

on every boot, ntpd takes long time to start (after moving from dhcp to static ip). is there a way to speed it up? (1 Reply)
Discussion started by: orange47
1 Replies

2. Red Hat

ntpd -gq not working

as advised and documented, i'm trying to use the ntpd -gq instead of ntpdate. The result is that clock not set. as below. However ntpdate is working ok and had set the clock correctly this is the ntp.conf file: # cat /etc/ntp.conf logfile /var/log/ntp.log driftfile /var/lib/ntp/drift... (6 Replies)
Discussion started by: ahmad.zuhd
6 Replies

3. Shell Programming and Scripting

Modifying the ntpd deamon script

I need to replace the line daemon ntpd $OPTIONS in the following script with daemon ntpd $OPTIONS 2>&1 > /var/log/ntpd.log & what will happen? The idea of replacing is to capture the output on the console into ntpd.log file. Will this work? ... (1 Reply)
Discussion started by: naive1977
1 Replies

4. AIX

ntpd version

How to check the ntpd version of AIX 5.3 ? (3 Replies)
Discussion started by: alanlkw
3 Replies

5. HP-UX

Ntpd

Hello, I'm looking for assitance on setting up network time protocol on my HP-ux boxes. I have edit the .conf file accordingly. And /etc/services. But whenever I try and start the service nothing happens at all. No error message, nothing. I have a SCO box as a time server and I wish... (0 Replies)
Discussion started by: satinet
0 Replies
Login or Register to Ask a Question