What's new
  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

ntpMerlin ntpMerlin v3.4.10 [2025-Aug-03] - NTP Time Server for AsusWRT Merlin

Release Notes for ntpMerlin v3.4.9 production version now available
[2025-Jul-21]


1) FIXED: Missing symbolic link for /opt/ etc /passwd was causing the chronyd process to fail, resulting in an infinite loop trying to restart the process every 5 seconds.
[Thanks to GitHub user @trisk for reporting the problem and providing a fix.]

2) Miscellaneous code improvements.

NOTE: In the file path /opt/ etc /passwd the blank spaces are necessary for the string to be allowed in this post.


** The fork from @Jack Yaz's ntpMerlin add-on is now hosted on the AMTM-OSR GitHub repo:
 
Release Notes for ntpMerlin v3.4.10 production version now available
[2025-Aug-03]


1) IMPROVED: Added code to double-check and make sure only one NTP server process (either ntpd or chronyd) is running after toggling the time server selection, and every time the corresponding service script is executed (started or restarted).

2) IMPROVED: Added code to double-check and make sure that the correct time server script that's installed by ntpMerlin (for ntpd or chronyd) is found and executed, and to verify that it has not been overwritten or modified (e.g. via Entware package updates). These checks are performed at startup following a reboot, every time the NTP server is restarted, and every 10 minutes via the pre-existing cron job that generates time server stats.

3) Miscellaneous code improvements.


NOTE:
Thanks to @JGrana for reporting and bringing to the forefront the problem WRT multiple time servers running simultaneously. AFAICT, this problem has existed for a long time (probably since the beginning), and it was most likely to happen *after* an Entware update was performed, which installs its own set of service scripts, effectively overwriting the custom version installed by ntpMerlin.


** The fork from @Jack Yaz's ntpMerlin add-on is now hosted on the AMTM-OSR GitHub repo:
 
