What's new

ntpMerlin AGH is breaking ntpmerlin

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

RandoBrando

New Around Here
Recently I installed AGH to block ads for my network (ax88u). Since installing AGH Ntpmerlin has been outputting weird errors in the system log. Ntpmerlin works fine without AGH installed. Both are running stock settings except the custom ntp and DNS servers I chose. If anyone has encountered this issue or knows of a fix, any insight would be appreciated.

Dec 23 16:39:05 chronyd[907808]: Can't synchronise: no majority
Dec 23 16:39:05 chronyd[907808]: Selected source 17.253.16.253 (time.apple.com)
Dec 23 16:39:33 chronyd[907808]: Selected source 17.253.4.125 (time.apple.com)
Dec 23 16:40:09 chronyd[907808]: Can't synchronise: no majority
Dec 23 16:40:10 chronyd[907808]: Selected source 17.253.16.253 (time.apple.com)
Dec 23 16:40:38 chronyd[907808]: Selected source 17.253.4.125 (time.apple.com)
Dec 23 16:41:14 chronyd[907808]: Can't synchronise: no majority
Dec 23 16:41:16 chronyd[907808]: Selected source 17.253.4.125 (time.apple.com)
Dec 23 16:42:19 chronyd[907808]: Can't synchronise: no majority
Dec 23 16:42:20 chronyd[907808]: Selected source 17.253.4.253 (time.apple.com)
Dec 23 16:42:48 chronyd[907808]: Selected source 17.253.4.125 (time.apple.com)
Dec 23 16:43:23 chronyd[907808]: Can't synchronise: no majority
Dec 23 16:43:25 chronyd[907808]: Selected source 17.253.4.253 (time.apple.com)
 

Attachments

  • syslog (2).txt
    965 bytes · Views: 43
Have you updated Entware? There is a recent update
 
Everything is up to date.

chronyc tracking:

Reference ID : 11FD10FD (usscz2-ntp-002.aaplimg.com)
Stratum : 2
Ref time (UTC) : Sat Dec 24 01:23:13 2022
System time : 0.031510204 seconds slow of NTP time
Last offset : -0.192251936 seconds
RMS offset : 0.148851186 seconds
Frequency : 17.058 ppm slow
Residual freq : -2641.260 ppm
Skew : 1.803 ppm
Root delay : 0.010438765 seconds
Root dispersion : 0.124731719 seconds
Update interval : 62.0 seconds
Leap status : Normal

Chronyc sources:

MS Name/IP address Stratum Poll Reach LastRx Last sample
===============================================================================
^- time.cloudflare.com 3 6 377 9 +5101us[ -165ms] +/- 22ms
^- time.cloudflare.com 3 6 377 8 +5971us[ -164ms] +/- 21ms
^- uslax1-ntp-002.aaplimg.c> 1 6 377 6 +4806us[+4806us] +/- 11ms
^* usscz2-ntp-002.aaplimg.c> 1 6 377 11 +5756us[ -165ms] +/- 5069us
^x usscz2-ntp-001.aaplimg.c> 1 6 377 42 +4904us[ -166ms] +/- 5954us
^- ussjc2-ntp-001.aaplimg.c> 1 6 377 5 +4717us[+4717us] +/- 7676us
^? time4.google.com 1 6 377 3 +4582us[+4582us] +/- 25ms
^+ time1.google.com 1 6 377 8 +5736us[ -165ms] +/- 12ms
^? time2.google.com 1 6 377 7 +5455us[+5455us] +/- 24ms
^? time3.google.com 1 6 377 13 +6518us[ -164ms] +/- 14ms
 
What make you think it is AGH that breaks it? Did you uninstall AGH and the issue go away?
I have the same ntp behavior since July and I thought it was cause by degraded hardware.
 
