NTP Server is stuck in a crash loop (Sysntpd)

I noticed that I was unable to query the built in NTP server, even though the 'enable server' check was set in Luci.

When I called logread -e ntpd, I saw:

Mon Nov 29 02:13:20 2021 daemon.info procd: Instance sysntpd::instance1 s in a crash loop 7 crashes, 0 seconds since last crash

Some other notes:

  • There doesn't appear to be anything listening on port 123 - netstat -nlp | grep 123 returns nothing.
  • opkg search $(readlink -f $(type -p ntpd)); returns busybox - 1.30.1-6
  • It looks like the only ntp related packages are luci-app-ntpc and ntpclient.
  • There is an ntpclient instance running.

Does anyone have any advice on how I can fix the crash loop and get the built in server working?

Thanks for any assistance in this matter.

ntpd should be listening here.

Same here, different version though.

There should be more, including ntpd -> opkg find *ntp*

Have you tried to restart the service, in case there was a race condition before? service sysntpd restart
Also what is the output of ls -la /usr/sbin/ntpd ?

1 Like
uci show system
1 Like

@trendy - ntpd is not listening on 123, however, running netstat -np | grep 123 shows ntpclient is using local port 123 (though not listening on it). Could this be blocking the server?

There are also more ntp packages available - I was just saying the only two I have installed are luci-app-ntpc and ntpclient.

service sysntpd restart results in another crash loop. Mon Nov 29 14:09:00 2021 daemon.info procd: Instance sysntpd::instance1 s in a crash loop 6 crashes, 0 seconds since last crash

The output of ls -la /usr/sbin/ntpd is:

lrwxrwxrwx    1 root     root            17 Feb 15  2021 /usr/sbin/ntpd -> ../../bin/busybox

@vgaetera - here's the output from uci show system:

system.@system[0].zonename='America/Los Angeles'
system.ntp.server='0.openwrt.pool.ntp.org' '1.openwrt.pool.ntp.org' '2.openwrt.pool.ntp.org' '3.openwrt.pool.ntp.org'

Is it possible the luci-app-ntp's dependency on ntpclient is causing this?

1 Like

OK - I think I figured it out. The ntpclient package was indeed the problem. Removing it and luci-app-ntpc and rebooting the router resulted in everything working as expected.

Also, I was pleasantly surprised to see even without luci-app-ntpc, I can still set time servers in the gui!

ps now shows (busybox) ntpd running, listening on port 123, and devices on the network were successfully able to query it for time.

Thanks everyone!


This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.