# Ntppool-agent changes from 4.1.0 to 4.2.0

**URL:** <https://community.ntppool.org/t/ntppool-agent-changes-from-4-1-0-to-4-2-0/4738>\
**Category:** Monitoring Operators\
**Created:** [September 21, 2026, 6:07am UTC](https://community.ntppool.org/t/ntppool-agent-changes-from-4-1-0-to-4-2-0/4738 "2026-09-21T06:07:55Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![ask](https://sea2.discourse-cdn.com/flex016/user_avatar/community.ntppool.org/ask/32/907_2.png) [@ask](https://community.ntppool.org/u/ask)\
**Post date:** [September 21, 2026, 6:07am UTC](https://community.ntppool.org/t/ntppool-agent-changes-from-4-1-0-to-4-2-0/4738/1 "2026-09-21T06:07:55Z")

</div>

The main change here is that I merged a postgres refactor into the main branch as I’m updating the beta site with that (and the production site soon I hope). The ntppool-agent should work with either. The list below is a Claude summary of the CHANGES file.

The current version in the production repository is 4.1.6 (since earlier today) which was primarily just a rebuild with updated Go and dependencies (from the agent perspective) and the current beta version is 4.2.0 (some features around “implausible RTTs” that a single since long deleted server exhibited a while ago).

## v4.2.0

Upgrading the agent needs no other change. It works with both the old MySQL server and the new PostgreSQL server.

### Client

- Fix: The agent reports a sample with a zero or negative round trip time as an error (“implausible rtt”). Before, it treated that sample as a fast, healthy response. The best sample is the one with the lowest rtt, so a bogus zero beat good samples. Now the agent prefers the other samples for that NTP server. If every sample is bad, it reports the server as an error. On the local clock check, a reference server that fails this way counts as a failure.
- Fix: An empty configuration response from the API is now an error. Before, it crashed the agent with a nil pointer dereference.
- Fix: An ad-hoc NTP check from the web interface no longer changes the sample count of the agent’s regular checks.

### Server

- A zero or negative round trip time now counts against the monitored NTP server. Such a response means the server reported spending longer on the request than the whole exchange took. `monitor-api` scores it as an error (“implausible rtt”: step -4, no offset), drops the rtt, and logs a warning with the server and the rtt. Before, `monitor-api` scored the response on its offset.
- Timeouts no longer count as a 0 ms round trip in the average that ranks monitors for an NTP server. Monitors that see timeouts rank lower than before.

## v4.1.6

### Server

- Promotion from testing to active no longer blocks silently. The selector now derives the minimum sample counts for testing → active and candidate → testing promotions from `interval_testing`. With `interval_testing` above about 45 minutes, the old fixed threshold was unreachable, so no monitor could move from testing to active. The default `interval_testing` is now 30 minutes (was 45).
- Fix: The scorer no longer crashes and replays the same entry forever when an NTP server has no recent monitor data, for example when every probe times out. It now skips those entries and counts them in `scorer_score_errors_skipped_total`. Before, the scorer never moved past that entry.
- Fix: Result submissions no longer queue behind the scorer. The scorer used to hold row locks on `servers` for a whole batch. It now updates `servers` after the batch commits.
- Fix: `SubmitResults` is back to 1 transaction per status. The single transaction that v4.1.5 added caused transaction deadlocks.

### Packaging

- Fix: The postinstall script skips `systemctl` calls when systemd isn’t PID 1. The check in v4.1.2 ran `systemctl --version`, which succeeds in any container that has `systemctl` installed. The script now checks for `/run/systemd/system`.

## v4.1.5

### Client

- RPC timeouts are longer: 30s for the response header and 60s overall (was 10s and 30s). `SubmitResults` can now wait out database contention on the server.
- Batch error logs carry the matching `trace_id`, and failed batches show up as errored spans.

## v4.1.4

### Client

- Better systemd journal support, from an upgrade of `go.ntppool.org/common` to v0.10.2.

## v4.1.3

### Client

- When stderr connects to journald, the agent sends each log record through the native journal protocol with its own priority. `journalctl -p` and `LogLevelMax=` in the unit file now filter by severity. `DEBUG_INVOCATION` (set by `RestartMode=debug`) raises stderr verbosity to debug after a failed restart.
- On an MQTT session takeover (reason code `0x8E`), the agent backs off its reconnects: 2m, then 5m, 10m and 15m. Before, it reconnected every 10s. That code means another client connected with the same client ID.
- While another client holds the session, the agent pauses NTP checks and result submission. The backoff resets after 30 minutes of stable connection, and the agent now always logs the disconnect reason code.

## v4.1.2

### Client

- New `--log-level` flag and `MONITOR_LOG_LEVEL` environment variable set the stderr log level. `--debug` overrides both and sets the level to DEBUG. The server controls the OTLP log level through the gRPC config, and the agent caches it in `state.json`.
- The agent sets `OTEL_SERVICE_NAME=ntppool-agent`, so its logs appear in Loki under the correct service name.

### Packaging

- The postinstall script exits cleanly on non-systemd systems and in containers where `systemctl` exists but systemd isn’t PID 1. Until v4.1.6, this check wrongly passed in any container that had `systemctl` installed.

## v4.1.1

### Packaging

- On upgrade, the postinstall script disables all legacy `ntppool-monitor@*` systemd units and clears their failed-unit records. The package now declares a conflict with the old package, so the replacement is clean.

## v4.1.0

### Packaging

- The deb, rpm and apk packages declare that they replace the old `ntppool-monitor` package, so an upgrade removes it.

---

<div class="post-metadata">

**Author:** ![john1](https://sea2.discourse-cdn.com/flex016/user_avatar/community.ntppool.org/john1/32/1464_2.png) [@john1](https://community.ntppool.org/u/john1)\
**Post date:** [September 21, 2026, 7:14am UTC](https://community.ntppool.org/t/ntppool-agent-changes-from-4-1-0-to-4-2-0/4738/2 "2026-09-21T07:14:38Z")

</div>

Hi @ask, how are non linux people supposed to find the new releases? At some stage you did enable indexing on [https://builds.ntppool.dev/ntppool-agent/builds/release/](https://builds.ntppool.dev/ntppool-agent/builds/release/) so that one can see the build directories and then find the latest build, but indexing has been turned off for a while now and trying to access the builds/release/ directory just produce an Access Denied error.

---

<div class="post-metadata">

**Author:** ![ask](https://sea2.discourse-cdn.com/flex016/user_avatar/community.ntppool.org/ask/32/907_2.png) [@ask](https://community.ntppool.org/u/ask)\
**Post date:** [September 21, 2026, 10:49am UTC](https://community.ntppool.org/t/ntppool-agent-changes-from-4-1-0-to-4-2-0/4738/3 "2026-09-21T10:49:39Z")

</div>

@john1 The only not mac mini or raspberry pi type server I have at home is a FreeBSD box, so you’d think I’d make this easier!

I’ll add something to the release process to fix this permanently.

---

<div class="post-metadata">

**Author:** ![MagicNTP](https://avatars.discourse-cdn.com/v4/letter/m/858c86/32.png) [@MagicNTP](https://community.ntppool.org/u/MagicNTP)\
**Post date:** [September 21, 2026, 11:08am UTC](https://community.ntppool.org/t/ntppool-agent-changes-from-4-1-0-to-4-2-0/4738/4 "2026-09-21T11:08:22Z")

</div>

@ask, while you’re at it, would it also be possible to re-enable the monitor statistics on the monitor management page (“Tests/minute” per monitor, and aggregate for all monitors, averaged over 1 hour and 24 hours), please?

Since a while, the aggregate numbers at the top of the monitor management page are missing, and the per-monitor numbers are “0.0 (1h), 0.0 (24h)”.

Thanks!

---

<div class="post-metadata">

**Author:** ![alica](https://sea2.discourse-cdn.com/flex016/user_avatar/community.ntppool.org/alica/32/337_2.png) [@alica](https://community.ntppool.org/u/alica)\
**Post date:** [September 21, 2026, 12:19pm UTC](https://community.ntppool.org/t/ntppool-agent-changes-from-4-1-0-to-4-2-0/4738/5 "2026-09-21T12:19:43Z")

</div>

The ntppool-agent binary found inside [4.1.6 i386 deb release](https://gemfury.com/ntppool/deb:ntppool-agent/ntppool-agent-4.1.6-i386/details) is still not run-able on Pentium3 which lacks SSE2… Built 4.2.0 from [Github tagged release](https://github.com/ntppool/monitor/releases/tag/v4.2.0) instead.

```txt
GNU gdb (GDB) 11.2
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "i586-slackware-linux".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./ntppool-agent...
(No debugging symbols found in ./ntppool-agent)
(gdb) run
Starting program: /usr/local/src/ntppool-agent/agent-4.1.6/usr/bin/ntppool-agent

Program received signal SIGILL, Illegal instruction.
0x080b602b in ?? ()
(gdb) x/i $eip
=> 0x80b602b: movsd %xmm0,0x20(%esp)
(gdb)

```

(MOVSD is SSE2 instruction)

---

<div class="post-metadata">

**Author:** ![Bas](https://sea2.discourse-cdn.com/flex016/user_avatar/community.ntppool.org/bas/32/465_2.png) [@Bas](https://community.ntppool.org/u/Bas)\
**Post date:** [September 21, 2026, 1:00pm UTC](https://community.ntppool.org/t/ntppool-agent-changes-from-4-1-0-to-4-2-0/4738/6 "2026-09-21T13:00:04Z")

</div>

I updated but got 4.1.6 for Debian, not 4.2.0.

I presume it’s not released yet?

---

<div class="post-metadata">

**Author:** ![john1](https://sea2.discourse-cdn.com/flex016/user_avatar/community.ntppool.org/john1/32/1464_2.png) [@john1](https://community.ntppool.org/u/john1)\
**Post date:** [September 21, 2026, 2:27pm UTC](https://community.ntppool.org/t/ntppool-agent-changes-from-4-1-0-to-4-2-0/4738/7 "2026-09-21T14:27:59Z")

</div>

I guess you skipped the 2nd paragraph of Ask’s message:

> [@ask](#):
>
> The current version in the production repository is 4.1.6

> [@ask](#):
>
> and the current beta version is 4.2.0

---

<div class="post-metadata">

**Author:** ![Bas](https://sea2.discourse-cdn.com/flex016/user_avatar/community.ntppool.org/bas/32/465_2.png) [@Bas](https://community.ntppool.org/u/Bas)\
**Post date:** [September 21, 2026, 3:08pm UTC](https://community.ntppool.org/t/ntppool-agent-changes-from-4-1-0-to-4-2-0/4738/8 "2026-09-21T15:08:07Z")

</div>

Didn’t read the entire topic.  
As I got a notification about 4.2.0  
So I expected to get it.

---

<div class="post-metadata">

**Author:** ![ask](https://sea2.discourse-cdn.com/flex016/user_avatar/community.ntppool.org/ask/32/907_2.png) [@ask](https://community.ntppool.org/u/ask)\
**Post date:** [September 21, 2026, 9:40pm UTC](https://community.ntppool.org/t/ntppool-agent-changes-from-4-1-0-to-4-2-0/4738/9 "2026-09-21T21:40:03Z")

</div>

@john1 [ntppool-agent builds](https://builds.ntppool.dev/ntppool-agent/builds/) is browsable now!

---

<div class="post-metadata">

**Author:** ![MagicNTP](https://avatars.discourse-cdn.com/v4/letter/m/858c86/32.png) [@MagicNTP](https://community.ntppool.org/u/MagicNTP)\
**Post date:** [September 21, 2026, 10:17pm UTC](https://community.ntppool.org/t/ntppool-agent-changes-from-4-1-0-to-4-2-0/4738/10 "2026-09-21T22:17:20Z")

</div>

And monitor stats are back, thanks @ask!!

---

<div class="post-metadata">

**Author:** ![ask](https://sea2.discourse-cdn.com/flex016/user_avatar/community.ntppool.org/ask/32/907_2.png) [@ask](https://community.ntppool.org/u/ask)\
**Post date:** [September 22, 2026, 5:13am UTC](https://community.ntppool.org/t/ntppool-agent-changes-from-4-1-0-to-4-2-0/4738/11 "2026-09-22T05:13:13Z")

</div>

4.2.0 is released, but as @john1 pointed out, just in the test repository for now. There were a lot of changes, but few relevant for the monitoring agent so … slow and careful.

---

<div class="post-metadata">

**Author:** ![ask](https://sea2.discourse-cdn.com/flex016/user_avatar/community.ntppool.org/ask/32/907_2.png) [@ask](https://community.ntppool.org/u/ask)\
**Post date:** [September 22, 2026, 5:33am UTC](https://community.ntppool.org/t/ntppool-agent-changes-from-4-1-0-to-4-2-0/4738/12 "2026-09-22T05:33:13Z")

</div>

@alica I gave fixing this another try (well Claude did)… I agree that running slower on more platforms (in particular for an already ancient architecture) is better than running a tiny tiny bit faster on less platforms.

Will you try this build? If so I will release it as 4.2.1.

> **[ntppool-agent test build 70 (v4.2.0-70)](https://builds.ntppool.dev/ntppool-agent/builds/test/70/)**

---

<div class="post-metadata">

**Author:** ![alica](https://sea2.discourse-cdn.com/flex016/user_avatar/community.ntppool.org/alica/32/337_2.png) [@alica](https://community.ntppool.org/u/alica)\
**Post date:** [September 22, 2026, 7:35am UTC](https://community.ntppool.org/t/ntppool-agent-changes-from-4-1-0-to-4-2-0/4738/13 "2026-09-22T07:35:58Z")

</div>

Yeah, looks like this build works: 👍

```txt
root@atelier:/usr/local/src/ntppool-agent# uname -p
Intel(R) Pentium(R) III CPU - S 1400MHz
root@atelier:/usr/local/src/ntppool-agent# ./ntppool-agent version
ntppool-agent v4.2.0-70/9b7d688 (2026-09-22T05:24:51Z, go1.26.8)

```

---

<div class="post-metadata">

**Author:** ![Bas](https://sea2.discourse-cdn.com/flex016/user_avatar/community.ntppool.org/bas/32/465_2.png) [@Bas](https://community.ntppool.org/u/Bas)\
**Post date:** [September 22, 2026, 3:35pm UTC](https://community.ntppool.org/t/ntppool-agent-changes-from-4-1-0-to-4-2-0/4738/14 "2026-09-22T15:35:59Z")

</div>

@ask, thanks for 4.1.6, as my 4.1.5 was stalled, not doing anything.  
After the update to 4.1.6 it started checking again.

For me this update made it work again.

---

<div class="post-metadata">

**Author:** ![MagicNTP](https://avatars.discourse-cdn.com/v4/letter/m/858c86/32.png) [@MagicNTP](https://community.ntppool.org/u/MagicNTP)\
**Post date:** [September 23, 2026, 9:32pm UTC](https://community.ntppool.org/t/ntppool-agent-changes-from-4-1-0-to-4-2-0/4738/15 "2026-09-23T21:32:15Z")

</div>

And I realize just now only that also the “Monitors” menu entry in the left side pane on the management page is back as well, thanks for that as well, @ask!