What make you think it is AGH that breaks it? Did you uninstall AGH and the issue go away?
I have the same ntp behavior since July and I thought it was cause by degraded hardware.
Uninstalling AGH fixes the issue. As soon as I install AGH those messages start popping up in the system log.
 
Uninstalling AGH fixes the issue. As soon as I install AGH those messages start popping up in the system log.
Interesting findings. It never cross my mind that this could cause by AGH. I will find time uninstall AGH and try to reproduce this behavior.

I first noticed this issue when the clock offset starts to fluctuate by hundreds of ms.
 
Found some trace when the issue start appear. Seems like after update to v0.108.0-b.9

Code:
Jul  1 17:04:26 RT-AC86U-DBA8 S99AdGuardHome[415560]: Started AdGuardHome from S99AdGuardHome[415560].
Jul  1 17:04:27 RT-AC86U-DBA8 S99AdGuardHome[415560]: start_adguardhome took 11 second(s) to complete.
Jul  1 17:04:27 RT-AC86U-DBA8 AdGuardHome[416955]: 2022/07/01 17:04:27.376203 [info] AdGuard Home, version v0.108.0-b.9
Jul  1 17:04:27 RT-AC86U-DBA8 AdGuardHome[416955]: 2022/07/01 17:04:27.376312 [info] AdGuard Home is running as a service
…snipped…
Jul  1 17:04:37 RT-AC86U-DBA8 AdGuardHome[416955]: 2022/07/01 17:04:37.663821 [info] Entering the tcp listener loop on [::]:53
Jul  1 17:04:37 RT-AC86U-DBA8 AdGuardHome[416955]: 2022/07/01 17:04:37.664787 [info] Entering the UDP listener loop on [::]:53
Jul  1 17:04:38 RT-AC86U-DBA8 chronyd[7228]: Can't synchronise: no majority
Jul  1 17:04:38 RT-AC86U-DBA8 chronyd[7228]: Can't synchronise: no majority
Jul  1 17:09:38 RT-AC86U-DBA8 chronyd[7228]: Can't synchronise: no majority
Jul  1 17:14:36 RT-AC86U-DBA8 chronyd[7228]: Can't synchronise: no majority
Jul  1 17:19:40 RT-AC86U-DBA8 chronyd[7228]: Can't synchronise: no majority

Update: I have updated to v0.108.0-b.9 back in June 6. May not be this release issue.

Code:
Jun  1 16:42:05 RT-AC86U-DBA8 AdGuardHome[11521]: 2022/06/01 16:42:05.914179 [info] AdGuard Home, version v0.108.0-b.8
Jun  6 17:24:25 RT-AC86U-DBA8 AdGuardHome[31649]: 2022/06/06 17:24:25.122971 [info] AdGuard Home, version v0.108.0-b.9

Further trace found I updated to AdGuardHome.sh version 1.5.6 in July 1. I will try if I can run 1.5.5 and see if the issue goes away.
 
Last edited:
You can also see if installing adguardhome without using adguardhome as the local (router) resolver helps. There is an option to install agh without local caching resolver. Basically network clients will use adguardhome, however router services will use wan dns servers.

Another option is to tell your agh instance to use plaintext dns resolution for resolving ntpserver hostnames. It could actually be the use of encrypted dns servers causing the breakage.

Example of what this looks like on your adguardhome upstream instance. ( I think the syntax is right):

[/ntp.server.hostname/]1.1.1.1
 
Everything is up to date.

chronyc tracking:

Reference ID : 11FD10FD (usscz2-ntp-002.aaplimg.com)
Stratum : 2
Ref time (UTC) : Sat Dec 24 01:23:13 2022
System time : 0.031510204 seconds slow of NTP time
Last offset : -0.192251936 seconds
RMS offset : 0.148851186 seconds
Frequency : 17.058 ppm slow
Residual freq : -2641.260 ppm
Skew : 1.803 ppm
Root delay : 0.010438765 seconds
Root dispersion : 0.124731719 seconds
Update interval : 62.0 seconds
Leap status : Normal

