Solved (Fixed) RT-AX88U Merlin 386.8 ntpMerlin Breaks NTP

Ripshod

Occasional Visitor
Previous to the upgrade from 386.7_2 all my scripts were working fine. Since I upgraded NTP updates are not happening. I've tried a dirty flash, a clean flash after a nuclear reset then ran all day today with several reboots without ntpMerlin and everything was sweet. As soon as I add ntpMerlin and reboot NTP fails.

Untitled.png


In the logs I have this repeated:
May 5 06:12:44 timeserverd: Waiting for NTP to sync...
May 5 06:12:45 connmon: Waiting for NTP to sync...
May 5 06:12:45 ntpMerlin: Waiting for NTP to sync...
May 5 06:12:45 uiDivStats: Waiting for NTP to sync...
May 5 06:12:45 spdMerlin: Waiting for NTP to sync...

Then later
May 5 06:15:25 taildns: NTP failed to sync after 10 minutes - please check immediately!

Obviously the date and time are wrong due to the ntp error

It's stopping all the UI elements loading so all I get is the bog standard. amtm works but nothing will run due to the lock file. You thoughts?
 

EmeraldDeer

Very Senior Member
What happens if you add this line to the configuration?
Code:
server 162.159.200.123 iburst
 

Ripshod

Occasional Visitor
What happens if you add this line to the configuration?
Code:
server 162.159.200.123 iburst
Makes no difference.
I have found that if I reactivate the timeserver in the router's system settings ntp is synced and everything completes the loading. Unfortunately after that ntpMerlin disables it again.
so ntpMerlin wants to be the time server for my network but none of the scripts (including ntpMerlin) will run until the router is synced. Catch 22.
 

EmeraldDeer

Very Senior Member
Are you using chrony or NTP? Here is my chrony.conf:
Code:
# grep -Ev "^#|^%|^!|^;" /tmp/mnt/ent/entware/share/ntpmerlin.d/chrony.conf | sort -u

allow 192.168.50.0/24
bindaddress 192.168.50.1
binddevice br0
driftfile /opt/var/lib/chrony/drift
dumpdir /opt/var/lib/chrony
dumponexit
lock_all
logchange 0.1
makestep 0.1 3
ntsdumpdir /opt/var/lib/chrony
pidfile /opt/var/run/chrony/chronyd.pid
pool time.apple.com maxsources 6
pool time.cloudflare.com nts
server 192.168.50.230 minpoll -6 maxpoll 6 polltarget 30 filter 15 maxdelaydevratio 2
server ohio.time.system76.com nts
server virginia.time.system76.com nts
Change the entware directory to match yours.
 

Ripshod

Occasional Visitor
Code:
grep -Ev "^#|^%|^!|^;" /tmp/mnt/asus/entware/share/ntpmerlin.d/chrony.conf | sort -u

allow 10.0.0.0/8
allow 172.16.0.0/12
allow 192.168.0.0/16
driftfile /opt/var/lib/chrony/drift
dumpdir /opt/var/lib/chrony
dumponexit
local stratum 10
lock_all
logchange 0.5
maxupdateskew 5
pidfile /opt/var/run/chrony/chronyd.pid
pool pool.ntp.org iburst
ratelimit interval 3 burst 8
 

EmeraldDeer

Very Senior Member
Your config if fine. It is the default, so not surprising. So the culprit is likely that the DNS lookup of pool.ntp.org is not working. But if that were true, then adding the line I suggested above should have worked.
 

Ripshod

Occasional Visitor
Just to update before bed.
I went into the router's system tab and I clicked on 'apply' without changing anything there and the router synced. This is without the router's default ntp server active.
I'm not sure if this is more about merlin than ntpMerlin.
Gonna roll back the firmware.

*edit*

Merlin 386.7_2 loaded and ntpd is behaving as it should at boot
Code:
ov 16 23:34:50 ntpd[11340]: Command line: ntpd -c /opt/share/ntpmerlin.d/ntp.conf -g
Nov 16 23:34:50 ntpd[11340]: ----------------------------------------------------
Nov 16 23:34:50 ntpd[11340]: ntp-4 is maintained by Network Time Foundation,
Nov 16 23:34:50 ntpd[11340]: Inc. (NTF), a non-profit 501(c)(3) public-benefit
Nov 16 23:34:50 ntpd[11340]: corporation.  Support and training for ntp-4 are
Nov 16 23:34:50 ntpd[11340]: available at https://www.nwtime.org/support
Nov 16 23:34:50 ntpd[11340]: ----------------------------------------------------
Nov 16 23:34:50 ntpd[11343]: proto: precision = 0.260 usec (-22)
Nov 16 23:34:50 ntpd[11343]: basedate set to 2022-07-15
Nov 16 23:34:50 ntpd[11343]: gps base set to 2022-07-17 (week 2219)
Nov 16 23:34:50 ntpd[11343]: switching logging to file /opt/var/spool/ntp/ntp.log
 
Last edited:

heysoundude

Part of the Furniture
Eventhough he doesn't hang out here much anymore, you could also tag the dev @Jack Yaz so that he'll see if/when he checks back in and may have a suggestion to offer.

(I'm saddened that some of his work may end up obsoleted...but I do have hope someone may pick up the torch where he's left it: his code is all on GitHub, so that someone could stand on his shoulders and look towards the horizon)
 

Ripshod

Occasional Visitor
It seems it was an issue with Merlin 386.8.
Flashed back to 386.7_2 - fixed​
Flashed to 386.8 - error​
Flashed to 388.1 beta 2 - fixed.​

Really surprised this hasn't been seen before now :cool:
 

Latest threads

Sign Up For SNBForums Daily Digest

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