Dismiss Notice

Welcome To SNBForums

SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.

If you'd like to post a question, simply register and have at it!

While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!

NTP Daemon for ASUSWRT/Merlin

Discussion in 'Asuswrt-Merlin' started by kvic, Nov 6, 2015.

  1. halex4u

    halex4u Regular Contributor

    Joined:
    Jan 14, 2013
    Messages:
    69
    Nothing to help me.

    Thanks, I will wait for a solution!
     
  2. kvic

    kvic Very Senior Member

    Joined:
    Aug 11, 2014
    Messages:
    1,384
    Location:
    Hong Kong
    Code:
    Sep 19 14:02:02 ntpd[12148]: systime.c:109: INSIST(sys_fuzz >= 0) failed
    
    The above error is causing the failure. Turns out we discussed it last time in this thread when another member jnmacd posted about the same issue. We didn't get to the bottom of the cause. Now reading it again. Coincidentally the error happens only on MIPS routers. N66 in your case. AC66(?) for jnmacd's.

    Very likely it's due to how I compiled the executable program, ntpd for MIPS platform. I don't have a N66/AC66 router to test. The error is unlikely to be resolved in near future. Sorry..

    The workaround for jnmacd: he found Entware-ng's ntpd binary runs well and compatible with everything else in this little package as in post #1.

    So you have the option to install Entware-ng, and then install Entware's ntpd package. Run it as NTP daemon.

    The webpage and graphing script from post #1 will continue to work. The only downside in Entware-ng's package is that it'll consume a bit more RAM resource.

    Hope this help. Or enough info for you to stop proceeding further.
     
  3. halex4u

    halex4u Regular Contributor

    Joined:
    Jan 14, 2013
    Messages:
    69
    Thank you for the support.
    I will stop here.
    Regards
     
  4. Veldkornet

    Veldkornet Senior Member

    Joined:
    May 24, 2015
    Messages:
    241
    Location:
    Nederland
    I see in The logs that the ntpd is started during boot, but when I check from the console with "/opt/etc/init.d/S77ntpd-custom check", I see it's "dead" and I have to start it manually.

    Any idea how I can see what's going on?


    Sent from my  iPhone using Tapatalk
     
  5. kvic

    kvic Very Senior Member

    Joined:
    Aug 11, 2014
    Messages:
    1,384
    Location:
    Hong Kong
    Weird...only ntpd have this issue? Or it's your only Entware service? Maybe post your syslog to the point after you manually restart ntp daemon..
     
  6. tomsk

    tomsk Senior Member

    Joined:
    Sep 3, 2016
    Messages:
    485
    Hi... installed this on a fresh update of merlin 380.62 ... everything looked ok but my stats are flatlined. Used the ntpq to have a look and it seems I'm not getting any data from the NTP servers.
    Code:
         remote           refid      st t when poll reach   delay   offset  jitter
    ==============================================================================
    usmia1-ntp-002. .INIT.          16 u    - 1024    0    0.000    0.000   0.000
    usdal2-ntp-002. .INIT.          16 u    - 1024    0    0.000    0.000   0.000
    jptyo5-ntp-002. .INIT.          16 u    - 1024    0    0.000    0.000   0.000
    Is this a double NAT/VPN issue?
     
  7. Veldkornet

    Veldkornet Senior Member

    Joined:
    May 24, 2015
    Messages:
    241
    Location:
    Nederland
    I had the same problem, for me I found out that it didn't start after a reboot. Had to start it manually.

    After I installed that fake hardware clock, it seems to be starting with boot now... not sure why, could just be a coincidence though.


    Sent from my  iPhone using Tapatalk
     
  8. tomsk

    tomsk Senior Member

    Joined:
    Sep 3, 2016
    Messages:
    485
    The ntpd daemon seems to be running so not sure it is the same issue as you had....
    Code:
    /opt/etc/init.d/S77ntpd-custom check
    Checking ntpd...              alive. 
     
  9. joegreat

    joegreat Very Senior Member

    Joined:
    Jan 9, 2013
    Messages:
    1,391
    Location:
    Vienna, Austria
    Hi,

    It's a simple timing issue: You try to start the NTP daemon to early (before you have time synced which is depended on the DNS if you have set an external time server).

    Either you start the NTP deamon later (give the NTP start script a sleep of ~40 sec.) or you fix it with fake HW clock, or (as I did) with hostip (it uses OpenDNS to resolve names).

    I have selected hostip for me as it allows me to have DNS ready at a very early stage of the boot process - which is very beneficial for some of my other services running on the router.

    With kind regards
    Joe :cool:
     
    rotorbudd, kvic and sfx2000 like this.
  10. tomsk

    tomsk Senior Member

    Joined:
    Sep 3, 2016
    Messages:
    485
    Thanks Joegreat It turns out my problem was the VPN. I tried fake-hwclock with no improvement, but as soon as i killed the tunnel the NTP servers started responding
    Code:
         remote           refid      st t when poll reach   delay   offset  jitter
    ==============================================================================
    +usmia1-ntp-002. .GPSs.           1 u    6   64    3  244.374    7.230  11.928
    +usdal2-ntp-002. .GPSs.           1 u   61  256    1  283.550    0.157   3.285
    *jptyo5-ntp-002. .GPSs.           1 u    5   64    3  183.595    4.234  11.722
    Not sure if its a VPN problem or just that the provider is blocking the ports. Guess i will have to route around to make it work.

    I couldn't find much info for your hostip solution... would it be possible to show how its done?

    Thanks
     
  11. joegreat

    joegreat Very Senior Member

    Joined:
    Jan 9, 2013
    Messages:
    1,391
    Location:
    Vienna, Austria
    Hi,

    hostip is part of the dnscrypt package on Entware(-NG) and the usage is discussed on this page of the DNSCrypt setup. Very helpful if you need name resolution before DNSCrypt is running (again a timing topic to be solved)... :rolleyes:

    With kind regards
    Joe :cool:
     
    Last edited: Sep 25, 2016
    kvic likes this.
  12. tomsk

    tomsk Senior Member

    Joined:
    Sep 3, 2016
    Messages:
    485
    Hi... seems to be working fine now...

    i was going to try the new 4..2.8p7 minimal binary mentioned in an earlier post when i noticed this on support.ntp.org

    "NTP users are strongly urged to take immediate action to ensure that their NTP daemons are not susceptible to being used in distributed denial-of-service (DDoS) attacks. Please also take this opportunity to defeat denial-of-service attacks by implementing Ingress and Egress filtering through BCP38.

    ntp-4.2.8p8 was released on 02 June 2016. It addresses 1 high- and 4 low--severity security issues, 4 bugfixes, and contains other improvements over 4.2.8p7."

    any chance of getting new minimal binaries for this?...

    Thanks
     

    Attached Files:

    rotorbudd and kvic like this.
  13. kvic

    kvic Very Senior Member

    Joined:
    Aug 11, 2014
    Messages:
    1,384
    Location:
    Hong Kong
    @tomsk thanks for letting me know. You did us a big favor!

    updated the binaries to 4.2.8p8. Pls get from the usual place.
     
    tomsk likes this.
  14. Veldkornet

    Veldkornet Senior Member

    Joined:
    May 24, 2015
    Messages:
    241
    Location:
    Nederland
    Assume you will update the tar.gz's eventually as well?


    Sent from my iPhone using Tapatalk
     
  15. tomsk

    tomsk Senior Member

    Joined:
    Sep 3, 2016
    Messages:
    485
    Done....thanks :)
    Code:
    Oct  6 22:24:51 ntpd[17917]: ntpd [email protected] Thu Oct  6 15:51:23 UTC 2016 (6): Starting
    Oct  6 22:24:51 ntpd[17917]: Command line: ntpd -c /jffs/etc/ntp.conf
    Oct  6 22:24:51 ntpd[17926]: proto: precision = 2.160 usec (-19)
    Oct  6 22:24:51 ntpd[17926]: Listen normally on 0 lo 127.0.0.1:123
    Oct  6 22:24:51 ntpd[17926]: Listen normally on 1 br0 192.168.2.1:123
    Oct  6 22:24:51 ntpd[17926]: Listening on routing socket on fd #18 for interface updates
     
  16. kvic

    kvic Very Senior Member

    Joined:
    Aug 11, 2014
    Messages:
    1,384
    Location:
    Hong Kong
    Everything is same except new ntp binaries. Hence, people need not to go through all the installation steps again. Download the new binaries and override the old. that's about it.

    The post discussing this is here: http://www.snbforums.com/threads/ntp-daemon-for-asuswrt-merlin.28041/page-4#post-259821

    Just follow the steps there. Now the binaries are updated to latest ntp release.

    Note that I only updated and included ARM last night. If there are shm and MIPS users out there, pls shout.
     
    joegreat likes this.
  17. steelskinz

    steelskinz Regular Contributor

    Joined:
    Mar 9, 2015
    Messages:
    122
    Location:
    France
    Hi there
    I just installed you deamon but when i want to update there is a file i didn't previously have : ntpdc.arm

    Second question, do i have to put iburst after the "server 0.fr.pool.ntp.org" in ntp.conf ? Thanks

    I didn't success to make Tools_NtpdStats.asp appears in Tools section from webUI. If i put it manually it works. :/
     
    Last edited: Dec 13, 2016
  18. kvic

    kvic Very Senior Member

    Joined:
    Aug 11, 2014
    Messages:
    1,384
    Location:
    Hong Kong
    Timekeeper is a crusade :) A NTP daemon shall avoid restart whenever possible. But what if you want to change config or fine tune a bit when the daemon is running? ntpdc is the tool to do that. Here is the manual how to use: http://doc.ntp.org/current-stable/ntpdc.html

    Not a critical parameter. Either way is fine. I don't have in my config.

    This little package was written in an attempt to be version agnostic. I haven't touched Merlin firmware for a long time. It's possible some HTML changes that might break the SED commands. What error did you see? Anyway glad that you fixed it manually already. Enjoy!
     
  19. steelskinz

    steelskinz Regular Contributor

    Joined:
    Mar 9, 2015
    Messages:
    122
    Location:
    France
    Thanks for your reply :)
     
  20. amplatfus

    amplatfus Regular Contributor

    Joined:
    Nov 25, 2016
    Messages:
    81
    Hi,

    After installing NTP Daemon the HDD with Entware-NG will spin down as before installing NTP Daemon?

    Many thanks.
     

Share This Page