Chronyc sources:

MS Name/IP address Stratum Poll Reach LastRx Last sample
===============================================================================
^- time.cloudflare.com 3 6 377 9 +5101us[ -165ms] +/- 22ms
^- time.cloudflare.com 3 6 377 8 +5971us[ -164ms] +/- 21ms
^- uslax1-ntp-002.aaplimg.c> 1 6 377 6 +4806us[+4806us] +/- 11ms
^* usscz2-ntp-002.aaplimg.c> 1 6 377 11 +5756us[ -165ms] +/- 5069us
^x usscz2-ntp-001.aaplimg.c> 1 6 377 42 +4904us[ -166ms] +/- 5954us
^- ussjc2-ntp-001.aaplimg.c> 1 6 377 5 +4717us[+4717us] +/- 7676us
^? time4.google.com 1 6 377 3 +4582us[+4582us] +/- 25ms
^+ time1.google.com 1 6 377 8 +5736us[ -165ms] +/- 12ms
^? time2.google.com 1 6 377 7 +5455us[+5455us] +/- 24ms
^? time3.google.com 1 6 377 13 +6518us[ -164ms] +/- 14ms
It doesn't help that you are mixing different types of ntp servers, for example Google smears time. Cloudflare doesn't.


You could try making a plaintext resolution exclusion for your ntp servers in the agh dns upstream section.

Eg.

[/time1.google.com/]8.8.8.8

You would need to make exclusions for each ntp server used.

This is actually a known problem with trying to resolve ntp server hostnames via encrypted dns services. The only known solutions are to send the request via plaintext dns, or tell the routers services to use wan dns instead of using adguard home to resolve local router traffic.
 
Last edited:
Recently I installed AGH to block ads for my network (ax88u). Since installing AGH Ntpmerlin has been outputting weird errors in the system log. Ntpmerlin works fine without AGH installed. Both are running stock settings except the custom ntp and DNS servers I chose. If anyone has encountered this issue or knows of a fix, any insight would be appreciated.

Dec 23 16:39:05 chronyd[907808]: Can't synchronise: no majority
Dec 23 16:39:05 chronyd[907808]: Selected source 17.253.16.253 (time.apple.com)
Dec 23 16:39:33 chronyd[907808]: Selected source 17.253.4.125 (time.apple.com)
Dec 23 16:40:09 chronyd[907808]: Can't synchronise: no majority
Dec 23 16:40:10 chronyd[907808]: Selected source 17.253.16.253 (time.apple.com)
Dec 23 16:40:38 chronyd[907808]: Selected source 17.253.4.125 (time.apple.com)
Dec 23 16:41:14 chronyd[907808]: Can't synchronise: no majority
Dec 23 16:41:16 chronyd[907808]: Selected source 17.253.4.125 (time.apple.com)
Dec 23 16:42:19 chronyd[907808]: Can't synchronise: no majority
Dec 23 16:42:20 chronyd[907808]: Selected source 17.253.4.253 (time.apple.com)
Dec 23 16:42:48 chronyd[907808]: Selected source 17.253.4.125 (time.apple.com)
Dec 23 16:43:23 chronyd[907808]: Can't synchronise: no majority
Dec 23 16:43:25 chronyd[907808]: Selected source 17.253.4.253 (time.apple.com)
Here is something they even recommend on openwrt when using encrypted dns with adguardhome.

It seems it is a known problem.

 
Last edited:
Here is something they even recommend on openwrt when using encrypted dns with adguardhome.

It seems it is a know problem.

Also a good suggestion and practice when using adblockers is to also allowlist/whitelist you ntpserver hostnames as well. So with adguardhome, a good practice would be to allow list those servers as well incase one of the blocking filters is ignorant to the fact they are blocking ntp server hostnames.
 
