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!

yeah I am getting graphs, I just wasn't sure what to put in the NTP server box in Administration - System as I had a UK NTP server IP in already.
NTP client
  • comes out of the box with Asus firmware
  • NTP server is configured at Administration > System > Basic Config
  • Starts fairly early at boot which is good because routers do not have hardware clocks to keep time when offline (always May 5 1:05 AM)
  • Sets nvram variable ntp_ready to 1 after synchronization
  • Multiple softwares wait in a loop for ntp_ready to become 1 before starting
  • If ntpMerlin is installed, will run for less than a minute before being stopped
NTP server (ntpMerlin)
  • NTP servers are configured in /jffs/configs/ntp.conf.
  • NTP server at Administration > System > Basic Config is ignored
  • Default config uses DNS geolocated pool.ntp.org servers but you can use country specific pools such as us.pool.ntp.org or uk.pool.ntp.org
 
No, your defaults NTP servers should be left as is (it can be used right out of the 'box'). :)

If I'm understanding correctly, you're just notifying users to check that their preferred NTP servers are being used? If so, that is great. Please don't change anything for me (I will learn to read it as meant).

Thank you for your reply!

NTP client
  • comes out of the box with Asus firmware
  • NTP server is configured at Administration > System > Basic Config
  • Starts fairly early at boot which is good because routers do not have hardware clocks to keep time when offline (always May 5 1:05 AM)
  • Sets nvram variable ntp_ready to 1 after synchronization
  • Multiple softwares wait in a loop for ntp_ready to become 1 before starting
  • If ntpMerlin is installed, will run for less than a minute before being stopped
NTP server (ntpMerlin)
  • NTP servers are configured in /jffs/configs/ntp.conf.
  • NTP server at Administration > System > Basic Config is ignored
  • Default config uses DNS geolocated pool.ntp.org servers but you can use country specific pools such as us.pool.ntp.org or uk.pool.ntp.org
Exactly, my jitter and drift were all over the graph using the international pool NTP servers configured in the initial setup. I switched to using four x.us.pool.ntp.org (0-3) and they settled down dramatically,
 
Exactly, my jitter and drift were all over the graph using the international pool NTP servers configured in the initial setup. I switched to using four x.us.pool.ntp.org (0-3) and they settled down dramatically,
Lately from pool.ntp.org I have been getting NTP servers from the eastern hemisphere. So instead I am going to try the North American pool with the pool directive as a backup to a GPS connected NTP server on my LAN.
Code:
server 192.168.50.200 iburst minpoll 4 maxpoll 4
pool north-america.pool.ntp.org
If I was using just the pool
Code:
pool north-america.pool.ntp.org iburst
By default NTP server will gradually increase the gap between polls of its servers to maxpoll 10 which is two to the tenth power or 1024 seconds. If your clock drifts too much between polls you could lower maxpoll but do not go lower than maxpoll 6 unless it is your own NTP server.
 
NTP client
  • comes out of the box with Asus firmware
  • NTP server is configured at Administration > System > Basic Config
  • Starts fairly early at boot which is good because routers do not have hardware clocks to keep time when offline (always May 5 1:05 AM)
  • Sets nvram variable ntp_ready to 1 after synchronization
  • Multiple softwares wait in a loop for ntp_ready to become 1 before starting
  • If ntpMerlin is installed, will run for less than a minute before being stopped
NTP server (ntpMerlin)
  • NTP servers are configured in /jffs/configs/ntp.conf.
  • NTP server at Administration > System > Basic Config is ignored
  • Default config uses DNS geolocated pool.ntp.org servers but you can use country specific pools such as us.pool.ntp.org or uk.pool.ntp.org
Brilliant, that answers it perfectly. Thanks.

I assume directing all NTP traffic to NTP Merlin negates the need to edit the connected computers NTP settings to the router, ie leaving them on the time.windows.com will be ignored and the router used?
 
Last edited:
Brilliant, that answers it perfectly. Thanks.

I assume directing all NTP traffic to NTP Merlin negates the need to edit the connected computers NTP settings to the router, ie leaving them on the time.windows.com will be ignored and the router used?

Yes that’s how it is working for me. Zero configuration on the devices themselves, which is ideal if the devices are roaming outside the LAN (eg phones or laptops).
 
I keep getting the following error whenever I reboot from the GUI. If I reboot from the button on the back of the router then everything boots fine.


