What's new

NTP “Alarm Clock” Error

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

vlord

Regular Contributor
Background:
I have an RT-AC86U setup as an AP behind my GT-AX6000 router both running Merlin (386.10 and 388.2, respectively). My GT has a few AMTM items running like Diversion, Unbound, and Skynet, all of which I have disabled as part of troubleshooting. I’m also running NTP Merlin as well.

I noticed after setting up my AP, that it would never sync to an NTP server as messaged in the UI. Trying different NTP servers didn’t help, including my router. When I try from a terminal, I get an alarm clock error.

Code:
admin@RT-AC86U:/tmp/home/root# /usr/sbin/ntp -t -d -N -S /sbin/ntpd_synced -p pool.ntp.org -d -n -q
ntp: 'pool.ntp.org' is 208.67.75.242
ntp: sending query to 208.67.75.242
ntp: poll:16s sockets:1 interval:1s
Alarm clock

I’ve tried a number of other NTP servers with the same result. I suspected some upstream firewall, but have disabled all as part of troubleshooting. Additionally, my upstream GT does not have this issue. I’ve also factory reset the router (to Merlin) with the same result and downgraded to 386.9 as a test. Using clients connected to the AP, I can successfully reach NTP servers/response with no problem.

Suggestions?
 
Try disabling the redirect option in ntpMerlin.
 
Just do the simplest query to see if time is being returned without trying to set the clock.
Code:
# ntp -w -p time.apple.com
ntp: reply from 17.253.20.125: offset:+0.004425 delay:0.023301 status:0x24 strat:1 refid:0x004d4853 rootdelay:0.000000 reach:0x01
ntp: reply from 17.253.20.125: offset:+0.003181 delay:0.021059 status:0x24 strat:1 refid:0x004d4853 rootdelay:0.000000 reach:0x03

# ntp -w -p time.cloudflare.com
ntp: reply from 162.159.200.123: offset:+0.003807 delay:0.012487 status:0x24 strat:3 refid:0x8b086a0a rootdelay:0.014588 reach:0x01
ntp: reply from 162.159.200.123: offset:+0.002166 delay:0.009758 status:0x24 strat:3 refid:0x8b086a0a rootdelay:0.014572 reach:0x03

# ntp -w -p pool.ntp.org
ntp: reply from 204.93.207.12: offset:+0.005682 delay:0.036433 status:0x24 strat:3 refid:0x4d4037ce rootdelay:0.039765 reach:0x01
ntp: reply from 204.93.207.12: offset:+0.002619 delay:0.030651 status:0x24 strat:3 refid:0x4d4037ce rootdelay:0.039765 reach:0x03
 
Last edited:
Really bizarre ...

I disabled ntpmerlin redirect, stopped unbound, disabled, diversion, and disabled skynet:

Code:
admin@RT-AC86U:/tmp/home/root# /usr/sbin/ntp -w -t -d -p pool.ntp.org
ntp: 'pool.ntp.org' is 192.46.210.39
ntp: sending query to 192.46.210.39
ntp: timed out waiting for 192.46.210.39, reach 0x00, next query in 1s
ntp: 'pool.ntp.org' is 192.46.210.39
ntp: sending query to 192.46.210.39
ntp: timed out waiting for 192.46.210.39, reach 0x00, next query in 65s
ntp: 'pool.ntp.org' is 198.199.14.69
ntp: sending query to 198.199.14.69
ntp: timed out waiting for 198.199.14.69, reach 0x00, next query in 67s
ntp: 'pool.ntp.org' is 205.233.73.201
ntp: sending query to 205.233.73.201
ntp: reply from 205.233.73.201: offset:+0.008078 delay:0.065882 status:0x24 strat:3 refid:0x0c408317 rootdelay:0.000809 reach:0x01
ntp: sending query to 205.233.73.201
ntp: reply from 205.233.73.201: offset:+0.008745 delay:0.065947 status:0x24 strat:3 refid:0x0c408317 rootdelay:0.000809 reach:0x03
ntp: sending query to 205.233.73.201
ntp: reply from 205.233.73.201: offset:+0.009185 delay:0.065083 status:0x24 strat:3 refid:0x0c408317 rootdelay:0.000809 reach:0x07
ntp: sending query to 205.233.73.201
ntp: reply from 205.233.73.201: offset:+0.009880 delay:0.064115 status:0x24 strat:3 refid:0x0c408317 rootdelay:0.000809 reach:0x0f
admin@RT-AC86U:/tmp/home/root# /usr/sbin/ntp -t -d -N -S /sbin/ntpd_synced -p pool.ntp.org -d -n -q
ntp: 'pool.ntp.org' is 198.60.22.240
ntp: sending query to 198.60.22.240
ntp: poll:16s sockets:1 interval:1s
Alarm clock
admin@RT-AC86U:/tmp/home/root# /usr/sbin/ntp -t -d -N -S /sbin/ntpd_synced -p pool.ntp.org -d -n -q
ntp: 'pool.ntp.org' is 198.60.22.240
ntp: sending query to 198.60.22.240
ntp: poll:16s sockets:1 interval:1s
Alarm clock
admin@RT-AC86U:/tmp/home/root# /usr/sbin/ntp -t -d -N -S /sbin/ntpd_synced -p pool.ntp.org -d -n -q
ntp: 'pool.ntp.org' is 198.60.22.240
ntp: sending query to 198.60.22.240
ntp: poll:16s sockets:1 interval:1s
Alarm clock
admin@RT-AC86U:/tmp/home/root# /usr/sbin/ntp -w -t -d -p time.google.com
ntp: 'time.google.com' is 216.239.35.8
ntp: sending query to 216.239.35.8
ntp: reply from 216.239.35.8: offset:+0.015039 delay:0.021301 status:0x24 strat:1 refid:0x474f4f47 rootdelay:0.000000 reach:0x01
ntp: sending query to 216.239.35.8
ntp: reply from 216.239.35.8: offset:+0.015723 delay:0.021169 status:0x24 strat:1 refid:0x474f4f47 rootdelay:0.000000 reach:0x03
ntp: sending query to 216.239.35.8
ntp: reply from 216.239.35.8: offset:+0.013891 delay:0.018835 status:0x24 strat:1 refid:0x474f4f47 rootdelay:0.000000 reach:0x07
admin@RT-AC86U:/tmp/home/root# /usr/sbin/ntp -w -d -p time.google.com
ntp: 'time.google.com' is 216.239.35.0
ntp: sending query to 216.239.35.0
ntp: reply from 216.239.35.0: offset:+0.013586 delay:0.024812 status:0x24 strat:1 refid:0x474f4f47 rootdelay:0.000000 reach:0x01
ntp: sending query to 216.239.35.0
ntp: reply from 216.239.35.0: offset:+0.014000 delay:0.023108 status:0x24 strat:1 refid:0x474f4f47 rootdelay:0.000000 reach:0x03
ntp: sending query to 216.239.35.0
ntp: reply from 216.239.35.0: offset:+0.015470 delay:0.026441 status:0x24 strat:1 refid:0x474f4f47 rootdelay:0.000000 reach:0x07
admin@RT-AC86U:/tmp/home/root# /usr/sbin/ntp -t -d -N -S /sbin/ntpd_synced -p pool.ntp.org -d -n -q
ntp: 'pool.ntp.org' is 212.85.158.10
ntp: sending query to 212.85.158.10
ntp: poll:16s sockets:1 interval:1s
Alarm clock
admin@RT-AC86U:/tmp/home/root# /usr/sbin/ntp -t -d -N -S /sbin/ntpd_synced -p time.google.com -d -n -q
ntp: 'time.google.com' is 216.239.35.12
ntp: sending query to 216.239.35.12
ntp: reply from 216.239.35.12: offset:+0.013727 delay:0.018744 status:0x24 strat:1 refid:0x474f4f47 rootdelay:0.000000 reach:0x01
ntp: poll:2s sockets:0 interval:1s
ntp: sending query to 216.239.35.12
ntp: reply from 216.239.35.12: offset:+0.013318 delay:0.018379 status:0x24 strat:1 refid:0x474f4f47 rootdelay:0.000000 reach:0x03
admin@RT-AC86U:/tmp/home/root# /usr/sbin/ntp -t -d -N -S /sbin/ntpd_synced -p time.cloudfare.com -d -n -q
ntp: 'time.cloudfare.com' is 104.16.133.229
ntp: sending query to 104.16.133.229
ntp: poll:16s sockets:1 interval:1s
Alarm clock
admin@RT-AC86U:/tmp/home/root# /usr/sbin/ntp -w -d -p time.cloudfare.com
ntp: 'time.cloudfare.com' is 104.16.133.229
ntp: sending query to 104.16.133.229
ntp: timed out waiting for 104.16.133.229, reach 0x00, next query in 1s
ntp: 'time.cloudfare.com' is 104.16.132.229
ntp: sending query to 104.16.132.229
ntp: timed out waiting for 104.16.132.229, reach 0x00, next query in 66s
ntp: 'time.cloudfare.com' is 104.16.133.229
ntp: sending query to 104.16.133.229
ntp: timed out waiting for 104.16.133.229, reach 0x00, next query in 66s
ntp: 'time.cloudfare.com' is 104.16.132.229
admin@RT-AC86U:/tmp/home/root# /usr/sbin/ntp -w -d -p time.apple.com
ntp: 'time.apple.com' is 17.253.2.253
ntp: sending query to 17.253.2.253
ntp: reply from 17.253.2.253: offset:+0.013555 delay:0.011496 status:0x24 strat:1 refid:0x73535047 rootdelay:0.000000 reach:0x01
ntp: sending query to 17.253.2.253
ntp: reply from 17.253.2.253: offset:+0.012123 delay:0.005981 status:0x24 strat:1 refid:0x73535047 rootdelay:0.000000 reach:0x03
admin@RT-AC86U:/tmp/home/root# /usr/sbin/ntp -t -d -N -S /sbin/ntpd_synced -p time.apple.com -d -n -q
ntp: 'time.apple.com' is 17.253.20.125
ntp: sending query to 17.253.20.125
ntp: reply from 17.253.20.125: offset:+0.012558 delay:0.009088 status:0x24 strat:1 refid:0x004d4853 rootdelay:0.000000 reach:0x01
ntp: poll:2s sockets:0 interval:1s
ntp: sending query to 17.253.20.125
ntp: reply from 17.253.20.125: offset:+0.012485 delay:0.009144 status:0x24 strat:1 refid:0x004d4853 rootdelay:0.000000 reach:0x03
admin@RT-AC86U:/tmp/home/root#

