From owner-freebsd-current@freebsd.org Wed Jun 14 16:23:04 2017 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DF38ABEE5DB for ; Wed, 14 Jun 2017 16:23:04 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-yb0-x233.google.com (mail-yb0-x233.google.com [IPv6:2607:f8b0:4002:c09::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9DE7F6F575 for ; Wed, 14 Jun 2017 16:23:04 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-yb0-x233.google.com with SMTP id 84so1842736ybe.0 for ; Wed, 14 Jun 2017 09:23:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=r41sNvRW8oMmElWp+qInZbmG9h8j6+fVWxgh99Na8HU=; b=V0Oo6A0UeJVq7RtLxNqI66Uedxj9Yn3ylDHr3CJC2ySBHOgoRdBu4WV09oOiINNFiR RNMNY5y/0Qmc9EKljhUbtEw8xRLK2AVOfTVTJ5IldjRizRH/L14L1G9ZZ9mwoFe6Iecs f/TLXpHCoN0YcHJdFFuQsm3WmAmKO/qbHR3YLqpmPBIf8g8ha6TrN1dgKWjzQJGnzQMk +dv6kxxxxCREDKnAtS7lZPIDUIPzniaLgpBscQlkl4/GvKb3FMovjdhuKw8fmuf0pkDD hSLT1BQgzxI3LSvTlkvmCgpYtuAbgo4EJgoA6dQFu0V5l6i36aqLWItCFQFprJRHOcPH d2Dw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=r41sNvRW8oMmElWp+qInZbmG9h8j6+fVWxgh99Na8HU=; b=Jg66fM1aU/h2pMLX1mLjHJ/ZsYEERVyoeufIbh7/umv33Bvso70S4Mb0TU+WxuUbgO rW9JyowAwV2pwEbc2G7gg/PqbjRMRKZe1G+pWHWKeKf9wNZ3CkylCGvkr14ONwcGwcNA VAu7W/i3MWPXIg0TE+q9U3PhsIso4dZ/OGIOk/dJPQlCkAunt+jpcyRdN6L3CvD0b7Dl 2U53JADtZzufus0q8tX1v5/VsVNSrpgpdt/R0HtDF7IbTU65zYP9Ye3QVi6fqbyUZ2WX piduLQn5vW+D0F/7Qig0i2qyiFvVZzmtG/YTpIAJ/uhID0ngAozzzcxRGujKseSL9Yqg fwIg== X-Gm-Message-State: AKS2vOygwm2U13SlmgMC/lLYY3taEucL7+q8/HqOWAOQ7BjK8z+vm7Nw w914lROSadTUsEm+AFekmHMnhclTyw== X-Received: by 10.37.219.208 with SMTP id g199mr808981ybf.195.1497457383511; Wed, 14 Jun 2017 09:23:03 -0700 (PDT) MIME-Version: 1.0 Sender: asomers@gmail.com Received: by 10.13.206.199 with HTTP; Wed, 14 Jun 2017 09:23:02 -0700 (PDT) In-Reply-To: <20170614155714.lvljvn4dsztinull@vzakharov> References: <20170614155714.lvljvn4dsztinull@vzakharov> From: Alan Somers Date: Wed, 14 Jun 2017 10:23:02 -0600 X-Google-Sender-Auth: 1j1KaQ-uT6tJOkmZ5qaJeJGVnHk Message-ID: Subject: Re: ntpd dies soon after start To: Vladimir Zakharov Cc: FreeBSD CURRENT Content-Type: text/plain; charset="UTF-8" X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jun 2017 16:23:05 -0000 On Wed, Jun 14, 2017 at 9:57 AM, Vladimir Zakharov wrote: > Hello! > > I have ntpd enabled to start during boot. I see, that it starts. But > querying it after booting fails: > # ntpq -p > ntpq: read: Connection refused > > After manual start, it works for several seconds and then dies. > root@vzakharov:~ # service ntpd start > Starting ntpd. > root@vzakharov:~ # ntpq -p > remote refid st t when poll reach delay offset jitter > ============================================================================== > 0.freebsd.pool. .POOL. 16 p - 64 0 0.000 0.000 0.000 > ftpshare1.corbi 89.109.251.21 2 u 1 64 1 1.489 1344688 0.000 > root@vzakharov:~ # ntpq -p > remote refid st t when poll reach delay offset jitter > ============================================================================== > 0.freebsd.pool. .POOL. 16 p - 64 0 0.000 0.000 0.000 > ftpshare1.corbi 89.109.251.21 2 u 1 64 1 1.495 1344688 0.018 > time.ooonet.ru 89.109.251.24 2 u 1 64 1 25.201 1344687 0.000 > nag.aleksdem.co 194.190.168.1 2 u 1 64 1 1.914 1344687 0.000 > root@vzakharov:~ # ntpq -p > remote refid st t when poll reach delay offset jitter > ============================================================================== > 0.freebsd.pool. .POOL. 16 p - 64 0 0.000 0.000 0.000 > ground.corbina. 193.11.166.20 2 u 2 64 1 1.673 1344687 0.000 > ftpshare1.corbi 193.11.166.20 2 u 1 64 1 1.532 1344688 0.018 > time.ooonet.ru 89.109.251.24 2 u 2 64 1 25.169 1344687 0.035 > nag.aleksdem.co 194.190.168.1 2 u 1 64 1 2.740 1344686 0.311 > root@vzakharov:~ # ntpq -p > ntpq: read: Connection refused This is by design. Your offset is so large (more than a year), that ntpd fails its basic sanity test. You need to do one of the following: 1) Manually set the time before starting ntpd for the first time 2) Invoke ntpd with the "-g" flag 3) Run ntpdate before running ntpd. -Alan