Mar 31 09:37:31 Skynet: [*] NTP Failed To Start After 5 Minutes - Please Fix Immediately!
Mar 31 09:37:31 adaptive QOS: Applying - Iptable Down Rules
Mar 31 09:37:31 adaptive QOS: Applying - Iptable Up Rules (eth0)
Mar 31 09:37:31 adaptive QOS: TC Modification Delayed Start (5min)
Mar 31 09:37:32 kernel: EXT4-fs (sdb1): error count since last fsck: 71
Mar 31 09:37:32 kernel: EXT4-fs (sdb1): initial error at time 1553711447: htree_dirblock_to_tree:1000: inode 4980737: block 19931168
Mar 31 09:37:32 kernel: EXT4-fs (sdb1): last error at time 1553982724: htree_dirblock_to_tree:1000: inode 4980737: block 19931168
Mar 31 09:37:53 Skynet: [*] NTP Failed To Start After 5 Minutes - Please Fix Immediately!
Mar 31 09:37:53 adaptive QOS: Delayed Start Canceled
Mar 31 09:37:53 adaptive QOS: Applying - Iptable Down Rules
Mar 31 09:37:53 adaptive QOS: Applying - Iptable Up Rules (eth0)
Mar 31 09:37:53 adaptive QOS: TC Modification Delayed Start (5min)
Mar 31 09:37:56 kernel: DROP IN=eth0 OUT= MAC=0c:9d:92:01:ef:18:44:2b:03:d7:23:00:08:00 SRC=195.231.8.124 DST=8.17.126.76 LEN=40 TOS=0x00 PREC=0x00 TTL=238 ID=54321 PROTO=TCP SPT=40756 DPT=55555 SEQ=3098498289 ACK=0 WINDOW=65535 RES=0x00 SYN URGP=0 MARK=0x8000000
Mar 31 09:39:12 kernel: nf_conntrack: automatic helper assignment is deprecated and it will be removed soon. Use the iptables CT target to attach helpers instead.
Mar 31 09:39:12 kernel: DROP IN=eth0 OUT= MAC=0c:9d:92:01:ef:18:44:2b:03:d7:23:00:08:00 SRC=77.247.109.74 DST=8.17.126.76 LEN=444 TOS=0x00 PREC=0x00 TTL=46 ID=3438 DF PROTO=UDP SPT=5062 DPT=5060 LEN=424 MARK=0x8000000
Mar 31 09:39:16 rc_service: udhcpc 1397:notify_rc start_vpnclient2
 
Last edited:
I keep getting the following error whenever I reboot from the GUI. If I reboot from the button on the back of the router then everything boots fine.


