Hello, when starting ntpd at boot time, I've 2 ntpd's running: gate:/ # ps auxw | grep ntp root 407 0.0 0.7 2944 1752 ?? Ss 3:54PM 0:00.02 /usr/sbin/ntpd -p /var/run/ntpd.pid -f /var/db/ntpd.drift root 417 0.0 0.7 2944 1776 ?? S 3:54PM 0:00.00 /usr/sbin/ntpd -p /var/run/ntpd.pid -f /var/db/ntpd.drift gate:/ # ntpq ntpq> peers No association ID's returned After restarting, I've one daemon and all is running fine: gate:/ # /etc/rc.d/ntpd restart Stopping ntpd. Starting ntpd. gate:/ # ps auxw | grep ntp root 566 0.0 0.7 2944 1784 ?? Ss 4:04PM 0:00.02 /usr/sbin/ntpd -p /var/run/ntpd.pid -f /var/db/ntpd.drift Any idea why? I' running 5.3-STABLE-SNAP001. Kind regards, Thomas.
On Wed, 2 Mar 2005 16:07:04 +0100 (CET), Thomas Krause <freebsd-stable@chef-ingenieur.de> wrote:> Hello, > when starting ntpd at boot time, I've 2 ntpd's running: > > gate:/ # ps auxw | grep ntp > root 407 0.0 0.7 2944 1752 ?? Ss 3:54PM 0:00.02 /usr/sbin/ntpd > -p /var/run/ntpd.pid -f /var/db/ntpd.drift > root 417 0.0 0.7 2944 1776 ?? S 3:54PM 0:00.00 /usr/sbin/ntpd > -p /var/run/ntpd.pid -f /var/db/ntpd.drift > > gate:/ # ntpq > ntpq> peers > No association ID's returned > > After restarting, I've one daemon and all is running fine: > > gate:/ # /etc/rc.d/ntpd restart > Stopping ntpd. > Starting ntpd. > > gate:/ # ps auxw | grep ntp > root 566 0.0 0.7 2944 1784 ?? Ss 4:04PM 0:00.02 /usr/sbin/ntpd > -p /var/run/ntpd.pid -f /var/db/ntpd.drift > > Any idea why? I' running 5.3-STABLE-SNAP001. >It could be that you have 2 scripts that are starting ntpd, check your rc.d directories: grep ntp /etc/rc.d/* /usr/local/etc/rc.d/* Scot
Thomas Krause wrote:> when starting ntpd at boot time, I've 2 ntpd's running: > [...] > Any idea why? I' running 5.3-STABLE-SNAP001.1. You have some host names in ntp.conf which need to be resolved, and 2. At the time ntpd starts, the resolver isn't running. For some reason, ntpd makes one attempt to look up names in DNS and then goes into an infinite loop. Colin Percival
> Date: Wed, 2 Mar 2005 16:07:04 +0100 (CET) > From: "Thomas Krause" <freebsd-stable@chef-ingenieur.de> > Sender: owner-freebsd-stable@freebsd.org > > Hello, > when starting ntpd at boot time, I've 2 ntpd's running: > > gate:/ # ps auxw | grep ntp > root 407 0.0 0.7 2944 1752 ?? Ss 3:54PM 0:00.02 /usr/sbin/ntpd > -p /var/run/ntpd.pid -f /var/db/ntpd.drift > root 417 0.0 0.7 2944 1776 ?? S 3:54PM 0:00.00 /usr/sbin/ntpd > -p /var/run/ntpd.pid -f /var/db/ntpd.drift > > gate:/ # ntpq > ntpq> peers > No association ID's returned > > After restarting, I've one daemon and all is running fine: > > gate:/ # /etc/rc.d/ntpd restart > Stopping ntpd. > Starting ntpd. > > gate:/ # ps auxw | grep ntp > root 566 0.0 0.7 2944 1784 ?? Ss 4:04PM 0:00.02 /usr/sbin/ntpd > -p /var/run/ntpd.pid -f /var/db/ntpd.drift > > Any idea why? I' running 5.3-STABLE-SNAP001.Either you have two commands to start ntpd in /etc/rc.d or (more likely) the parent process is never exiting. When ntpd starts, it forks a child process (the daemon) and exits. I have seen cases where the parent process never exits because the child never properly starts. That said, I have never seen this happen on a FreeBSD system, so it may be that you are starting it twice. But this seems a bit unlikely as the second daemon should exit immediately because the network socket is already in use. But it's possible that they are stating so close together that a race condition is locking things up. (Just speculation.) -- R. Kevin Oberman, Network Engineer Energy Sciences Network (ESnet) Ernest O. Lawrence Berkeley National Laboratory (Berkeley Lab) E-mail: oberman@es.net Phone: +1 510 486-8634