Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Feb 2025 15:12:54 +0100 (CET)
From:      freebsd@oldach.net (Helge Oldach)
To:        junchoon@dec.sakura.ne.jp (Tomoaki AOKI)
Cc:        cy@FreeBSD.org, dev-commits-src-branches@freebsd.org
Subject:   Re: git: 1a241a911dc8 - stable/14 - ntpd: Use the ntpd -u option in preference to the rc su plumbing
Message-ID:  <202502281412.51SECsWG048020@nuc.oldach.net>
In-Reply-To: <20250228185324.df32beaa550475b0832e1ca0@dec.sakura.ne.jp> from Tomoaki AOKI at "28 Feb 2025 18:53:24"

index | next in thread | previous in thread | raw e-mail

Tomoaki AOKI wrote on Fri, 28 Feb 2025 10:53:24 +0100 (CET):
> Unfortunately, this commit caused ntpd hesitating to (re)start
> with error messages below on stable/14, amd64.
> 
>      ===== Quote =====
> # service ntpd stop
> Stopping ntpd.
> Waiting for PIDS: 52508.
> # service ntpd start
> Starting ntpd.
> daemon control: got EOF
> /etc/rc.d/ntpd: WARNING: failed to start ntpd
> # 
>      ===== End quote =====
> 
> Note that I have
>   ntpd_flags="-4 -g -x -f /var/db/ntpd.drift -l /var/log/ntpd.log"
>   ntpd_config="/etc/ntp/ntp.conf"
>   ntpd_enable="YES"
>   ntpd_sync_on_start="YES"
>   daily_ntpd_leapfile_enable="YES"
>   ntp_leapfile_fetch_verbose="YES"
> in my /etc/rc.conf.

I suggest ensure that the files referenced by the command line or by
configuration files can be created/written to by ntpd:ntpd.

For example, you're not using the default location for ntpd.drift.
The default location is /var/db/ntp/ntpd.drift, where the directory
/var/db/ntp/ is owned by ntpd:ntpd (as per /etc/mtree/BSD.var.dist), so
ntpd is able to write the drift file after dropping privileges.

Kind regards
Helge


help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202502281412.51SECsWG048020>