Recently I installed AGH to block ads for my network (ax88u). Since installing AGH Ntpmerlin has been outputting weird errors in the system log. Ntpmerlin works fine without AGH installed. Both are running stock settings except the custom ntp and DNS servers I chose. If anyone has encountered this issue or knows of a fix, any insight would be appreciated.

Dec 23 16:39:05 chronyd[907808]: Can't synchronise: no majority
Dec 23 16:39:05 chronyd[907808]: Selected source 17.253.16.253 (time.apple.com)
Dec 23 16:39:33 chronyd[907808]: Selected source 17.253.4.125 (time.apple.com)
Dec 23 16:40:09 chronyd[907808]: Can't synchronise: no majority
Dec 23 16:40:10 chronyd[907808]: Selected source 17.253.16.253 (time.apple.com)
Dec 23 16:40:38 chronyd[907808]: Selected source 17.253.4.125 (time.apple.com)
Dec 23 16:41:14 chronyd[907808]: Can't synchronise: no majority
Dec 23 16:41:16 chronyd[907808]: Selected source 17.253.4.125 (time.apple.com)
Dec 23 16:42:19 chronyd[907808]: Can't synchronise: no majority
Dec 23 16:42:20 chronyd[907808]: Selected source 17.253.4.253 (time.apple.com)
Dec 23 16:42:48 chronyd[907808]: Selected source 17.253.4.125 (time.apple.com)
Dec 23 16:43:23 chronyd[907808]: Can't synchronise: no majority
Dec 23 16:43:25 chronyd[907808]: Selected source 17.253.4.253 (time.apple.com)
Your time.apple.com might be getting blocked by one of adguardhome filters that is known to block apple servers or services. I would recommend allowlisting it if you plan to use that server with chronyd. It is not helpful that I have seen that hostname on a few blocklist before. Also adguardhome might simply be wildcardblocking anything apple.com.
 
Last edited:
Everything is up to date.

chronyc tracking:

Reference ID : 11FD10FD (usscz2-ntp-002.aaplimg.com)
Stratum : 2
Ref time (UTC) : Sat Dec 24 01:23:13 2022
System time : 0.031510204 seconds slow of NTP time
Last offset : -0.192251936 seconds
RMS offset : 0.148851186 seconds
Frequency : 17.058 ppm slow
Residual freq : -2641.260 ppm
Skew : 1.803 ppm
Root delay : 0.010438765 seconds
Root dispersion : 0.124731719 seconds
Update interval : 62.0 seconds
Leap status : Normal

Chronyc sources:

MS Name/IP address Stratum Poll Reach LastRx Last sample
===============================================================================
^- time.cloudflare.com 3 6 377 9 +5101us[ -165ms] +/- 22ms
^- time.cloudflare.com 3 6 377 8 +5971us[ -164ms] +/- 21ms
^- uslax1-ntp-002.aaplimg.c> 1 6 377 6 +4806us[+4806us] +/- 11ms
^* usscz2-ntp-002.aaplimg.c> 1 6 377 11 +5756us[ -165ms] +/- 5069us
^x usscz2-ntp-001.aaplimg.c> 1 6 377 42 +4904us[ -166ms] +/- 5954us
^- ussjc2-ntp-001.aaplimg.c> 1 6 377 5 +4717us[+4717us] +/- 7676us
^? time4.google.com 1 6 377 3 +4582us[+4582us] +/- 25ms
^+ time1.google.com 1 6 377 8 +5736us[ -165ms] +/- 12ms
^? time2.google.com 1 6 377 7 +5455us[+5455us] +/- 24ms
^? time3.google.com 1 6 377 13 +6518us[ -164ms] +/- 14ms
See this time sync doesn't have the same errors as the other logs you posted. I notice the difference is you are not using time.apple.com with these requests.
 
It doesn't help that you are mixing different types of ntp servers, for example Google smears time. Cloudflare doesn't.


You could try making a plaintext resolution exclusion for your ntp servers in the agh dns upstream section.

