I set the server in /etc/conf.d/ntp, and run /etc/init.d/ntp start I get: * Running ntpdate... 21 Dec 07:43:03 ntpdate[9847]: no server suitable for synchronization found * Failed to run ntpdate Yet, if I manually run it to the same server it works.
do this: rm /etc/conf.d/ntpd emerge rsync emerge ntp etc-update /etc/init.d/ntp restart (or whatever, just start it up and see if it works) if it still doesnt work, post these 2 files: /etc/ntp.conf /etc/init.d/ntpd
OK, it's still not working. #!/sbin/runscript # 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.rc,v 1.4 2002/12/18 13:25:21 vapier Exp $ depend() { need net } checkconfig() { if [ ! -f /etc/ntp.conf ] ; then eerror "Please create /etc/ntp.conf" return 1 fi return 0 } start() { checkconfig || return $? NTPDATESERVERS=`egrep '^(server|peer)[[:space:]]*' /etc/ntp.conf | awk '{print $2}'` if [ -n "${NTPDATESERVERS}" ] ; then ebegin "Running ntpdate" ntpdate -b ${NTPDATESERVERS} > /dev/null eend $? "Failed to run ntpdate" else ewarn "Please set a valid server line in /etc/ntp.conf" fi ebegin "Starting ntpd" start-stop-daemon --start --quiet --pidfile /var/run/ntpd.pid \ --startas /usr/bin/ntpd -- -p /var/run/ntpd.pid eend $? "Failed to start ntpd" } stop() { ebegin "Stopping ntpd" start-stop-daemon --stop --quiet --pidfile /var/run/ntpd.pid eend $? "Failed to stop ntpd" # clean stale pidfile [ -f /var/run/ntpd.pid ] && rm -f /var/run/ntpd.pid } ======================================== AND ======================================== # Config file for /etc/init.d/ntpd # Name of the server ntpd should sync with NTPDATESERVER=ntp.quidnet.com ## # A list of available servers is available here: # * http://www.eecis.udel.edu/~mills/ntp/clock1.htm # and # * http://www.eecis.udel.edu/~mills/ntp/clock2.htm ##
re-read comment #1 and do what it says
Ok, I have followed the steps exactly. (i forgot to remove /etc/conf.d/ntpd) Now, the /etc/init.d/ntpd has not changed. and there is no longer any /etc/conf.d/ntpd. It still gives the same error.
i asked you to post your /etc/ntp.conf you havent :p
I too am experiencing strange behaviour. I am using ntp-4.1.1b-r1. I set my servers in /etc/ntpd.conf. run /etc/init.d/ntpd stop then /etc/init.d/ntpd start. No errors... and clock gets corrected ;~) but then I reboot...... when the ntp service come up I get the same ntpdate falure. So I rm /etc/conf.d/ntpd /etc/init.d/ntpd stop /etc/init.d/ntpd start. Still go the ntpdate falure. So I took another look at the /etc/ntp.conf... well my 3 servers had ben replaced by 127.0.0.1. I looked at the ntp.conf.sv, and It was the config that I created. so I cp /etc/ntp.conf.sv /etc/ntp.conf /etc/init.d/ntpd stop /etc/init.d/ntpd start Once again ntp loads and corrects the clock.... then I reboot as this is what broke it before. I got the same ntpdate error. /etc/init.d/ntpd stop /etc/init.d/ntpd start same problem. So I looked at the /etc/ntp.conf and it had reverted to the 127.0.0.1 server again, checked the /etc/ntp.cong.sv and it was correct so I cp /etc/ntp.conf.sv /etc/ntp.conf /etc/init.d/ntpd stop /etc/init.d/ntpd start Once again working... So I reboot again....... same problem. I did not re emerge ntp... going to do that now just for kicks. BTW /etc/init.d/ntpd: #!/sbin/runscript # 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.rc,v 1.4 2002/12/18 13:25:21 vapier Exp $ depend() { need net } checkconfig() { if [ ! -f /etc/ntp.conf ] ; then eerror "Please create /etc/ntp.conf" return 1 fi return 0 } start() { checkconfig || return $? NTPDATESERVERS=`egrep '^(server|peer)[[:space:]]*' /etc/ntp.conf | awk '{print $2}'` if [ -n "${NTPDATESERVERS}" ] ; then ebegin "Running ntpdate" ntpdate -b ${NTPDATESERVERS} > /dev/null eend $? "Failed to run ntpdate" else ewarn "Please set a valid server line in /etc/ntp.conf" fi ebegin "Starting ntpd" start-stop-daemon --start --quiet --pidfile /var/run/ntpd.pid \ --startas /usr/bin/ntpd -- -p /var/run/ntpd.pid eend $? "Failed to start ntpd" } stop() { ebegin "Stopping ntpd" start-stop-daemon --stop --quiet --pidfile /var/run/ntpd.pid eend $? "Failed to stop ntpd" # clean stale pidfile [ -f /var/run/ntpd.pid ] && rm -f /var/run/ntpd.pid } and /etc/ntp.conf (w/my servers): restrict default noquery notrust nomodify restrict 127.0.0.1 restrict 192.168.0.0 mask 255.255.255.0 fudge 127.127.1.0 stratum 3 server ntp-0.cso.uiuc.edu server ntp-1.cso.uiuc.edu server ntp-2.cso.uiuc.edu driftfile /etc/ntp.drift logfile /var/log/ntp.log after reboot /etc/ntp.conf: restrict default noquery notrust nomodify restrict 127.0.0.1 restrict 192.168.0.0 mask 255.255.255.0 fudge 127.127.1.0 stratum 3 server 127.0.0.1 driftfile /etc/ntp.drift logfile /var/log/ntp.log I hope this is of some value
I appologize about my post not wrapping.... but I dont know how to make it wrap just an update the ntp.conf after reboot hsas the server as 127.127.1.0 not 127.0.0.1 sorry about the mis type.. I also reemerged ntp.. but same problems as before. I did notice a different /etc/init.d/ntpd.. so here it is as well #!/sbin/runscript # 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.rc,v 1.6 2002/12/23 17:12:48 vapier Exp $ depend() { need net } checkconfig() { if [ ! -f /etc/ntp.conf ] ; then eerror "Please create /etc/ntp.conf" return 1 fi return 0 } start() { checkconfig || return $? NTPDATESERVERS=`egrep '^(server|peer)[[:space:]]+' /etc/ntp.conf | awk '{print $2}'` if [ -n "${NTPDATESERVERS}" ] ; then ebegin "Running ntpdate" ntpdate -b ${NTPDATESERVERS} > /dev/null eend $? "Failed to run ntpdate" else ewarn "Please set a valid server line in /etc/ntp.conf" fi ebegin "Starting ntpd" start-stop-daemon --start --quiet --pidfile /var/run/ntpd.pid \ --startas /usr/bin/ntpd -- -p /var/run/ntpd.pid eend $? "Failed to start ntpd" } stop() { ebegin "Stopping ntpd" start-stop-daemon --stop --quiet --pidfile /var/run/ntpd.pid eend $? "Failed to stop ntpd" # clean stale pidfile [ -f /var/run/ntpd.pid ] && rm -f /var/run/ntpd.pid
I appologize about my post not wrapping.... but I dont know how to make it wrap just an update the ntp.conf after reboot hsas the server as 127.127.1.0 not 127.0.0.1 sorry about the mis typo.. I also reemerged ntp.. but same problems as before. I did notice a different /etc/init.d/ntpd.. so here it is as well #!/sbin/runscript # 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.rc,v 1.6 2002/12/23 17:12:48 vapier Exp $ depend() { need net } checkconfig() { if [ ! -f /etc/ntp.conf ] ; then eerror "Please create /etc/ntp.conf" return 1 fi return 0 } start() { checkconfig || return $? NTPDATESERVERS=`egrep '^(server|peer)[[:space:]]+' /etc/ntp.conf | awk '{print $2}'` if [ -n "${NTPDATESERVERS}" ] ; then ebegin "Running ntpdate" ntpdate -b ${NTPDATESERVERS} > /dev/null eend $? "Failed to run ntpdate" else ewarn "Please set a valid server line in /etc/ntp.conf" fi ebegin "Starting ntpd" start-stop-daemon --start --quiet --pidfile /var/run/ntpd.pid \ --startas /usr/bin/ntpd -- -p /var/run/ntpd.pid eend $? "Failed to start ntpd" } stop() { ebegin "Stopping ntpd" start-stop-daemon --stop --quiet --pidfile /var/run/ntpd.pid eend $? "Failed to stop ntpd" # clean stale pidfile [ -f /var/run/ntpd.pid ] && rm -f /var/run/ntpd.pid }
comment 7 and 8 are the same..... I was using knoquror, but switched to mozilla.. now posts wrapp.. sorry about the repost. at least it is readable now... I will shut up now unless I have something of value to add ;~>
why dont you post it as an attachment, *not* in the comment field
the next version will render this invalid ... see Bug 897 for more info