As soon as I updated, and changed to Chrony (wasn't installed, PKG installed via script), my log is full of those messages every couple of seconds:
Code:
Aug  3 09:20:48 timeserverd_[7134]: chronyd dead, restarting...
Aug  3 09:20:48 timeserverd_[7134]: chronyd was restarted
Aug  3 09:20:49 kernel: CPU: 0 PID: 8542 Comm: chronyd Tainted: P           O      4.19.183 #1
Aug  3 09:20:49 kernel: Hardware name: GTAX6000_50991 (DT)
Aug  3 09:20:49 kernel: pstate: 80000000 (Nzcv daif -PAN -UAO)
Aug  3 09:20:49 kernel: pc : 0000007f89e2f760
Aug  3 09:20:49 kernel: lr : 0000007f89eae93c
Aug  3 09:20:49 kernel: sp : 0000007fe81de7b0
Aug  3 09:20:49 kernel: x29: 0000007fe81de7b0 x28: 0000000000000000
Aug  3 09:20:49 kernel: x27: 0000007fe81de920 x26: 0000007fe81de910
Aug  3 09:20:49 kernel: x25: 0000007fe81de950 x24: 0000007fe81de978
Aug  3 09:20:49 kernel: x23: 0000000000000000 x22: 0000000000000004
Aug  3 09:20:49 kernel: x21: 000000000f41f530 x20: 0000007fe81de910
Aug  3 09:20:49 kernel: x19: 0000000000000004 x18: 00000000000000ff
Aug  3 09:20:49 kernel: x17: 0000000000000000 x16: a619ef0cfc9e83a1
Aug  3 09:20:49 kernel: x15: bdf8ec9b39d1bdfb x14: 2a8ff29ed92acd21
Aug  3 09:20:49 kernel: x13: 166a9e32a1c7b930 x12: a500546ed2a64514
Aug  3 09:20:49 kernel: x11: ffffffff00000001 x10: 0000000000000000
Aug  3 09:20:49 kernel: x9 : 00000000ffffffff x8 : ffffffffffffffff
Aug  3 09:20:49 kernel: x7 : ffffffffffffffff x6 : 0000000000000000
Aug  3 09:20:49 kernel: x5 : 166a9e31a1c7b931 x4 : 000000000f420290
Aug  3 09:20:49 kernel: x3 : 0000007f89eae910 x2 : 0000007f89e2f760
Aug  3 09:20:49 kernel: x1 : 0000000000000004 x0 : 0000007fe81de910

Solution is to switch back to ntpd
 
As soon as I updated, and changed to Chrony (wasn't installed, PKG installed via script), my log is full of those messages every couple of seconds:
Code:
Aug  3 09:20:48 timeserverd_[7134]: chronyd dead, restarting...
Aug  3 09:20:48 timeserverd_[7134]: chronyd was restarted
Aug  3 09:20:49 kernel: CPU: 0 PID: 8542 Comm: chronyd Tainted: P           O      4.19.183 #1
Aug  3 09:20:49 kernel: Hardware name: GTAX6000_50991 (DT)
Aug  3 09:20:49 kernel: pstate: 80000000 (Nzcv daif -PAN -UAO)
Aug  3 09:20:49 kernel: pc : 0000007f89e2f760
Aug  3 09:20:49 kernel: lr : 0000007f89eae93c
Aug  3 09:20:49 kernel: sp : 0000007fe81de7b0
Aug  3 09:20:49 kernel: x29: 0000007fe81de7b0 x28: 0000000000000000
Aug  3 09:20:49 kernel: x27: 0000007fe81de920 x26: 0000007fe81de910
Aug  3 09:20:49 kernel: x25: 0000007fe81de950 x24: 0000007fe81de978
Aug  3 09:20:49 kernel: x23: 0000000000000000 x22: 0000000000000004
Aug  3 09:20:49 kernel: x21: 000000000f41f530 x20: 0000007fe81de910
Aug  3 09:20:49 kernel: x19: 0000000000000004 x18: 00000000000000ff
Aug  3 09:20:49 kernel: x17: 0000000000000000 x16: a619ef0cfc9e83a1
Aug  3 09:20:49 kernel: x15: bdf8ec9b39d1bdfb x14: 2a8ff29ed92acd21
Aug  3 09:20:49 kernel: x13: 166a9e32a1c7b930 x12: a500546ed2a64514
Aug  3 09:20:49 kernel: x11: ffffffff00000001 x10: 0000000000000000
Aug  3 09:20:49 kernel: x9 : 00000000ffffffff x8 : ffffffffffffffff
Aug  3 09:20:49 kernel: x7 : ffffffffffffffff x6 : 0000000000000000
Aug  3 09:20:49 kernel: x5 : 166a9e31a1c7b931 x4 : 000000000f420290
Aug  3 09:20:49 kernel: x3 : 0000007f89eae910 x2 : 0000007f89e2f760
Aug  3 09:20:49 kernel: x1 : 0000000000000004 x0 : 0000007fe81de910

Solution is to switch back to ntpd
It looks like you got a "bad" Entware package installation.
I suggest removing any existing chrony package(s):
Bash:
opkg remove chrony chrony-nts --force-removal-of-dependent-packages
Then, try again to reinstall chrony via the ntpMerlin script.

If you continue to see the same problem, perhaps the current Entware package binary being installed is, for some reason, incompatible with your platform.
 
It looks like you got a "bad" Entware package installation.
I suggest removing any existing chrony package(s):
Bash:
opkg remove chrony chrony-nts --force-removal-of-dependent-packages
Then, try again to reinstall chrony via the ntpMerlin script.

If you continue to see the same problem, perhaps the current Entware package binary being installed is, for some reason, incompatible with your platform.
Did that, same issue.

Found the culprit.

It is in the conf file. It appears, if you uncomment that line, the Chrony doesn't like it and that problem starts:
! pool time.cloudflare.com iburst nts

Edit: it's nts. Nts for some reason doesn't work
 
Last edited:
Updated.

I also have this line in my config:
Code:
pool time.cloudflare.com iburst nts

However, I don't see any chronyd dead messages in my logs.
 
Updated.

I also have this line in my config:
Code:
pool time.cloudflare.com iburst nts

However, I don't see any chronyd dead messages in my logs.
I haven't debugged more...
Something is wrong in my system, for sure, even with a clean install and conf file of Chrony the problem persists...
But I haven't debugged so far.
 
Yesterday I managed to install ntpMerlin with Chrony using NTS servers without any problems at all.
 
Hmm, I am not having an issue with chrony and NTS
Code:
chronyc -N authdata -a
Name/IP address             Mode KeyID Type KLen Last Atmp  NAK Cook CLen
=========================================================================
time.apple.com                 -     0    0    0    -    0    0    0    0
time.apple.com                 -     0    0    0    -    0    0    0    0
time.apple.com                 -     0    0    0    -    0    0    0    0
time.apple.com                 -     0    0    0    -    0    0    0    0
time.apple.com                 -     0    0    0    -    0    0    0    0
time.apple.com                 -     0    0    0    -    0    0    0    0
time.cloudflare.com          NTS    32   30  128 189m    0    0    8   64
time.cloudflare.com          NTS    32   30  128 190m    0    0    8   64
time.cloudflare.com          NTS    32   30  128 181m    0    0    8   64
time.cloudflare.com          NTS    32   30  128 175m    0    0    8   64
Here is chrony.conf entries
Code:
pool time.apple.com maxsources 6
pool time.cloudflare.com nts
 
It looks like you got a "bad" Entware package installation.
I suggest removing any existing chrony package(s):
Bash:
opkg remove chrony chrony-nts --force-removal-of-dependent-packages
Then, try again to reinstall chrony via the ntpMerlin script.

If you continue to see the same problem, perhaps the current Entware package binary being installed is, for some reason, incompatible with your platform.
As of yesterday, I am getting the same issue reported by @maghuro

I have tried your suggestion @Martinski to remove chrony and reinstall via ntpmerlin, to no avail. When I attempt to run chronyd or chronyc, I get "Segmentation Fault".

Code:
Admin@zen:/# chronyd
Segmentation fault
Admin@zen:/# chronyc
Segmentation fault

Based on my inquires with ChatGPT (mileage varies, of course), I was provided with this answer "So the crash likely happens because the Entware chronyd (compiled for modern glibc / kernel ABI) is not binary-compatible with your older 4.1.x kernel."

Any suggestions?
 
As of yesterday, I am getting the same issue reported by @maghuro

I have tried your suggestion @Martinski to remove chrony and reinstall via ntpmerlin, to no avail. When I attempt to run chronyd or chronyc, I get "Segmentation Fault".

Code:
Admin@zen:/# chronyd
Segmentation fault
Admin@zen:/# chronyc
Segmentation fault
It's possible that some of your Entware packages might be corrupted or "incompatible" with each other.
Try the following steps on an SSH terminal window:

1) First, run the ntpMerlin CLI menu and *temporarily* switch from chronyd to ntpd using the 't' option:

ntpMerlin_CLI_MenuOption.jpg


2) Exit the ntpMerlin CLI menu.

