On 1/31/24 10:44, Greg Wooledge wrote:
On Wed, Jan 31, 2024 at 10:25:40AM -0500, gene heskett wrote:
On 1/31/24 08:53, John Hasler wrote:
Gene writes:
How do I setup /etc/chrony/chrony.conf so it slams the system clock to
the current time on the first cycle as its rebooting?
initstepslew
man chrony.conf
deprecated in favor of makestep, and did not work, John.
*sigh*
How many times do we have to say it? When something goes wrong, don't
simply say "it didn't work". Give the *details*.
What changes did you make to files? What do the files look like now?
gene@bpi51e5p:/etc/chrony$ cat chrony.conf
# Welcome to the chrony configuration file. See chrony.conf(5) for more
# information about usable directives.
# Include configuration files found in /etc/chrony/conf.d.
confdir /etc/chrony/conf.d
# This will use (up to):
# - 4 sources from ntp.ubuntu.com which some are ipv6 enabled
# - 2 sources from 2.ubuntu.pool.ntp.org which is ipv6 enabled as well
# - 1 source from [01].ubuntu.pool.ntp.org each (ipv4 only atm)
# This means by default, up to 6 dual-stack and up to 2 additional IPv4-only
# sources will be used.
# At the same time it retains some protection against one of the entries
being
# down (compare to just using one of the lines). See (LP: #1754358) for the
# discussion.
#
# About using servers from the NTP Pool Project in general see (LP:
#104525).
# Approved by Ubuntu Technical Board on 2011-02-08.
# See http://www.pool.ntp.org/join.html for more information.
#pool ntp.ubuntu.com iburst maxsources 4
#pool 0.ubuntu.pool.ntp.org iburst maxsources 1
#pool 1.ubuntu.pool.ntp.org iburst maxsources 1
#pool 2.ubuntu.pool.ntp.org iburst maxsources 2
# Use time sources from DHCP.
sourcedir /run/chrony-dhcp
sourcedir /etc/chrony/sources.d
# This directive specify the location of the file containing ID/key
pairs for
# NTP authentication.
keyfile /etc/chrony/chrony.keys
# This directive specify the file into which chronyd will store the rate
# information.
driftfile /var/lib/chrony/chrony.drift
# Save NTS keys and cookies.
ntsdumpdir /var/lib/chrony
# Uncomment the following line to turn logging on.
#log tracking measurements statistics
# Log files location.
logdir /var/log/chrony
# Stop bad estimates upsetting machine clock.
maxupdateskew 100000.0
initstepslew 30 192.168.71.3
# This directive enables kernel synchronisation (every 11 minutes) of the
# real-time clock. Note that it can’t be used along with the 'rtcfile'
directive.
rtcsync
# Step the system clock instead of slewing it if the adjustment is
larger than
# one second, but only in the first three clock updates.
makestep 1 3000
# Get TAI-UTC offset and leap seconds from the system tz database.
# This directive must be commented out when using time sources serving
# leap-smeared time.
leapsectz right/UTC
gene@bpi51e5p:/etc/chrony$
Now, the file in /etc/chrony/sources.d:
gene@bpi51e5p:/etc/chrony/sources.d$ cat local-ntp-server.sources
server 192.168.71.3 iburst
gene@bpi51e5p:/etc/chrony/sources.d$
What commands did you run?
6 of one half a dozen of the other
gene@bpi51e5p:/etc/init.d$ sudo ./chrony status
[sudo] password for gene:
× chrony.service - chrony, an NTP client/server
Loaded: loaded (/lib/systemd/system/chrony.service; enabled;
vendor preset: enabled)
Active: failed (Result: protocol) since Sat 2023-12-30 03:15:44
EST; 2h 12min ago
Docs: man:chronyd(8)
man:chronyc(1)
man:chrony.conf(5)
Process: 1908 ExecStart=/usr/lib/systemd/scripts/chronyd-starter.sh
$DAEMON_OPTS (code=exited, status=0/SUCCESS)
CPU: 158ms
Dec 30 03:15:31 bpi51e5p chronyd[1936]: chronyd version 4.2 starting
(+CMDMON +NTP +REFCLOCK +RTC +PRIVDROP +SCFILTER +SIGN…6 -DEBUG)
Dec 30 03:15:31 bpi51e5p chronyd[1936]: Frequency -20.055 +/- 0.010 ppm
read from /var/lib/chrony/chrony.drift
Dec 30 03:15:32 bpi51e5p chronyd[1936]: Using right/UTC timezone to
obtain leap second data
Dec 30 03:15:32 bpi51e5p chronyd[1936]: Loaded seccomp filter (level 1)
Dec 30 03:15:42 bpi51e5p chronyd[1936]: Could not add source 192.168.71.3
Dec 30 03:15:42 bpi51e5p chronyd[1936]: No suitable source for initstepslew
Dec 30 03:15:42 bpi51e5p chronyd[1936]: Could not add source 192.168.71.3
Dec 30 03:15:44 bpi51e5p systemd[1]: chrony.service: New main PID 1936
does not exist or is a zombie.
Dec 30 03:15:44 bpi51e5p systemd[1]: chrony.service: Failed with result
'protocol'.
Dec 30 03:15:44 bpi51e5p systemd[1]: Failed to start chrony, an NTP
client/server.
Hint: Some lines were ellipsized, use -l to show in full.
gene@bpi51e5p:/etc/init.d$
or
gene@bpi51e5p:/etc/init.d$ sudo systemctl status chrony.service
× chrony.service - chrony, an NTP client/server
Loaded: loaded (/lib/systemd/system/chrony.service; enabled;
vendor preset: enabled)
Active: failed (Result: protocol) since Sat 2023-12-30 03:15:44
EST; 2h 13min ago
Docs: man:chronyd(8)
man:chronyc(1)
man:chrony.conf(5)
Process: 1908 ExecStart=/usr/lib/systemd/scripts/chronyd-starter.sh
$DAEMON_OPTS (code=exited, status=0/SUCCESS)
CPU: 158ms
Dec 30 03:15:31 bpi51e5p chronyd[1936]: chronyd version 4.2 starting
(+CMDMON +NTP +REFCLOCK +RTC +PRIVDROP +SCFILTER +SIGND +ASYNCD>
Dec 30 03:15:31 bpi51e5p chronyd[1936]: Frequency -20.055 +/- 0.010 ppm
read from /var/lib/chrony/chrony.drift
Dec 30 03:15:32 bpi51e5p chronyd[1936]: Using right/UTC timezone to
obtain leap second data
Dec 30 03:15:32 bpi51e5p chronyd[1936]: Loaded seccomp filter (level 1)
Dec 30 03:15:42 bpi51e5p chronyd[1936]: Could not add source 192.168.71.3
Dec 30 03:15:42 bpi51e5p chronyd[1936]: No suitable source for initstepslew
Dec 30 03:15:42 bpi51e5p chronyd[1936]: Could not add source 192.168.71.3
Dec 30 03:15:44 bpi51e5p systemd[1]: chrony.service: New main PID 1936
does not exist or is a zombie.
Dec 30 03:15:44 bpi51e5p systemd[1]: chrony.service: Failed with result
'protocol'.
Dec 30 03:15:44 bpi51e5p systemd[1]: Failed to start chrony, an NTP
client/server.
What output did you get?
The time as reported by "date":
gene@bpi51e5p:~$ date
Sat Dec 30 05:30:58 AM EST 2023
gene@bpi51e5p:~$
gene@coyote:~$ date
Wed Jan 31 12:38:16 EST 2024
gene@coyote:~$
What output did you *expect* to get?
The time reported by date here about a minute later:
gene@coyote:~$ date
Wed Jan 31 12:38:16 EST 2024
gene@coyote:~$
What other relevant details can you supply? (The identities and
configurations of the NTP servers that chrony is expected to use, for
example.)
There was an /etc/chrony/chrony.conf file, but no chrmy installed I had
to install it fresh, which is puzzling. That was an earlier install now
uptodate:
Linux bpi51e5p 6.1.63-current-meson64 #1 SMP PREEMPT Mon Nov 20 10:52:19
UTC 2023 aarch64 aarch64 aarch64 GNU/Linux
gene@bpi51e5p:/etc$ cat issue
Armbian 23.11.1 jammy \l
.
Did I miss anything with this wall of text? If there's still something
missing, id it and I'll see if it exists and copy/paste it.
Cheers, Greg, Gene Heskett, CET.
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.
- Louis D. Brandeis