Re: ntpd dies soon after start
On Wed, Jun 14, 2017 at 10:34 AM, Vladimir Zakharovwrote: > On Wed, Jun 14, 2017, Alan Somers wrote: >> On Wed, Jun 14, 2017 at 9:57 AM, Vladimir Zakharov >> >> 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. > > My offset was about 22 minutes only. Your receipt solved the problem. > Thanks My bad; I was thinking that the offset was in seconds but it's actually in milliseconds. Glad to hear your problem's fixed. > > root@vzakharov:~ # date > Wed Jun 14 19:02:55 MSK 2017 > root@vzakharov:~ # /usr/sbin/ntpd -q -c /etc/ntp.conf -p /var/run/ntpd.pid -f > /var/db/ntpd.drift > 14 Jun 19:05:01 ntpd[14722]: ntpd 4.2.8p10-a (1): Starting > 14 Jun 19:05:01 ntpd[14722]: Command line: /usr/sbin/ntpd -q -c /etc/ntp.conf > -p /var/run/ntpd.pid -f /var/db/ntpd.drift > 14 Jun 19:05:01 ntpd[14722]: proto: precision = 0.065 usec (-24) > 14 Jun 19:05:01 ntpd[14722]: leapsecond file > ('/var/db/ntpd.leap-seconds.list'): good hash signature > 14 Jun 19:05:01 ntpd[14722]: leapsecond file > ('/var/db/ntpd.leap-seconds.list'): loaded, expire=2017-12-28T00:00:00Z > last=2017-01-01T00:00:00Z ofs=37 > 14 Jun 19:05:01 ntpd[14722]: Listen and drop on 0 v6wildcard [::]:123 > 14 Jun 19:05:01 ntpd[14722]: Listen and drop on 1 v4wildcard 0.0.0.0:123 > 14 Jun 19:05:01 ntpd[14722]: Listen normally on 2 re0 10.60.0.245:123 > 14 Jun 19:05:01 ntpd[14722]: Listen normally on 3 lo0 [::1]:123 > 14 Jun 19:05:01 ntpd[14722]: Listen normally on 4 lo0 [fe80::1%2]:123 > 14 Jun 19:05:01 ntpd[14722]: Listen normally on 5 lo0 127.0.0.1:123 > 14 Jun 19:05:01 ntpd[14722]: Listening on routing socket on fd #26 for > interface updates > 14 Jun 19:05:02 ntpd[14722]: Soliciting pool server 192.36.143.130 > 14 Jun 19:05:03 ntpd[14722]: Soliciting pool server 195.122.241.236 > 14 Jun 19:05:04 ntpd[14722]: Soliciting pool server 91.207.136.55 > 14 Jun 19:05:05 ntpd[14722]: Soliciting pool server 194.190.168.1 > root@vzakharov:~ # ntpdate 0.freebsd.pool.ntp.org > 14 Jun 19:28:49 ntpdate[14740]: step time server 194.190.168.1 offset > 1344.686561 sec > root@vzakharov:~ # date > Wed Jun 14 19:28:53 MSK 2017 > > -- > Regards, | "In theory there is no difference between theory > Vladimir Zakharov | and practice. In practice there is."- Yogi Berra ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: ntpd dies soon after start
On Wed, Jun 14, 2017, Alan Somers wrote: > On Wed, Jun 14, 2017 at 9:57 AM, Vladimir Zakharov > > 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. My offset was about 22 minutes only. Your receipt solved the problem. Thanks root@vzakharov:~ # date Wed Jun 14 19:02:55 MSK 2017 root@vzakharov:~ # /usr/sbin/ntpd -q -c /etc/ntp.conf -p /var/run/ntpd.pid -f /var/db/ntpd.drift 14 Jun 19:05:01 ntpd[14722]: ntpd 4.2.8p10-a (1): Starting 14 Jun 19:05:01 ntpd[14722]: Command line: /usr/sbin/ntpd -q -c /etc/ntp.conf -p /var/run/ntpd.pid -f /var/db/ntpd.drift 14 Jun 19:05:01 ntpd[14722]: proto: precision = 0.065 usec (-24) 14 Jun 19:05:01 ntpd[14722]: leapsecond file ('/var/db/ntpd.leap-seconds.list'): good hash signature 14 Jun 19:05:01 ntpd[14722]: leapsecond file ('/var/db/ntpd.leap-seconds.list'): loaded, expire=2017-12-28T00:00:00Z last=2017-01-01T00:00:00Z ofs=37 14 Jun 19:05:01 ntpd[14722]: Listen and drop on 0 v6wildcard [::]:123 14 Jun 19:05:01 ntpd[14722]: Listen and drop on 1 v4wildcard 0.0.0.0:123 14 Jun 19:05:01 ntpd[14722]: Listen normally on 2 re0 10.60.0.245:123 14 Jun 19:05:01 ntpd[14722]: Listen normally on 3 lo0 [::1]:123 14 Jun 19:05:01 ntpd[14722]: Listen normally on 4 lo0 [fe80::1%2]:123 14 Jun 19:05:01 ntpd[14722]: Listen normally on 5 lo0 127.0.0.1:123 14 Jun 19:05:01 ntpd[14722]: Listening on routing socket on fd #26 for interface updates 14 Jun 19:05:02 ntpd[14722]: Soliciting pool server 192.36.143.130 14 Jun 19:05:03 ntpd[14722]: Soliciting pool server 195.122.241.236 14 Jun 19:05:04 ntpd[14722]: Soliciting pool server 91.207.136.55 14 Jun 19:05:05 ntpd[14722]: Soliciting pool server 194.190.168.1 root@vzakharov:~ # ntpdate 0.freebsd.pool.ntp.org 14 Jun 19:28:49 ntpdate[14740]: step time server 194.190.168.1 offset 1344.686561 sec root@vzakharov:~ # date Wed Jun 14 19:28:53 MSK 2017 -- Regards, | "In theory there is no difference between theory Vladimir Zakharov | and practice. In practice there is."- Yogi Berra ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: ntpd dies soon after start
On Wed, Jun 14, 2017 at 9:57 AM, Vladimir Zakharovwrote: > 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- 6400.0000.000 0.000 > ftpshare1.corbi 89.109.251.212 u1 6411.489 1344688 0.000 > root@vzakharov:~ # ntpq -p > remote refid st t when poll reach delay offset jitter > == > 0.freebsd.pool. .POOL. 16 p- 6400.0000.000 0.000 > ftpshare1.corbi 89.109.251.212 u1 6411.495 1344688 0.018 > time.ooonet.ru 89.109.251.242 u1 641 25.201 1344687 0.000 > nag.aleksdem.co 194.190.168.1 2 u1 6411.914 1344687 0.000 > root@vzakharov:~ # ntpq -p > remote refid st t when poll reach delay offset jitter > == > 0.freebsd.pool. .POOL. 16 p- 6400.0000.000 0.000 > ground.corbina. 193.11.166.202 u2 6411.673 1344687 0.000 > ftpshare1.corbi 193.11.166.202 u1 6411.532 1344688 0.018 > time.ooonet.ru 89.109.251.242 u2 641 25.169 1344687 0.035 > nag.aleksdem.co 194.190.168.1 2 u1 6412.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 ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
ntpd dies soon after start
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- 6400.0000.000 0.000 ftpshare1.corbi 89.109.251.212 u1 6411.489 1344688 0.000 root@vzakharov:~ # ntpq -p remote refid st t when poll reach delay offset jitter == 0.freebsd.pool. .POOL. 16 p- 6400.0000.000 0.000 ftpshare1.corbi 89.109.251.212 u1 6411.495 1344688 0.018 time.ooonet.ru 89.109.251.242 u1 641 25.201 1344687 0.000 nag.aleksdem.co 194.190.168.12 u1 6411.914 1344687 0.000 root@vzakharov:~ # ntpq -p remote refid st t when poll reach delay offset jitter == 0.freebsd.pool. .POOL. 16 p- 6400.0000.000 0.000 ground.corbina. 193.11.166.202 u2 6411.673 1344687 0.000 ftpshare1.corbi 193.11.166.202 u1 6411.532 1344688 0.018 time.ooonet.ru 89.109.251.242 u2 641 25.169 1344687 0.035 nag.aleksdem.co 194.190.168.12 u1 6412.740 1344686 0.311 root@vzakharov:~ # ntpq -p ntpq: read: Connection refused Cleaning, rebuilding and reinstalling world does not help. # uname -a FreeBSD vzakharov 12.0-CURRENT FreeBSD 12.0-CURRENT #87 r319940: Wed Jun 14 17:02:16 MSK 2017 root@vzakharov:/home/obj/usr/src/sys/GENERIC-NODEBUG amd64 # truss -f /usr/sbin/ntpd -c /etc/ntp.conf -p /var/run/ntpd.pid -f /var/db/ntpd.drift ... (closing descriptors is omitted) 14511: openat(AT_FDCWD,"/dev/null",O_RDONLY,00) = 0 (0x0) 14511: dup2(0,1) = 1 (0x1) 14511: dup2(0,2) = 2 (0x2) 14511: socket(PF_LOCAL,SOCK_DGRAM|SOCK_CLOEXEC,0) = 3 (0x3) 14511: connect(3,{ AF_UNIX "/var/run/logpriv" },106) = 0 (0x0) 14511: setsid() = 14511 (0x38af) 14511: getrlimit(RLIMIT_STACK,{ cur=536870912,max=536870912 }) = 0 (0x0) 14511: setrlimit(RLIMIT_STACK,{ cur=204800,max=536870912 }) = 0 (0x0) 14511: setrlimit(RLIMIT_MEMLOCK,{ cur=33554432,max=33554432 }) = 0 (0x0) 14511: sigprocmask(SIG_SETMASK,{ SIGHUP|SIGINT|SIGQUIT|SIGILL|SIGTRAP|SIGABRT|SIGEMT|SIGFPE|SIGKILL|SIGBUS|SIGSEGV|SIGSYS|SIGPIPE|SIGALRM|SIGTERM|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXFSZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2 },{ }) = 0 (0x0) 14511: sigaction(SIGHUP,{ 0x80107afe0 SA_SIGINFO ss_t },{ SIG_DFL 0x0 ss_t }) = 0 (0x0) 14511: sigprocmask(SIG_SETMASK,{ },0x0) = 0 (0x0) 14511: sigprocmask(SIG_SETMASK,{ SIGHUP|SIGINT|SIGQUIT|SIGILL|SIGTRAP|SIGABRT|SIGEMT|SIGFPE|SIGKILL|SIGBUS|SIGSEGV|SIGSYS|SIGPIPE|SIGALRM|SIGTERM|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXFSZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2 },{ }) = 0 (0x0) 14511: sigaction(SIGINT,{ 0x80107afe0 SA_SIGINFO ss_t },{ SIG_DFL SA_RESTART ss_t }) = 0 (0x0) 14511: sigprocmask(SIG_SETMASK,{ },0x0) = 0 (0x0) 14511: sigprocmask(SIG_SETMASK,{ SIGHUP|SIGINT|SIGQUIT|SIGILL|SIGTRAP|SIGABRT|SIGEMT|SIGFPE|SIGKILL|SIGBUS|SIGSEGV|SIGSYS|SIGPIPE|SIGALRM|SIGTERM|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXFSZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2 },{ }) = 0 (0x0) 14511: sigaction(SIGQUIT,{ 0x80107afe0 SA_SIGINFO ss_t },{ SIG_DFL SA_RESTART ss_t }) = 0 (0x0) 14511: sigprocmask(SIG_SETMASK,{ },0x0) = 0 (0x0) 14511: sigprocmask(SIG_SETMASK,{ SIGHUP|SIGINT|SIGQUIT|SIGILL|SIGTRAP|SIGABRT|SIGEMT|SIGFPE|SIGKILL|SIGBUS|SIGSEGV|SIGSYS|SIGPIPE|SIGALRM|SIGTERM|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXFSZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2 },{ }) = 0 (0x0) 14511: sigaction(SIGTERM,{ 0x80107afe0 SA_SIGINFO ss_t },{ SIG_DFL SA_RESTART ss_t }) = 0 (0x0) 14511: sigprocmask(SIG_SETMASK,{ },0x0) = 0 (0x0) 14511: sigprocmask(SIG_SETMASK,{ SIGHUP|SIGINT|SIGQUIT|SIGILL|SIGTRAP|SIGABRT|SIGEMT|SIGFPE|SIGKILL|SIGBUS|SIGSEGV|SIGSYS|SIGPIPE|SIGALRM|SIGTERM|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXFSZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2 },{ }) = 0 (0x0) 14511: sigaction(SIGBUS,{ 0x80107afe0 SA_SIGINFO ss_t },{ SIG_DFL 0x0 ss_t }) = 0 (0x0) 14511: sigprocmask(SIG_SETMASK,{ },0x0) = 0 (0x0) 14511: sigprocmask(SIG_SETMASK,{