What's new

ntpMerlin ntpMerlin - NTP Daemon for AsusWRT Merlin

  • 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!

Probably worth asking Merlin if the nvram variable is still used
It appears that they are still using nvram variable ntp_ready in alpha 11 firmware ntpd.
https://github.com/RMerl/asuswrt-merlin.ng/search?q=ntp_ready&unscoped_q=ntp_ready

I had to back out of alpha 11, but I did notice that the firmware ntpd was disabled by default. I have ntpMerlin. And I noticed that Stubby worked automatically for me which suggests that the old ntp client had set ntp_ready to 1.

Therefore, you need to get the old ntp client to work for ntp_ready to be set to 1 and for ntpMerlin to start.
 
How long does the "Local Service Cookie" number last, renew, reset?
 
I'm not sure what that is?

I'll need to reboot to provide an example but it says to the effect "local server setup is complete" and I noticed a new assigned number after the change to v1.2.4 and a reboot. It had been starting with a 2 now starts with 15xxxxxxxx.

Server startup complete. Host name is RT-AC68U-xxxx.local. Local service cookie is 15xxxxxxxx.

It appears that the number rolled again on reboot.
 
Last edited:
I'll need to reboot to provide an example but it says to the effect "local server setup is complete" and I noticed a new assigned number after the change to v1.2.4 and a reboot. It had been starting with a 2 now starts with 5.
Sounds like "avahi-daemon - The Avahi mDNS/DNS-SD daemon" (Apple Bonjour) which is unrelated to NTP.
Code:
May  5 01:05:26 router avahi-daemon[2029]: Server startup complete. Host name is RT-AX88U-F098.local. Local service cookie is 745489948.
May  5 01:05:28 router avahi-daemon[2122]: Server startup complete. Host name is RT-AX88U-F098.local. Local service cookie is 155031784.
Apr 15 13:30:01 router avahi-daemon[6117]: Server startup complete. Host name is RT-AX88U-F098.local. Local service cookie is 1796495778.
Apr 15 13:30:02 router avahi-daemon[6770]: Server startup complete. Host name is RT-AX88U-F098.local. Local service cookie is 721754832.
Apr 15 13:30:03 router avahi-daemon[6863]: Server startup complete. Host name is RT-AX88U-F098.local. Local service cookie is 1413474116.
Apr 15 14:58:17 router avahi-daemon[31627]: Server startup complete. Host name is RT-AX88U-F098.local. Local service cookie is 4076499128.
Apr 15 15:00:45 router avahi-daemon[2278]: Server startup complete. Host name is RT-AX88U-F098.local. Local service cookie is 1489920291.
Apr 15 15:00:49 router avahi-daemon[3091]: Server startup complete. Host name is RT-AX88U-F098.local. Local service cookie is 3836870812.
Apr 15 15:00:50 router avahi-daemon[3182]: Server startup complete. Host name is RT-AX88U-F098.local. Local service cookie is 35365146.
 
Thank you.
I never noticed this before ntp was installed. Previously, on boot, the log would report:

Apr 16 17:18:33 iTunes: daemon is stopped
Apr 16 17:18:33 FTP_Server: daemon is stopped
Apr 16 17:18:33 Samba_Server: smb daemon is stopped
Apr 16 17:18:33 kernel: gro disabled
Apr 16 17:18:34 avahi-daemon[275]: Got SIGTERM, quitting.
Apr 16 17:18:34 avahi-daemon[275]: Leaving mDNS multicast group on interface br0.IPv4 with address 192.168.1.1.
Apr 16 17:18:34 avahi-daemon[275]: Leaving mDNS multicast group on interface lo.IPv4 with address 127.0.0.1.
Apr 16 17:18:34 avahi-daemon[275]: avahi-daemon 0.7 exiting.
Apr 16 17:18:34 Timemachine: daemon is stopped
Apr 16 17:18:34 miniupnpd[782]: shutting down MiniUPnPd


I never noticed any completion or assignment of a cookie and number. And this is very near the tail end of the boot sequence.
 
Last edited:
Can you check if custom_state.js exists in JFFS?

Yes in scripts

admin@r1:/jffs/scripts# ls -al custom_state.js
-rw-r--r-- 1 admin root 94616 Apr 14 10:41 custom_state.js​
 

I believe that your router is far from a good/known state. I would recommend a reset to factory defaults with a minimal and manual configuration to secure the router and connect to your ISP.

It probably wouldn't hurt to also format your USB drive (after a backup of the contents, if you wish) and do a full amtm format and swap file and Diversion/Entware from scratch too.

This would have been faster than the amount of time you've spent trying to get this to work so far?
 
This would have been faster than the amount of time you've spent trying to get this to work so far?
The time I spent on this is still way less than configuring the router from scratch.

I probably need to do that at some point, but for now I think it's worthwhile to see whether an upgrade is possible without that.
 
are there any special instructions when using this on conjunction with new alpha builds new ntp server support?
 
are there any special instructions when using this on conjunction with new alpha builds new ntp server support?

No, everything works as before. :)
 
The time I spent on this is still way less than configuring the router from scratch.

I probably need to do that at some point, but for now I think it's worthwhile to see whether an upgrade is possible without that.

Your call, of course. :)

But a full re-install is about a half-hour to an hour 'job'. With a guaranteed outcome. ;)
 
Minimize or eliminate dependence on DNS for WAN to come online and NTP client to sync
  • Network Monitoring
    • Instead of "DNS Query" use ping to an IP address such as 1.1.1.1 or first hop ISP router
  • NTP client
    • Use an IP address or ensure entry in /jffs/configs/dnsmasq.conf.add such as server=/pool.ntp.org/1.1.1.1 matches NTP server entry in router GUI
  • I would not know what to tell you if router VPN client is a complicating factor
 
No, everything works as before. :)

so should one also have the ntp server on the web gui turned on as well or turned off and should one use two ntp addresses in gui or just one
 
so should one also have the ntp server on the web gui turned on as well or turned off and should one use two ntp addresses in gui or just one

If using the ntpMerlin script, as I do: Never touched that past the defaults. So, 'off' and 'at least one', but if two are present, leave as-is. :)
 
  • Network Monitoring
    • Instead of "DNS Query" use ping to an IP address such as 1.1.1.1 or first hop ISP router
  • NTP client
    • Use an IP address or ensure entry in /jffs/configs/dnsmasq.conf.add such as server=/pool.ntp.org/1.1.1.1 matches NTP server entry in router GUI
  • both DNS Query and Ping are disabled (not checked) for Network Monitoring
  • that line is already present in the config file
Still ntpMerlin does not start because ntp_ready remains 0 (does not become 1), with 384.11 Alpha 2/3 on my RT-AC86U.
 
  • both DNS Query and Ping are disabled (not checked) for Network Monitoring
  • that line is already present in the config file
Still ntpMerlin does not start because ntp_ready remains 0 (does not become 1), with 384.11 Alpha 2/3 on my RT-AC86U.

You will either need to uninstall, reboot the router, wait 10 minutes or more and then re-install the ntpMerlin script or you will need to fully reset your router to factory defaults. Seems like you're the only one with this issue, correct?

If the uninstall/reboot/re-install routine doesn't work; it's your router setup that is awry. ;)
 

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!
Top