What's new
  • 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!

vnStat vnStat not starting due NTP sync

langesgnu

Regular Contributor
Hi everybody,

since some time, I have the issue that after a reboot vnStat is not starting, as it seems NTP sync is not fast enough for vnStat. Other scripts don't seem to have that issue and/or are waiting for NTP sync. What I see in the log after a reboot is:

Apr 12 09:17:18 scMerlin: Waiting for NTP to sync...
Apr 12 09:17:23 Entware: Starting Entware services on /tmp/mnt/86Udisc
Apr 12 09:17:23 vnstat: Starting monitoring for interface eth0
Apr 12 09:17:23 vnstat: NTP not synced, exiting
Apr 12 09:17:23 S61unbound: Waiting for NTP to sync before starting Unbound...
Apr 12 09:17:31 ntpbootwatchdog: Still waiting for NTP to sync [30 secs]...
Apr 12 09:17:31 rc_service: service 3915:notify_rc restart_ntpd
Apr 12 09:17:31 custom_script: Running /jffs/scripts/service-event (args: restart ntpd)
Apr 12 09:17:31 ntpd: Started ntpd
Apr 12 09:17:31 custom_script: Running /jffs/scripts/firewall-start (args: eth0)
Apr 12 09:17:31 rc_service: udhcpc_wan 3729:notify_rc stop_ntpd
Apr 12 09:17:31 rc_service: udhcpc_wan 3729:notify_rc start_ntpd
Apr 12 09:17:31 rc_service: waitting "stop_ntpd"(last_rc:restart_ntpd) via udhcpc_wan ...
Apr 12 09:17:31 custom_script: Running /jffs/scripts/service-event (args: stop ntpd)
Apr 12 09:17:31 ntpd: Stopped ntpd
Apr 12 09:17:32 custom_script: Running /jffs/scripts/service-event (args: start ntpd)
Apr 12 09:17:32 ntpd: Started ntpd
Apr 12 09:18:22 ntpd: Initial clock set
Apr 12 09:18:22 scMerlin: NTP has synced, scMerlin will now continue
Apr 12 09:18:22 rc_service: ntpd_synced 4265:notify_rc restart_stubby
Apr 12 09:18:26 rc_service: ntpd_synced 4265:notify_rc start_vpnserver1
Apr 12 09:18:30 ntpbootwatchdog: NTP has synced!

Currently I am running my AX86U Pro on 3006.102.4_beta1, but it was the same on 3004.388.8_4 and previous releases. I have the local NTP server enabled, also the scMerlion NTP Ready startup check and NTP boot watchdog script.

Anybody having an idea what could be done to avoid having to start vnStat manually every time after a reboot?
 
It should start from /jffs/scripts/post-mount even if the init script fails. What’s in the post-mount script? Maybe things need to be re-ordered in there to ensure vnstat runs after Entware.
 

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