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!

Both Chrony and NTP at the same time?

JGrana

Very Senior Member
I have been looking at what seems to be a long time for ntp_ready to go true. Seemed fine a few months ago ago.
In doing some looking around, I noticed that both /opt/etc/ntp and /opt/bin/timerserverd/chronyd.conf are running. At the same time.
I do use the Yaz/@Martinski ntpMerlin addon and have selected chronyd as the application to run.
For some reason both are running at the same time. I’m surprised.

Is this normal? Do I have some kind of configuration incorrect?
 
I have been looking at what seems to be a long time for ntp_ready to go true. Seemed fine a few months ago ago.
In doing some looking around, I noticed that both /opt/etc/ntp and /opt/bin/timerserverd/chronyd.conf are running. At the same time.
I do use the Yaz/@Martinski ntpMerlin addon and have selected chronyd as the application to run.
For some reason both are running at the same time. I’m surprised.

Is this normal? Do I have some kind of configuration incorrect?
That's very strange and completely unexpected because when using the CLI menu to toggle the time server selection between ntpd and chronyd, the code quite explicitly stops and then removes the Entware service script for the 'unselected' choice before replacing it with the newly selected time server, so I don't see how it's possible to have the 2 separate processes running at the same time unless some other script is installing and then restarting the Entware service script for the now-unselected time server.

To gather some initial diagnostics info, please download the following shell script onto the router:
Bash:
curl  -LSs --retry 3 --retry-delay 5 --retry-connrefused \
https://raw.githubusercontent.com/Martinski4GitHub/CustomMiscUtils/develop/Diags/DEBUG_ntpMerlin_INFO.sh \
-o "$HOME/DEBUG_ntpMerlin_INFO.sh" && chmod 755 "$HOME/DEBUG_ntpMerlin_INFO.sh"

Once it's downloaded, execute the script and post the output file that gets generated:
Bash:
$HOME/DEBUG_ntpMerlin_INFO.sh
 
Thanks @Martinski I also thought it odd.

I have attached the output from the script.
 
Following this, had the same thing happening for a bit. Attributed it to my AX88u meltdown. Then it kept on going as I rebuilt it. Eventually I uninstalled, reinstalled and upgraded to the latest version of the script in the process and reconfigured to use chrony and it sort of solved itself. Didn’t see anymore NTP references in the log afterwards.

Curious as to what if anything is determined/found.
 
@Martinski, Im having trouble attaching or pasting the output…
I keep getting the dreaded “Something went wrong” message.

I’ll try a few different ways
 
Different browser
Attach files
 
@Martinski, Im having trouble attaching or pasting the output…
I keep getting the dreaded “Something went wrong” message.

I’ll try a few different ways
It likely contains a forbidden word. Try this and post the link:
 
...
Let me know if there is anything else you would like me to do.
Thank you for providing the debug output file. That was very useful, and there were some very important clues. I just made a couple of quick changes to the diags shell script, so whenever you get a chance, please re-download it using the previously posted command, execute the script, and provide the resulting output file. This should provide the final piece of the puzzle.
 
I have been looking at what seems to be a long time for ntp_ready to go true. Seemed fine a few months ago ago.
In doing some looking around, I noticed that both /opt/etc/ntp and /opt/bin/timerserverd/chronyd.conf are running. At the same time.

"A man with a watch knows what time it is. A man with two watches is never sure." — Segal's Law​

 
Thank you for providing the debug output file. That was very useful, and there were some very important clues. I just made a couple of quick changes to the diags shell script, so whenever you get a chance, please re-download it using the previously posted command, execute the script, and provide the resulting output file. This should provide the final piece of the puzzle.
Thanks


Here is the new one


Good luck!
 
Thanks


Here is the new one


Good luck!
Thank you for the latest debug output file. As I suspected, the ntpd process currently running on your router was *NOT* installed by ntpMerlin. It may have been installed manually at some point, or by some other script that you have on your router. Whenever and however it got installed, it's clearly from some external source outside of ntpMerlin control.

Here are the 2 major clues from your latest debug output file:

1) The Entware service script that's launching the ntpd process on your router is *not* from ntpMerlin.

This is the script file you have in your router launching ntpd:

External_ntpd_ServiceScript.jpg


This is the script file that gets installed by ntpMerlin to launch ntpd:

ntpMerlin_ntpd_ServiceScript.jpg


2) The ntpd process running on your router is clearly not under the control of ntpMerlin.

This is the ntpd process currently running on your router:

External_ntpd_Process_WRONG.jpg


This is what it should look like when the ntpd process is running under ntpMerlin control:

ntpMerlin_ntpd_Process_OK.jpg


In short, you have a running ntpd process that was clearly *NOT* installed by ntpMerlin.

Last night, I made some changes in the ntpMerlin code to double-check and try to avoid getting into your current situation where 2 time server processes are running simultaneously. The extra checks are performed at the time the Entware service script (installed by ntpMerlin) is executed (started or restarted).

I'd suggest installing and running the very latest code by switching to the 'develop' branch version using the following command:
Bash:
ntpmerlin develop

The latest 'develop' branch version tag should be shown as "v3.4.10_25072920"
Example:
ntpMerlin_Develop_v3.4.10_CLI_VersTag.jpg


You can easily and quickly force a restart of your currently selected time server (i.e. chronyd) by choosing option 'r' from the CLI menu. This will also force a stop and removal of the externally-installed ntpd process, and you should be left with a clean time server process running.

HTH.
 
Curious if this started happening with the latest Entware update, that’s about the timeframe it did for me, but let it go when the router wiped itself and I had to redo it from scratch.

I remember getting NTPD messages in the log about it starting, failing to start or just failing. May have even posted about it or DM’d it. But not home to look it up or through the logs I have to be sure.
 
Curious if this started happening with the latest Entware update, that’s about the timeframe it did for me, ...
Yeah, that's possible. When Entware updates occur, there's always a possibility that it may overwrite and/or mess with pre-existing services. The recommended practice would be to always reboot the router after any Entware updates, and then double-check that the Entware service scripts have not been left "corrupted."

I can make some changes in the ntpMerlin code to double-check for this scenario as well.
 

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