The good news is that I got it to sync. The bad news is that it's very inconsistent. I re-enabled unbound, diversion, and skynet and was still able to sync ntp with apple and google. Changing ntpmerlin back to redirect caused ntp not to sync (which it couldn't anyway with my GT).

However, switching ntpmerlin from ntpd to chrony --
Code:
admin@RT-AC86U:/tmp/home/root# /usr/sbin/ntp -t -d -N -S /sbin/ntpd_synced -p 192.168.212.1 -d -n -q
ntp: sending query to 192.168.212.1
ntp: reply from 192.168.212.1: offset:+0.014558 delay:0.000350 status:0x24 strat:10 refid:0x01017f7f rootdelay:0.000000 reach:0x01
ntp: poll:1s sockets:0 interval:1s
ntp: sending query to 192.168.212.1
ntp: reply from 192.168.212.1: offset:+0.014628 delay:0.000462 status:0x24 strat:10 refid:0x01017f7f rootdelay:0.000000 reach:0x03
admin@RT-AC86U:/tmp/home/root#

Switching back to ntpd breaks ntpd_synced. My guess is that google and apple are running chrony and others are running ntpd. So there seems to be some bug in the ntp client on 386.10... @RMerlin

Thanks to @EmeraldDeer and @dave14305 for the hints
 
Make sure the GT ntpd is listening on the LAN interface. Below is an ntpd.conf assuming LAN interface is br0.
Code:
#
logfile /opt/var/spool/ntp/ntp.log
driftfile /opt/var/spool/ntp/ntp.drift
#
restrict default limited kod nomodify notrap nopeer noquery # restrictive default IPv4
restrict -6 default limited kod nomodify notrap nopeer noquery # restrictive default IPv6
restrict source nomodify notrap noquery # required for pool directive if using restrictive default permissions
restrict 127.0.0.1 # permissive localhost IPv4
restrict -6 ::1 # permissive localhost IPv6
#
interface ignore wildcard
interface listen br0
#
pool time.apple.com iburst
pool time.cloudflare.com
#
 
Chrony is a type of NTP server, so that would not be the problem. I use NTPMerlin chrony rather than NTP.

I would be surprised if there was a bug in the Busybox NTP.

Not sure many people run Merlin as an AP. I would be inclined towards using the Asus firmware for an AP.
 
Last edited:
Make sure the GT ntpd is listening on the LAN interface. Below is an ntpd.conf assuming LAN interface is br0.
Code:
#
logfile /opt/var/spool/ntp/ntp.log
driftfile /opt/var/spool/ntp/ntp.drift
#
restrict default limited kod nomodify notrap nopeer noquery # restrictive default IPv4
restrict -6 default limited kod nomodify notrap nopeer noquery # restrictive default IPv6
restrict source nomodify notrap noquery # required for pool directive if using restrictive default permissions
restrict 127.0.0.1 # permissive localhost IPv4
restrict -6 ::1 # permissive localhost IPv6
#
interface ignore wildcard
interface listen br0
#
pool time.apple.com iburst
pool time.cloudflare.com
#

Similar code in my /jffs/addons/ntpmerlin.d/ntp.conf. Plus if it was truly just this server’s problem then I shouldn’t be able to sync with time.apple.com and time.google.com from my AP. The fact that only some ntp servers are working and when I change my GT from ntpd to chrony it starts to work, leads me to believe it’s some bug in the 386.10 code

The good news is that since the AP will sync with the GT router running chrony, I have an effective workaround.

Code for reference:
Code:
# replace the following with time servers or pools close to you
# see http://support.ntp.org/bin/view/Servers/NTPPoolServers
pool pool.ntp.org iburst

interface ignore wildcard
interface listen br0

logfile /opt/var/spool/ntp/ntp.log
driftfile /opt/var/spool/ntp/ntp.drift
#leapfile /opt/var/spool/ntp/leap-seconds.list # https://hpiers.obspm.fr/iers/bul/bulc/ntp/leap-seconds.list

restrict default limited kod nomodify notrap nopeer noquery # restrictive default IPv4
restrict -6 default limited kod nomodify notrap nopeer noquery # restrictive default IPv6
restrict source nomodify notrap noquery # required for pool directive if using restrictive default permissions
restrict 127.0.0.1 # permissive localhost IPv4
restrict -6 ::1 # permissive localhost IPv6

disable auth stats
 

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