Eg.

[/time1.google.com/]8.8.8.8

You would need to make exclusions for each ntp server used.

This is actually a known problem with trying to resolve ntp server hostnames via encrypted dns services. The only known solutions are to send the request via plaintext dns, or tell the routers services to use wan dns instead of using adguard home to resolve local router traffic.
I remember when I first encounter this, I added facebook and google ntp around that time. I did suspect Google may smears the time and causes it. I revert back to my initial list of NTP servers but the issue remains. I even trim it down to 3 NTP servers and toggle between chronyd and ntpd, but still it does not helps.

This is today's chronyd logs until noon (omitted Selected source entries which are too many). The clock seems drifts a lot.
Code:
admin@RT-AC86U-DBA8:/tmp/mnt/amtm/entware/var/log# chronyc sources
MS Name/IP address         Stratum Poll Reach LastRx Last sample
===============================================================================
^* ntpmon.dcs1.biz               1   6   377    20  +2331us[+2318us] +/- 7710us
^- hkhkg1-ntp-001.aaplimg.c>     1   8   377   168  +2192us[+2262us] +/-   20ms
^- twtpe2-ntp-001.aaplimg.c>     1   6   377    36  +1044us[+1031us] +/-   30ms
...
Dec 24 02:35:26 RT-AC86U-DBA8 chronyd[7709]: System clock wrong by 0.707105 seconds
Dec 24 02:50:56 RT-AC86U-DBA8 chronyd[7709]: System clock wrong by 0.545164 seconds
Dec 24 03:05:47 RT-AC86U-DBA8 chronyd[7709]: System clock wrong by 0.585915 seconds
Dec 24 05:58:08 RT-AC86U-DBA8 chronyd[7709]: System clock wrong by 0.586195 seconds
Dec 24 06:48:52 RT-AC86U-DBA8 chronyd[7709]: System clock wrong by 0.538068 seconds
Dec 24 09:36:55 RT-AC86U-DBA8 chronyd[7709]: System clock wrong by 0.992137 seconds
Dec 24 09:37:05 RT-AC86U-DBA8 chronyd[7709]: System clock wrong by -0.653087 seconds
Dec 24 10:02:34 RT-AC86U-DBA8 chronyd[7709]: System clock wrong by 0.650582 seconds
Dec 24 10:27:22 RT-AC86U-DBA8 chronyd[7709]: System clock wrong by 0.554198 seconds
Dec 24 10:32:45 RT-AC86U-DBA8 chronyd[7709]: System clock wrong by 1.059104 seconds
Dec 24 10:33:01 RT-AC86U-DBA8 chronyd[7709]: Can't synchronise: no majority
Dec 24 10:33:05 RT-AC86U-DBA8 chronyd[7709]: System clock wrong by 0.685674 seconds
Dec 24 10:33:34 RT-AC86U-DBA8 chronyd[7709]: System clock wrong by 1.494281 seconds
Dec 24 10:33:50 RT-AC86U-DBA8 chronyd[7709]: System clock wrong by -0.527230 seconds
Dec 24 10:34:07 RT-AC86U-DBA8 chronyd[7709]: System clock wrong by 0.756493 seconds
Dec 24 10:36:00 RT-AC86U-DBA8 chronyd[7709]: System clock wrong by 0.561292 seconds
Dec 24 10:36:49 RT-AC86U-DBA8 chronyd[7709]: System clock wrong by 0.713007 seconds
Dec 24 10:37:05 RT-AC86U-DBA8 chronyd[7709]: System clock wrong by 0.987401 seconds
Dec 24 10:37:37 RT-AC86U-DBA8 chronyd[7709]: System clock wrong by 0.536369 seconds
Dec 24 10:42:29 RT-AC86U-DBA8 chronyd[7709]: Can't synchronise: no majority
Dec 24 10:42:45 RT-AC86U-DBA8 chronyd[7709]: System clock wrong by 2.554066 seconds
Dec 24 10:43:01 RT-AC86U-DBA8 chronyd[7709]: System clock wrong by 0.570823 seconds
Dec 24 10:44:40 RT-AC86U-DBA8 chronyd[7709]: System clock wrong by 3.992687 seconds
Dec 24 10:45:58 RT-AC86U-DBA8 chronyd[7709]: Can't synchronise: no majority
Dec 24 10:46:15 RT-AC86U-DBA8 chronyd[7709]: Can't synchronise: no majority
Dec 24 10:52:13 RT-AC86U-DBA8 chronyd[7709]: System clock wrong by 0.659191 seconds
Dec 24 11:10:33 RT-AC86U-DBA8 chronyd[7709]: System clock wrong by 2.220000 seconds
Dec 24 11:10:49 RT-AC86U-DBA8 chronyd[7709]: System clock wrong by 0.683198 seconds
Dec 24 11:12:26 RT-AC86U-DBA8 chronyd[7709]: System clock wrong by 0.648464 seconds
Dec 24 11:41:20 RT-AC86U-DBA8 chronyd[7709]: Can't synchronise: no majority
Dec 24 11:42:08 RT-AC86U-DBA8 chronyd[7709]: System clock wrong by 3.306447 seconds
Dec 24 11:42:09 RT-AC86U-DBA8 chronyd[7709]: System clock wrong by 0.659588 seconds
Dec 24 11:42:25 RT-AC86U-DBA8 chronyd[7709]: System clock wrong by 0.904540 seconds