Mar 31 09:37:31 Skynet: [*] NTP Failed To Start After 5 Minutes - Please Fix Immediately!
Mar 31 09:37:31 adaptive QOS: Applying - Iptable Down Rules
Mar 31 09:37:31 adaptive QOS: Applying - Iptable Up Rules (eth0)
Mar 31 09:37:31 adaptive QOS: TC Modification Delayed Start (5min)
Mar 31 09:37:32 kernel: EXT4-fs (sdb1): error count since last fsck: 71
Mar 31 09:37:32 kernel: EXT4-fs (sdb1): initial error at time 1553711447: htree_dirblock_to_tree:1000: inode 4980737: block 19931168
Mar 31 09:37:32 kernel: EXT4-fs (sdb1): last error at time 1553982724: htree_dirblock_to_tree:1000: inode 4980737: block 19931168
Mar 31 09:37:53 Skynet: [*] NTP Failed To Start After 5 Minutes - Please Fix Immediately!
Mar 31 09:37:53 adaptive QOS: Delayed Start Canceled
Mar 31 09:37:53 adaptive QOS: Applying - Iptable Down Rules
Mar 31 09:37:53 adaptive QOS: Applying - Iptable Up Rules (eth0)
Mar 31 09:37:53 adaptive QOS: TC Modification Delayed Start (5min)
Mar 31 09:37:56 kernel: DROP IN=eth0 OUT= MAC=0c:9d:92:01:ef:18:44:2b:03:d7:23:00:08:00 SRC=195.231.8.124 DST=8.17.126.76 LEN=40 TOS=0x00 PREC=0x00 TTL=238 ID=54321 PROTO=TCP SPT=40756 DPT=55555 SEQ=3098498289 ACK=0 WINDOW=65535 RES=0x00 SYN URGP=0 MARK=0x8000000
Mar 31 09:39:12 kernel: nf_conntrack: automatic helper assignment is deprecated and it will be removed soon. Use the iptables CT target to attach helpers instead.
Mar 31 09:39:12 kernel: DROP IN=eth0 OUT= MAC=0c:9d:92:01:ef:18:44:2b:03:d7:23:00:08:00 SRC=77.247.109.74 DST=8.17.126.76 LEN=444 TOS=0x00 PREC=0x00 TTL=46 ID=3438 DF PROTO=UDP SPT=5062 DPT=5060 LEN=424 MARK=0x8000000
Mar 31 09:39:16 rc_service: udhcpc 1397:notify_rc start_vpnclient2
Question: Based upon my post above (#101), which NTP is Skynet waiting for, client or ntpMerlin?
 
Question: Based upon my post above (#101), which NTP is Skynet waiting for, client or ntpMerlin?
I noticed it happening with ntpmerlin first then I reinstalled it and tried it with client. And still the same results. Thank you for the reply.
 
I noticed it happening with ntpmerlin first then I reinstalled it and tried it with client. And still the same results. Thank you for the reply.
i had the same thing happen, i ended up uninstalling both, and then installing ntpmerlin then skynet.
skynet is waiting for the ntp server to sync the clock. its waiting for the default one that doesn't get deleted (its not supposed to)
 
I noticed it happening with ntpmerlin first then I reinstalled it and tried it with client. And still the same results. Thank you for the reply.
  • So Skynet waits for nvram variable ntp_ready to be set to 1
  • The ntp client sets ntp_ready to 1 at sync
  • The ntp server (ntpMerlin) does not touch ntp_ready
  • If ntp client does not synchronize in five minutes, then something is wrong
  1. Ntp client is not configured properly in the web gui
  2. ntpMerlin is starting before ntp client can sync
  3. Internet is not available when ntp client is trying to sync (openvpn router client?)
 
  • So Skynet waits for nvram variable ntp_ready to be set to 1
  • The ntp client sets ntp_ready to 1 at sync
  • The ntp server (ntpMerlin) does not touch ntp_ready
  • If ntp client does not synchronize in five minutes, then something is wrong
  1. Ntp client is not configured properly in the web gui
  2. ntpMerlin is starting before ntp client can sync
  3. Internet is not available when ntp client is trying to sync (openvpn router client?)
Maybe we can customise S77ntpd to wait for ntp to be synced? Problem is, I think services are loaded synchronously. However, if the S number (e.g 77) signifies load order, we might be ok
 
amtm 1.9 now includes support for ntpMerlin!
I just installed 1.9 and ran ntpMerlin, but I got this error.


Configuring rrdtool.
Checking ntpd... dead.
Starting ntpd... failed.
ntpq: error while loading shared libraries: libcrypto.so.1.1: cannot open shared object file: No such file or directory

Where can I get that library? I did not get that error when I previously installed ntpMerlin.
 
Maybe we can customise S77ntpd to wait for ntp to be synced? Problem is, I think services are loaded synchronously. However, if the S number (e.g 77) signifies load order, we might be ok
  • Although it is a possibility that ntpMerlin is starting before ntp client can synchronize, we do not have a confirmed case yet
  • On my router ntpMerlin starts four seconds after ntp client. ntpMerlin has never stopped ntp client before sync.
  • In @Billy Chaney 's case, ntp client has not synchronized after five minutes. I suspect that his ntp client had not been working before ntpMerlin was first installed
 
I just installed 1.9 and ran ntpMerlin, but I got this error.


Configuring rrdtool.
Checking ntpd... dead.
Starting ntpd... failed.
ntpq: error while loading shared libraries: libcrypto.so.1.1: cannot open shared object file: No such file or directory

Where can I get that library? I did not get that error when I previously installed ntpMerlin.
Entware needs to be updated.
 
Maybe we can customise S77ntpd to wait for ntp to be synced? Problem is, I think services are loaded synchronously. However, if the S number (e.g 77) signifies load order, we might be ok
On the other hand, I suppose it would take ntpMerlin out of the list of possibilities and to focus users on fixing ntp client. :)

It just seems like every new software or software version presents a lot of these types of posts:
  • Since the upgrade my cat pees on my head overnight
  • Are there any logs I should provide?
  • If you ask a direct question, I respond sideways to another topic
  • I never respond and ask it again in another thread
  • I ended up going back to the old version
  • The cat stopped peeing on my head
  • Impatiently waiting for this cat problem to be fixed in the new version
 
  • Although it is a possibility that ntpMerlin is starting before ntp client can synchronize, we do not have a confirmed case yet
  • On my router ntpMerlin starts four seconds after ntp client. ntpMerlin has never stopped ntp client before sync.
  • In @Billy Chaney 's case, ntp client has not synchronized after five minutes. I suspect that his ntp client had not been working before ntpMerlin was first installed
How can I fix my ntp client? I keep getting this error also and have been for some time now.

Mar 31 11:09:47 crond[1110]: time disparity of 475804 minutes detected
 
Entware needs to be updated.
Hmmm, I just it yesterday. In doing it again, I no longer got that error, but got this instead.


Configuring rrdtool.
Checking ntpd... dead.
Starting ntpd... done.

Do I need to do anything about the "dead" line, or is all OK now that ntpd is "done"?

The logs say:

Mar 31 09:30:49 admin: Started ntpd from .
 
Hmmm, I just it yesterday. In doing it again, I no longer got that error, but got this instead.


Configuring rrdtool.
Checking ntpd... dead.
Starting ntpd... done.

Do I need to do anything about the "dead" line, or is all OK now that ntpd is "done"?

The logs say:

Mar 31 09:30:49 admin: Started ntpd from .

That now looks normal. You should be okay now. ;)
 
Smooth install on both AC86U and AC68U via amtm. Redirection works perfectly. No change in CPU usage. Great job guys!

@Jack Yaz after install I edited /jffs/configs/ntp.conf with my closest servers. Does ntpmerlin require restarting to apply these changes?
 

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