Re: ntpdate not working

Martin Husemann <[email protected]>
Newsgroups gmane.os.netbsd.ports.sparc64
Message-ID <[email protected]>
On Fri, Dec 25, 2020 at 01:33:17PM +0100, Connor McLaughlan wrote:
> ntpdate=YES is set in /etc/rc.conf, however on boot i don't see any
> message regarding setting the time and the system time stays on a
> wrong value.

Probably it could not reach a suitable server.
What happens if you manually run

	/etc/rc.d/ntpdate start

later?

> >From my understanding if no option is given, it should read
> /etc/ntp.conf, fetch probably 2.netbsd.pool.ntp.org and set the time.

I don't think that is correct.

> It works if i execute it directly:
> bash-5.0# ntpdate 2.netbsd.pool.ntp.org
> 25 Dec 13:09:37 ntpdate[1000]: adjust time server 79.133.44.136 offset
> 0.072278 sec

All my sparc64 machines have prettty good clocks even when the machine
is turned off, so I don't take special care for initial time sync on
them (but just turn on ntpd=YES in rc.conf). On other machines I avoid
ntpdate and instaead run ntpd with ntpd_flags=-g (basically allowing ntpd
something similar to ntpdate at first sync).

Martin
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.