View previous topic :: View next topic |
Author |
Message |
HighwayStar n00b
Joined: 01 Jan 2003 Posts: 26 Location: Montreal, Quebec, Canada
|
Posted: Wed Mar 26, 2003 6:40 pm Post subject: ntpdate always fails |
|
|
Hi. Since last week, ntpdate won't work anymore:
Code: |
root@holyshit twix # ntpdate time.nrc.ca
26 Mar 08:38:44 ntpdate[16554]: no server suitable for synchronization found
root@holyshit twix #
|
At boot time, that's what I get:
Code: |
* Initializing clock via ntpdate...
26 Mar 08:39:15 ntpdate[16619]: no server suitable for synchronization found
* Failed to run ntpdate [ !! ]
* Starting ntpd... [ ok ]
|
Here's my /etc/conf.d/ntpd file:
Code: |
# Copyright 1999-2002 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /home/cvsroot/gentoo-x86/net-misc/ntp/files/ntpd.confd,v 1.12 2003/02/03 06:52:58 vapier Exp $
# NOTES:
# - NTPDATE variables below are used if you wish to set your
# clock when you start the ntp init.d script
# - make sure that the NTPDATE_CMD will close by itself ...
# the init.d script will not attempt to kill/stop it
# - ntpd will be used to maintain synchronization with a time
# server regardless of what NTPDATE is set to
# - read each of the comments above each of the variable
# Comment this out if you dont want the init script to warn
# about not having ntpdate setup
NTPDATE_WARN="y"
# Command to run to set the clock initially
# Most people should just uncomment this line ...
# however, if you know what you're doing, and you
# want to use ntpd to set the clock, change this to 'ntpd'
NTPDATE_CMD="ntpdate"
# Options to pass to the above command
# Most people should just uncomment this variable and
# change 'someserver' to a valid hostname which you
# can aquire from the URL's below
NTPDATE_OPTS="-b ntp2.cmc.ec.gc.ca"
##
# A list of available servers is available here:
# http://www.eecis.udel.edu/~mills/ntp/servers.html
# Please follow the rules of engagement and use a
# Stratum 2 server (unless you qualify for Stratum 1)
##
# Options to pass to the ntpd process that will *always* be run
# Most people should not uncomment this line ...
# however, if you know what you're doing, feel free to tweak
#NTPD_OPTS=""
|
And here's /etc/ntp.conf:
Code: |
restrict default noquery notrust nomodify
restrict 127.0.0.1
restrict 66.130.249.0 mask 255.255.255.0
fudge 127.127.1.0 stratum 3
server 127.127.1.0
driftfile /etc/ntp.drift
logfile /var/log/ntp.log
|
Any clue??? _________________ holyshit.org :
AMD Athlon XP 2100+ w/ 512MB PC-2700
MSI KT3-Ultra2R
Using 2.4.20-gentoo-r1/gcc-3.2.2/athlon-xp
[img:d6d9cf3ab1]http://art-team.ca/n.laplante/img/powered-by-gentoo.jpg[/img:d6d9cf3ab1] |
|
Back to top |
|
|
rtn Guru
Joined: 15 Nov 2002 Posts: 427
|
Posted: Wed Mar 26, 2003 7:03 pm Post subject: Re: ntpdate always fails |
|
|
HighwayStar wrote: | Hi. Since last week, ntpdate won't work anymore:
Code: |
root@holyshit twix # ntpdate time.nrc.ca
26 Mar 08:38:44 ntpdate[16554]: no server suitable for synchronization found
root@holyshit twix #
|
|
That means to me that time.nrc.ca is no longer an accessable time server for you.
Try a new server and see if that works.
--rtn
PostScript: It appears it isn't the server, since I can access it just fine:
Code: | # ntpdate time.nrc.ca
26 Mar 14:04:41 ntpdate[3742]: adjust time server 132.246.168.148 offset -0.023749 sec
|
I'd know look at the restrict lines in your /etc/ntp.conf, a problem with the
network/routing, or maybe a firewall issue. |
|
Back to top |
|
|
HighwayStar n00b
Joined: 01 Jan 2003 Posts: 26 Location: Montreal, Quebec, Canada
|
Posted: Wed Mar 26, 2003 7:20 pm Post subject: |
|
|
Pardon my ignorance, but how should the restrict line be set??? _________________ holyshit.org :
AMD Athlon XP 2100+ w/ 512MB PC-2700
MSI KT3-Ultra2R
Using 2.4.20-gentoo-r1/gcc-3.2.2/athlon-xp
[img:d6d9cf3ab1]http://art-team.ca/n.laplante/img/powered-by-gentoo.jpg[/img:d6d9cf3ab1] |
|
Back to top |
|
|
paul138 Guru
Joined: 09 Aug 2002 Posts: 370 Location: Ottawa, ON
|
Posted: Wed Mar 26, 2003 8:09 pm Post subject: |
|
|
I run 3 ntp servers on my work network. The error will occur if your clock is close enough to the time being given by the server. It's a bit of an odd error to return but that's been my experience.
Try chaging the time locally then running ntpdate and see if the clock get's set then.
Also, as far as I know, time.nrc.ca requires you to let them know you'll be using the server so keep that in mind when using public servers
[edit]
Here's my ntp.conf for a reference
Code: |
restrict default noquery notrust nomodify
restrict 127.0.0.1
restrict 192.168.10.0 mask 255.255.255.0
restrict 192.168.10.254
server 192.168.10.254
driftfile /etc/ntp.drift
logfile /var/log/ntp.log
|
Replace server and other variables to fit your needs. _________________ Talk is cheap because supply always exceeds demand. |
|
Back to top |
|
|
HighwayStar n00b
Joined: 01 Jan 2003 Posts: 26 Location: Montreal, Quebec, Canada
|
Posted: Thu Mar 27, 2003 5:32 am Post subject: |
|
|
Nice. Thanks everybody. I've been able to find out that it was the firewall blocking traffic on port 123 (UDP ntp). _________________ holyshit.org :
AMD Athlon XP 2100+ w/ 512MB PC-2700
MSI KT3-Ultra2R
Using 2.4.20-gentoo-r1/gcc-3.2.2/athlon-xp
[img:d6d9cf3ab1]http://art-team.ca/n.laplante/img/powered-by-gentoo.jpg[/img:d6d9cf3ab1] |
|
Back to top |
|
|
paul138 Guru
Joined: 09 Aug 2002 Posts: 370 Location: Ottawa, ON
|
Posted: Fri Mar 28, 2003 2:12 pm Post subject: |
|
|
rofl.
That'll do it. But as for the error, it will occur if your time is not far off from the server so don't panic _________________ Talk is cheap because supply always exceeds demand. |
|
Back to top |
|
|
meowsqueak Veteran
Joined: 26 Aug 2003 Posts: 1549 Location: New Zealand
|
Posted: Fri Jul 02, 2004 12:07 am Post subject: |
|
|
I have a similar problem - my ntpd server was working fine for the other PCs on my LAN - providing a time source. I edited /etc/ntp.conf and added some restrict lines and restarted (/etc/init.d/ntpd) ntpd. Now none of my clients will connect:
Quote: | # ntpdate theoden
Looking for host theoden and service ntp
host found : theoden.middle_earth
2 Jul 20:09:14 ntpdate[17717]: no server suitable for synchronization found
|
I removed the restrict lines and restarted the server. It still doesn't work. I've downgraded from ntp-4.2.0-r2 to ntp-4.1.2 and that didn't fix it either. The same thing has happened on my Debian box. What is going on here?!?!? |
|
Back to top |
|
|
|