Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Jun 2017 10:23:02 -0600
From:      Alan Somers <asomers@freebsd.org>
To:        Vladimir Zakharov <zakharov.vv@gmail.com>
Cc:        FreeBSD CURRENT <freebsd-current@freebsd.org>
Subject:   Re: ntpd dies soon after start
Message-ID:  <CAOtMX2h%2BdE=QwJRg%2Bqjwz93y_2Q4dVkppmEtjR2=B4FP%2BPKNXg@mail.gmail.com>
In-Reply-To: <20170614155714.lvljvn4dsztinull@vzakharov>
References:  <20170614155714.lvljvn4dsztinull@vzakharov>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Jun 14, 2017 at 9:57 AM, Vladimir Zakharov
<zakharov.vv@gmail.com> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOtMX2h%2BdE=QwJRg%2Bqjwz93y_2Q4dVkppmEtjR2=B4FP%2BPKNXg>