I thought this was due to hardware. I have now gone back to AdGuardHome.sh 1.5.5, with AdGuard Home, version v0.108.0-b.24. Will keep this running for some time and report back.

2022-12-24 19_27_12-ntpMerlin.png
 
Been stable for about 3 hours, selected source did not change. The drift graph is plotting properly. Before this a single value can stays the same for hours.

Looking good so far. Only changes is downgrade AdGuardHome.sh from 1.5.8 to 1.5.5.
Upstream remains the same, which is unbound addons.

2022-12-24 22_17_59-ntpMerlin.png
 
Been stable for about 3 hours, selected source did not change. The drift graph is plotting properly. Before this a single value can stays the same for hours.

Looking good so far. Only changes is downgrade AdGuardHome.sh from 1.5.8 to 1.5.5.
Upstream remains the same, which is unbound addons.

View attachment 46620
Can I ask how you performed the adguardhome.sh downgrade as I am having the same issue and would like to test this as a fix.
I installed adguard from amtm but dont know how to maually dowgrade the .sh file.
Thanks in advance.
 
Can I ask how you performed the adguardhome.sh downgrade as I am having the same issue and would like to test this as a fix.
I installed adguard from amtm but dont know how to maually dowgrade the .sh file.
Thanks in advance.
This is the page https://github.com/jumpsmm7/Asuswrt-Merlin-AdGuardHome-Installer/releases
Look for v1.5.5 source code. I replace the file AdGuardHome.sh in /jffs/addons/AdGuardHome.d/AdGuardHome.sh, then reboot.

Reason I try this version is because in my historical logs, I updated to 1.5.6 on 1st July. And around the same time this started.
 
I have followed chongnt suggestion and replaced the AdGuardHome.sh with the version from 1.55 and made NO other changes (Running AdGuardHome binary Version: v0.108.0-b.24) and even after just 30 minutes or so the 'Can't synchronise: no majority' log messages have gone and the DRIFT values are chaging again.
The AdGuardHome.sh would appear to be the root cause of the ntpMerlin problem when running with AdGuardHome.
Once again thanks to chongnt for spotting this connection and providing the details on how to get round the issue (I have been trying everything to fix this but until this thread never linked AGH with the problem).
 

Similar threads

Sign Up For SNBForums Daily Digest

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