FreeBSD :14.2 ntpd does not start when booting the system

#NTP
Code:
ntpd_enable="YES"
Code:
ntpd [2627]:Clock offset exceeds panic threshold
Code:
service ntpd status
ntpd is not running.
root@celebris:~ # service ntpd start
Starting ntpd.
root@celebris:~ # service ntpd status
ntpd is running as pid 2627.
 

Code:
-g, --panicgate
           Allow  the  first adjustment to be Big.    This option may    appear
           an unlimited number of times.

           Normally, ntpd exits with a message to the system  log  if  the
           offset exceeds the panic    threshold, which is 1000 s by default.
           This  option allows the time to be set to any value without re-
           striction; however, this    can happen only    once. If the threshold
           is exceeded after that, ntpd will exit with a  message  to  the
           system log. This    option can be used with    the -q and -x options.
           See the tinker configuration file directive for other options.
 
Code:
ntpd_sync_on_start="NO"         # Sync time on ntpd startup, even if offset is high
Code:
        # Set command_args based on the various config vars.
        command_args="-p ${pidfile} -c ${ntpd_config} ${driftopt}"
        if checkyesno ntpd_sync_on_start; then
                command_args="${command_args} -g"
        fi

Set ntpd_sync_on_start="YES" in /etc/rc.conf.
 
Please note that ntpdate(8) is deprecated and will get removed in some future FreeBSD version.
Instead of ntpdate(8), ntpd(8) can be used for one-shot sync, too.
As already noted, option -g is helpful and -q is for one-shot sync (don't run as daemon and quit). For exmple:
ntpd -q -g your-nearest-ntp-server

If you're on IPv4-only network, option -4 (for IPv6-only network, -6) would help, too.

And note that option -q cannot be used while ntpd(8) is running as daemon (service).
But in cases that slew is still too large for anything to be run on your computer, temporarily stopping ntpd(8) service, repeating one shot sync until slew becomes small enough then restart ntpd(8) after reboot could help.
 
It has been more than 23 years since the word "retired" was written.
I know, it's been mentioned in the man page for quite some time too, at least since 12.0 or maybe even longer.

Code:
 After a suitable period of mourning, the ntpdate utility is to be retired from this distribution.
How long should this mourning period last 😂
 
If I recall correctly, some time providers in Japan already stopped providing ntpdate service. (Not 100% sure they actually stopped or just warned.)
It's not a special service? It just uses the NTP protocol as far as I know.
 
Thanks for providing the replacment command.
ntpd -q -g pool.ntp.org

So unless I create this file getting slew lower won't matter on laptop reboot? It will go back to bad clock timing?
6 Jan 09:50:44 ntpd[1304]: leapsecond file ('/var/db/ntpd.leap-seconds.list'): stat failed: No such file or directory
 
So slew has nothing to do with leap seconds. My bad.

I just blindly scraped this from another thread and adjusted url to see what it does.
/etc/rc.conf
Code:
#### NTP ####
ntp_src_leapfile="/etc/ntp/leap-seconds"
ntp_db_leapfile="/var/db/ntpd.leap-seconds.list"
ntp_leapfile_sources="https://data.iana.org/timezones/data/leap-seconds.list"
ntp_leapfile_fetch_opts="-mq"
ntp_leapfile_expiry_days=30
ntp_leapfile_fetch_verbose="NO"

Thread 73624
 
So slew has nothing to do with leap seconds. My bad.

I just blindly scraped this from another thread and adjusted url to see what it does.
/etc/rc.conf
Code:
#### NTP ####
ntp_src_leapfile="/etc/ntp/leap-seconds"
ntp_db_leapfile="/var/db/ntpd.leap-seconds.list"
ntp_leapfile_sources="https://data.iana.org/timezones/data/leap-seconds.list"
ntp_leapfile_fetch_opts="-mq"
ntp_leapfile_expiry_days=30
ntp_leapfile_fetch_verbose="NO"

Thread 73624
You'd better looking into /etc/defaults/rc.conf.
And anything that is same in it can be deleted from /etc/rc.conf[.local].
The source for 14.2 of it can be seen here.
 
Back
Top