From owner-freebsd-stable@FreeBSD.ORG Fri Jul 20 09:34:29 2007 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3BC0516A41B for ; Fri, 20 Jul 2007 09:34:29 +0000 (UTC) (envelope-from LoN_Kamikaze@gmx.de) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mx1.freebsd.org (Postfix) with SMTP id A0C0513C459 for ; Fri, 20 Jul 2007 09:34:28 +0000 (UTC) (envelope-from LoN_Kamikaze@gmx.de) Received: (qmail invoked by alias); 20 Jul 2007 09:34:26 -0000 Received: from nat-wh-1.rz.uni-karlsruhe.de (EHLO mobileKamikaze.norad) [129.13.72.169] by mail.gmx.net (mp035) with SMTP; 20 Jul 2007 11:34:26 +0200 X-Authenticated: #5465401 X-Provags-ID: V01U2FsdGVkX1/MwShyacfMwXWsKpoj81KGST+9CTiHU/fr7B82ld qSn9r01WK2rDo6 Message-ID: <46A081A1.3040003@gmx.de> Date: Fri, 20 Jul 2007 11:34:25 +0200 From: "[LoN]Kamikaze" User-Agent: Thunderbird 2.0.0.4 (X11/20070616) MIME-Version: 1.0 To: Stefan Lambrev References: <469F9A85.4090209@gmx.de> <469FA50E.9080705@gmx.de> <46A0662A.7060401@sun-fish.com> In-Reply-To: <46A0662A.7060401@sun-fish.com> X-Enigmail-Version: 0.95.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 Cc: FreeBSD Stable Subject: Re: ntpd just sits there and does nothing X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jul 2007 09:34:29 -0000 Stefan Lambrev wrote: > Hi, > > [LoN]Kamikaze wrote: >> Doug Hardie wrote: >> >>> On Jul 19, 2007, at 10:08, [LoN]Kamikaze wrote: >>> >>> >>>> As the subject says, on my 6-stable systems ntpd just sits there and >>>> does >>>> nothing. The logs only mention when the daemon gets started or shut >>>> down. It >>>> complains when servers are not reachable, but does nothing when they >>>> are available. >>>> >>>> The drift file always contains 0.00. >>>> >>>> ntpdate and openntpd both successfully manage to set the time, so I >>>> suppose >>>> it's a problem with ntpd. >>>> >>> Are you on a static IP address? If not, ntpd obtains its IP address >>> when it starts up and uses it forever. If your IP address changes then >>> it will not be able to communicate with the upstream ntp servers. It >>> has to be restarted everytime your IP address changes. >>> >> >> I have a static address. The trouble is it seems to operate fine, only it >> forgets to change the time when it differs from the time servers too >> much. >> Sometimes my clock goes wrong more than 1 second within a day. >> > ntpd will not change time if the difference is too big - I think it > should be less then 1000s. > ntpdate will :) > > Also if you have increased your kernel secure level 2+ : > > In addition, kernel time changes are restricted to less than or > equal to one second. Attempts to change the time by more than > this > will log the message ``Time adjustment clamped to +1 second''. > > So grep for ntpd in /var/log/messages and I'm sure you will find the > problem. > > Other problem that I see is if you are behind NAT/firewall. > Because ntpd make a request and wait for response on different port, so > check your firewall configuration and blocked packets. My securelevel is -1, even starting with an accurate clock ntpd just slowly lets it drift away. I'm behind a 2 NATs, one of which I have no access to. However openntpd and ntpdate don't seem to be troubled by this.