3) Run the following commands:
Bash:
opkg update
opkg remove chrony chrony-nts libgmp libnettle libgnutls --force-removal-of-dependent-packages

4) Now, run again the ntpMerlin CLI menu and switch back to chronyd using the 't' option. This will trigger a reinstallation of the chronyd Entware packages.

5) Exit the ntpmerlin CLI menu.

6) Post the results of the following commands:
Bash:
{
   which chronyd ; $(which chronyd) -v
   echo
   top -bn1 | grep "chronyd" | grep -v grep
   echo
   ping -c4 time.cloudflare.com
}
 
It's possible that some of your Entware packages might be corrupted or "incompatible" with each other.
Try the following steps on an SSH terminal window:

1) First, run the ntpMerlin CLI menu and *temporarily* switch from chronyd to ntpd using the 't' option:

View attachment 68634

2) Exit the ntpMerlin CLI menu.

3) Run the following commands:
Bash:
opkg update
opkg remove chrony chrony-nts libgmp libnettle libgnutls --force-removal-of-dependent-packages

4) Now, run again the ntpMerlin CLI menu and switch back to chronyd using the 't' option. This will trigger a reinstallation of the chronyd Entware packages.

5) Exit the ntpmerlin CLI menu.

6) Post the results of the following commands:
Bash:
{
   which chronyd ; $(which chronyd) -v
   echo
   top -bn1 | grep "chronyd" | grep -v grep
   echo
   ping -c4 time.cloudflare.com
}
/opt/sbin/chronyd
chronyd (chrony) version 4.6.1 (+CMDMON +NTP +REFCLOCK -RTC +PRIVDROP -SCFILTER -SIGND +ASYNCDNS +NTS +SECHASH +IPV6 -DEBUG)

12590 1 nobody S 9944 1.9 1 0.0 chronyd -r -u nobody -f /opt/share/ntpmerlin.d/chrony.conf
12518 1 Admin S 3424 0.6 2 0.0 {timeserverd} /bin/sh /opt/bin/timeserverd S77chronyd

PING time.cloudflare.com (162.159.200.1): 56 data bytes
64 bytes from 162.159.200.1: seq=0 ttl=57 time=22.807 ms
64 bytes from 162.159.200.1: seq=1 ttl=57 time=14.320 ms
64 bytes from 162.159.200.1: seq=2 ttl=57 time=17.399 ms
64 bytes from 162.159.200.1: seq=3 ttl=57 time=14.444 ms

--- time.cloudflare.com ping statistics ---
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max = 14.320/17.242/22.807 ms
 
Looks like I'm back in action! Thank you @Martinski !!

Literally right before you replied, I tried these steps thinking I would start with a clean slate:
  1. Uninstall ntpmerlin
  2. rm opt/bin/chronyc
  3. rm /opt/sbin/chronyd
  4. Reinstall ntpmerlin
That didn't work because apparently I needed to remove some more dependencies. For my education, how could I have found out to remove these: chrony chrony-nts libgmp libnettle libgnutls ?
 
Looks like I'm back in action! Thank you @Martinski !!
OK, that's good. So it was a problem with having some old "incompatible" libraries.

...
That didn't work because apparently I needed to remove some more dependencies. For my education, how could I have found out to remove these: chrony chrony-nts libgmp libnettle libgnutls ?
The "chrony" packages are what ntpMerlin installs. For the library dependencies, it's a combination of using the following command plus some good, old-fashioned intuition.;)
Bash:
ldd /opt/sbin/chronyd
chronyd_LibsDependencies.jpg
 

Similar threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!

Staff online

Back
Top