You are not logged in.
Hi,
It's been happening on one of my Arh boxes (laptop) for a while (a couple of weeks). I checked this; no help. Nothing at all in the logs; ntpd -s -d output even mentioned a reasonable looking correction, but the clock still runs about 25 seconds ahead of time.
NB: After a while I've aborted ntpd (started from console). I've got a gut feeling that it hadn't been proper management... Any ideas?
Last edited by Llama (2009-10-24 09:37:24)
Offline
I couldn't get openntpd to work on my box either, I use the ntpd package.
/etc/ntpd.conf
server pool.ntp.org
driftfile /var/lib/ntp/ntp.drift
restrict default nomodify nopeer
restrict 127.0.0.1
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
I couldn't get openntpd to work on my box either, I use the ntpd package.
Thanks! If push comes to shove, I'll try ntpd too. Funny thing, until recently openntpd worked just fine, for quite some time.
Offline
Have a look at, for example: http://bbs.archlinux.org/viewtopic.php?id=66522
I gave up on openntpd when problems arose during the summer after some upgrades, and I'm now using ntp very successfully. Only problem was to delay starting of the ntpd daemon until wicd got my network up and running.
So I created the daemon file:
#!/bin/bash
# delayd : Meta-daemon to run daemons after delay
sleep 25
/etc/rc.d/ntpd start
and load it in /etc/rc.conf thus:
DAEMONS=(... @delayd ...)
Offline
Thanks!
Offline
ninian, what does happen if ntpd starts without delay?
ntpd works indeed on my laptop. Curiously, openntpd on another box keeps on working properly. It's a big box with a simple /etc/rc.conf network configuration, while the bad thing happens on the laptop (Wi-Fi, wicd).
UPD:
NetworkManager solutions for KDE 4.x (just for reference)
/etc/NetworkManager/dispatcher.d/myntp
#!/bin/bash
case "$2" in
up)
if [ /etc/rc.d/ntpd ]; then
/etc/rc.d/ntpd start
fi
;;
down)
if [ /var/run/daemons/ntpd ]; then
/etc/rc.d/ntpd stop
fi
;;
esac
/etc/NetworkManager/dispatcher.d/myopenntp
#!/bin/bash
CONF=/etc/conf.d/openntpd
. /etc/rc.conf
. /etc/rc.d/functions[ -f $CONF ] && . $CONF
PID=`pidof -o %PPID /usr/sbin/ntpd`
case "$2" in
up)
stat_busy "Starting OpenNTPD"
[ -z "$PID" ] && /usr/sbin/ntpd $PARAMS
if [ $? -gt 0 ]; then
stat_fail
else
PID=`pidof -o %PPID /usr/sbin/ntpd`
echo $PID >/var/run/openntpd.pid
add_daemon openntpd
stat_done
fi
;;
down)
stat_busy "Stopping OpenNTPD"
[ ! -z "$PID" ] && kill $PID &>/dev/null
if [ $? -gt 0 ]; then
stat_fail
else
rm_daemon openntpd
stat_done
fi
;;
*)
echo "usage: $0 {up|down}"
esac
exit 0
Last edited by Llama (2010-05-13 15:10:53)
Offline
ninian, what does happen if ntpd starts without delay?
ntpd works indeed on my laptop. Curiously, openntpd on another box keeps on working properly. It's a big box with a simple /etc/rc.conf network configuration, while the bad thing happens on the laptop (Wi-Fi, wicd).
If it starts before wicd it will fail to resolve the name of the ntp servers because there is no network, it will remove the servers from the list of servers and it will not work, I had the same problem.
My solution was to make a static association in /etc/hosts, ntpd will fail to contact the servers but it can resolve the name so it will keep trying to contact them until there is network, which should be a few seconds later after wicd starts.
R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K
Offline
Only problem was to delay starting of the ntpd daemon until wicd got my network up and running.
Openntpd is working OK for me so I stayed with it. However, to get around the network start delay I removed openntpd from rc.conf daemons and put the following in the wicd connection (properties->scripts->post connection script)
/etc/rc.d/openntpd start
You can also do this with multiple daemons starters e.g.
/etc/rc.d/openntpd start && /etc/rc.d/dnsmasq start
Offline
If it starts before wicd it will fail to resolve the name of the ntp servers because there is no network, it will remove the servers from the list of servers and it will not work, I had the same problem.
My solution was to make a static association in /etc/hosts, ntpd will fail to contact the servers but it can resolve the name so it will keep trying to contact them until there is network, which should be a few seconds later after wicd starts.
Openntpd is working OK for me so I stayed with it. However, to get around the network start delay I removed openntpd from rc.conf daemons and put the following in the wicd connection (properties->scripts->post connection script)
Thank you both for replying and for giving your own interesting solutions which I hadn't thought of.
10/10 for the usefulness of the Arch forums again!
Offline