LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 12-14-2004, 11:08 PM   #1
race
Member
 
Registered: Nov 2003
Distribution: debian
Posts: 66

Rep: Reputation: 15
ntp


I installed ntpd and the process seems to be running and a port seems to be open (port 13). The problem seems to be that my windows machines are able to update to it.

I get the error "an error occured while windows was synchronizing with 10.10.100.3. the time sampe was rejected because: the peer's stratum is less than the host's stratum."

How do i fix that..

here is the config file:
# /etc/ntp.conf, configuration for ntpd

# ntpd will use syslog() if logfile is not defined
#logfile /var/log/ntpd

driftfile /var/lib/ntp/ntp.drift
statsdir /var/log/ntpstats/

statistics loopstats peerstats clockstats
filegen loopstats file loopstats type day enable
filegen peerstats file peerstats type day enable
filegen clockstats file clockstats type day enable

### lines starting 'server' are auto generated,
### use dpkg-reconfigure to modify those lines.

server time.nist.gov

also .. how so i specify how often ntpd checks time.nist.gov for the correct time??
 
Old 12-15-2004, 01:54 AM   #2
TigerOC
Senior Member
 
Registered: Jan 2003
Location: Devon, UK
Distribution: Debian Etc/kernel 2.6.18-4K7
Posts: 2,380

Rep: Reputation: 49
I cannot really help with your M$ problem but it sounds like its complaining that the source you have pointed to is lower than it's currently pointed at i.e. it may be pointed at a stratum 1 and your server is stratum 2.
As regards your own ntp I would suggest the use of the ntp pool servers. There is a group of servers ( I am one) that contribute to www.pool.ntp.org . I would suggest modifying your /etc/ntp.conf and adding 3 lines;
server pool.ntp.org
server pool.ntp.org
server pool.ntp.org
It would also be preferable to use servers in your region and you can find a list at;
http://ntp.isc.org/bin/view/Servers/NTPPoolServers
In this case you would use;
server xx.pool.ntp.org
server xx.pool.ntp.org
server xx.pool.ntp.org

where xx is your zone like the uk or us

Reason for using multiple servers is to allow for non-reseponse and also allow ntp to determine the most accurate one by comparison. I personally have 5 as an ntp source.

On ntp, the daemon initially pings every 64s then gradually decreases this rate over a period of hours to 1064s and uses the drift file to maintain its own time. The closer you are to the source the more accurate ntp will be because ntp is governed by the hop or the time it takes for its ping to reach the reference time server and be returned.

Last edited by TigerOC; 12-15-2004 at 02:00 AM.
 
Old 12-15-2004, 10:45 PM   #3
ernobe
Member
 
Registered: Nov 2004
Location: Costa Rica
Distribution: Debian SID
Posts: 37

Rep: Reputation: 15
I had ntp working nicely but then I upgraded the kernel and now I
can't figure out why it's not working. When I run ntpq I get a
'Name or service not known' message. Apparently the deamon is running,
( it gets listed when I run 'pstree' ), so what exactly does this
message mean? Could it be a kernel issue? I don't remember changing
any of the configuration variables at the last kernel compile.
 
Old 12-16-2004, 01:17 AM   #4
TigerOC
Senior Member
 
Registered: Jan 2003
Location: Devon, UK
Distribution: Debian Etc/kernel 2.6.18-4K7
Posts: 2,380

Rep: Reputation: 49
Quote:
Originally posted by ernobe
I had ntp working nicely but then I upgraded the kernel and now I
can't figure out why it's not working. When I run ntpq I get a
'Name or service not known' message. Apparently the deamon is running,
( it gets listed when I run 'pstree' ), so what exactly does this
message mean? Could it be a kernel issue? I don't remember changing
any of the configuration variables at the last kernel compile.
the command is ntpq -p. You should have a log file in /var/log/ntp which should tell you what is happening. The message means it is unable the resolve the host. Check what your server name is. Again I would recommend the pool.ntp.org servers as I have explained in my previous post.
 
Old 12-16-2004, 10:50 AM   #5
ernobe
Member
 
Registered: Nov 2004
Location: Costa Rica
Distribution: Debian SID
Posts: 37

Rep: Reputation: 15
According to /var/log/daemon.log I am synchronized! I also checked
the time at nist.time.gov and 'hwclock' returns exactly the same time,
to the second. On a previous set-up the problem was that the system
time did not keep up with the hardware time ( it had to be set
manually every time the computer had been turned off ), so I had a
line in /etc/ntp.conf with 'broadcast 127.0.0.1' or 'broadcastclient',
I can't remember which, which seemed to work. Anyway, ntpq -p still
returns the same error message: 'Name or service not known'. Also
there are a couple of lines in /etc/ntp.conf 'server 127.127.1.0' and
'fudge 127.127.1.0 stratum 13'. Should I change those addresses to
127.0.0.1? Would 'broadcastclient 127.0.0.1' be a valid option? A
line in /var/log/daemon.log reports that 'synchronized to LOCAL(0),
stratum 13' so I'll wait and see if my system time does keep up with
the hardware time and report back if it doesn't. Thanks for your
time.
 
Old 12-16-2004, 11:43 AM   #6
TigerOC
Senior Member
 
Registered: Jan 2003
Location: Devon, UK
Distribution: Debian Etc/kernel 2.6.18-4K7
Posts: 2,380

Rep: Reputation: 49
I cannot think why you would use loopback to sync time (127 addresses). In the first instance you can set the time approximately from a clock, watch etc . Once you have the ntp daemon running it will establish your drift i.e. it will calculate what the constant error of the bios clock is and then correct it. You should only have a real problem if the error is very large. Once you boot the system it should apply the drift and then establish the time once it connects with time servers. If bios clock has to be corrected its normally due to the battery on the m/board needing replacement.
 
  


Reply



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
Ntp darkkan Debian 3 09-09-2005 11:11 AM
help with NTP stevenhasty Slackware 6 02-16-2005 11:04 AM
NTP cannot work with timeserver, NTP-d can jerryvapps Linux - Networking 0 08-04-2004 02:04 PM
NTP cannot use server, NTP -d can jerryvapps Linux - Newbie 0 07-28-2004 02:22 PM
NTP Help MaverickApollo Linux - Software 0 10-28-2003 08:23 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 12:30 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration