[ SOLVED ] ntpclient and ntpd problems

Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Broadcom SoC based Hardware
Goto page Previous  1, 2, 3  Next
Author Message
Wildlion
DD-WRT Guru


Joined: 24 May 2016
Posts: 983

PostPosted: Mon Oct 05, 2020 23:34    Post subject: Reply with quote
kinleyd wrote:

Thanks for the clarification. I think ntpclient is running every few minutes, so that's a relief. Although syslog does say it times out against npt.org while it doesn't time out against time.google.com. In both cases it's followed by 'daemon.err process_monitor[1945]: cyclic NTP Update failed".

Re 1: dig pool.ntp.org @rou.ter.I.P:
I get status: NOERROR ...
;; ANSWER SECTION:
pool.npt.org. 7113 IN A 69.163.171.181

Re 2. No, I haven't modified any firewall settings.


I think that you have a typo, you keep referencing "npt.org" this is
National Philanthropic Trust

Not Network Time protocol. I doubt the the national Philanthropic trust is running a network time protocol server.

On your router can you do a:
nvram show | grep ntp

and post the output here.

The default is pool.ntp.org
so it seems like you are making things more complicated by trying to set it yourself.

What are your dns settings?
Sponsor
kinleyd
DD-WRT Novice


Joined: 01 Oct 2020
Posts: 24

PostPosted: Tue Oct 06, 2020 5:11    Post subject: Reply with quote
Lol, good catch. It somehow seems appropriate - given all the time I'm sinking on this problem a redirect to a philanthropic site may be what I need. But seriously, no, that was just an error I made quickly typing into telnet. Here is the output with the correct url:

; <<>> DiG 9.16.7 <<>> pool.ntp.org @r.t.i.p
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 37002
;; flags: qr rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 9, ADDITIONAL: 5

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
; COOKIE: 045c9432776694d4d82e4f6a5f7bf9c4c75c6afce95ab58d (good)
;; QUESTION SECTION:
;pool.ntp.org. IN A

;; ANSWER SECTION:
pool.ntp.org. 92 IN A 182.176.19.197
pool.ntp.org. 92 IN A 162.159.200.123
pool.ntp.org. 92 IN A 162.159.200.1
pool.ntp.org. 92 IN A 5.189.141.35

;; AUTHORITY SECTION:
pool.ntp.org. 1548 IN NS g.ntpns.org.
pool.ntp.org. 1548 IN NS e.ntpns.org.
pool.ntp.org. 1548 IN NS c.ntpns.org.
pool.ntp.org. 1548 IN NS a.ntpns.org.
pool.ntp.org. 1548 IN NS i.ntpns.org.
pool.ntp.org. 1548 IN NS d.ntpns.org.
pool.ntp.org. 1548 IN NS b.ntpns.org.
pool.ntp.org. 1548 IN NS h.ntpns.org.
pool.ntp.org. 1548 IN NS f.ntpns.org.

;; ADDITIONAL SECTION:
b.ntpns.org. 2238 IN A 185.120.22.23
b.ntpns.org. 2238 IN A 102.130.49.148
h.ntpns.org. 1507 IN AAAA 2620:95:4001::123
b.ntpns.org. 1507 IN AAAA 2001:67c:16c8:2242::1

Re ntp settings from nvram:

root@RT-AC68U:~# nvram show | grep ntp
size: 32652 bytes (32884 left)
ntp_timer=3600
usb_mntpoint=mnt
ntp_enable=1
ntp_server=
ntp_done=0
ntp_mode=auto
ntp_success=0

--

And thank you for your time!
kinleyd
DD-WRT Novice


Joined: 01 Oct 2020
Posts: 24

PostPosted: Tue Oct 06, 2020 5:18    Post subject: Reply with quote
root@RT-AC68U:~# nvram show | grep dns
sv_localdns=x.x.x.x
altdns1=
altdns2=
altdns3=
dnssec=0
ddns_username_2=
ddns_username_3=
dnssec_cu=0
ddns_username_4=
dns_redirect=0
ddns_username_5=
ddns_hostname_11=
ddns_username_6=
ddns_username_7=
ddns_username_8=
ddns_enable=0
ddns_username_9=
eth0_dns_ipaddr=0.0.0.0
ddns_conf=
ddns_hostname_buf=
wan_get_dns=
ddns_wildcard=
ddns_time=
eth0_dns_redirect=0
ddns_enable_buf=
ddns_hostname=
dns_crypt=0
chilli_uamanydns=0
ddns_force=10
size: 32653 bytes (32883 left)
dnsmasq_enable=1
ddns_wildcard_6=
ddns_wildcard_7=
ddns_url=
smartdns_prefetch_domain=1
dnsmasq_cachesize=1500
dnsmasq_add_mac=0
wan_dns=x.x.x.x, x.x.x.x
dnssec_proxy=0
ignore_wan_dns=0
smartdns_serve_expired=1
dnsmasq_strict=1
dns_dnsmasq=1
eth1_dns_ipaddr=0.0.0.0
smartdns_dualstack_ip_selection=0
ddns_cache=
vlan1_dns_ipaddr=0.0.0.0
ddns_custom_5=
ddns_dyndnstype_6=
ddns_change=
ddns_passwd_2=
ddns_passwd_3=
dns_crypt_resolver=adguard-dns-family-ns1
ddns_passwd_4=
ddns_passwd_5=
ddns_passwd_6=
ddns_username=
ddns_passwd_7=
ddns_passwd=
ddns_passwd_8=
auth_dnsmasq=1
ddns_passwd_9=
ddns_hostname_2=
ddns_hostname_3=
ddns_hostname_4=
ddns_hostname_5=
ddns_hostname_6=
ddns_hostname_7=
ddns_hostname_8=
ddns_hostname_9=
chilli_dns1=0.0.0.0
ipv6_dns1=x.x.x.x
ipv6_dns2=x.x.x.x
ddns_passwd_10=
ddns_passwd_11=
eth2_dns_redirect=0
ddns_dyndnstype=
dnsmasq_options=
eth2_dns_ipaddr=0.0.0.0
recursive_dns=0
dnsmasq_no_dns_rebind=0
ddns_passwd_buf=
local_dns=1
smartdns=0
ddns_username_10=
ddns_username_buf=
ddns_username_11=
ddns_wan_ip=1
vlan1_dns_redirect=0
eth1_dns_redirect=0
dnsmasq_rc=1
Alozaros
DD-WRT Guru


Joined: 16 Nov 2015
Posts: 4093
Location: UK, London, just across the river..

PostPosted: Tue Oct 06, 2020 7:16    Post subject: Reply with quote
I ve been using IP for NTP time for ages, the reason is
NTP time resolving is vital for the other services to run and sometimes DNS comes later so, resolving a name could become an issue..

Set time zone and add only 216.239.35.4 nothing else..
if this is not working than you either have an networking issue or current build you are on it, has a glitch...try nvram erase as egc suggested...
if no avail, report in the new build thread your issue...

i dont see your DNS in nvram show | grep dns

do not add anything in basic settings>local DNS boxes
use x3 boxes for DNS set up instead

_________________
Atheros
TP-Link WR740Nv1 -----DD-WRT 44538 BS AP,NAT
TP-Link WR740Nv4 -----DD-WRT 44251 BS WAP/Switch
TP-Link WR1043NDv2 ---DD-WRT 45229 BS AP,NAT,AP Isolation,Firewall,Local DNS,Forced DNS,DoT,VPN,VLAN
TP-Link WR1043NDv2 ---DD-WRT 44849 BS AP,NAT,AD Block,Firewall,Local DNS,Forced DNS,DoT,VPN,VLAN
TP-Link WR1043NDv2 ---Gargoyle OS 1.12.0 AP,NAT,QoS,Quotas
Qualcomm/IPQ8065
Netgear R7800 -----DD-WRT 44719 BS AP,NAT,AD-Block,AP&Net Isolation,VLAN's,Firewall,Local DNS,DoT
Broadcom
Netgear R7000 -----DD-WRT 45420 BS AP,Wi-Fi OFF,NAT,AD-Block,Firewall,Local DNS,Forced DNS,DoT,VPN
-----------------------------------------------------------------------------------------------
Stubby for DNS over TLS I DNSCrypt v2 by mac913
Wildlion
DD-WRT Guru


Joined: 24 May 2016
Posts: 983

PostPosted: Tue Oct 06, 2020 23:16    Post subject: Reply with quote
All of that looks correct on the NTP side, and I went through the code (based on the commits, back in 2018) and found teh IPv6 dns bug. So the only thing I can ask is are you using IPv6 on your router or IPv4, or both? But if I understood correctly that you have put the ip address (assuming IPv4) so even if there was a bug in the ipv6 aspect this would be eliminated.

Based on this information (and the history of others using without problems), it leads me to believe it is something between the ntp system. Whether that be your configuration, how dd-wrt is calling the ntp system, something specific to your hardware, or something on the firmware for that hardware version.

The only things I can think of now is to try resetting your system and reconfigure (like others have said) or post a report in say the build thread and see if someone else has the same hardware if they have the problem.

Sorry I cannot be of more help
kinleyd
DD-WRT Novice


Joined: 01 Oct 2020
Posts: 24

PostPosted: Wed Oct 07, 2020 11:30    Post subject: Reply with quote
Alozaros wrote:
I ve been using IP for NTP time for ages, the reason is
NTP time resolving is vital for the other services to run and sometimes DNS comes later so, resolving a name could become an issue..

Set time zone and add only 216.239.35.4 nothing else..
if this is not working than you either have an networking issue or current build you are on it, has a glitch...try nvram erase as egc suggested...
if no avail, report in the new build thread your issue...

i dont see your DNS in nvram show | grep dns

do not add anything in basic settings>local DNS boxes
use x3 boxes for DNS set up instead


Thanks.

I have tried setting an IP address instead of the url.
Also tried Local DNS boxes at 0.0.0.0.
Which section do you mean when you say "use x3 boxes for DNS set up instead'?
kinleyd
DD-WRT Novice


Joined: 01 Oct 2020
Posts: 24

PostPosted: Wed Oct 07, 2020 11:34    Post subject: Reply with quote
Wildlion wrote:
All of that looks correct on the NTP side, and I went through the code (based on the commits, back in 2018) and found teh IPv6 dns bug. So the only thing I can ask is are you using IPv6 on your router or IPv4, or both? But if I understood correctly that you have put the ip address (assuming IPv4) so even if there was a bug in the ipv6 aspect this would be eliminated.

Based on this information (and the history of others using without problems), it leads me to believe it is something between the ntp system. Whether that be your configuration, how dd-wrt is calling the ntp system, something specific to your hardware, or something on the firmware for that hardware version.

The only things I can think of now is to try resetting your system and reconfigure (like others have said) or post a report in say the build thread and see if someone else has the same hardware if they have the problem.

Sorry I cannot be of more help


I'm using only IP4. I did try fiddling with IP6 just in case it helped.
Yes, it seems to be quite a tricky little problem. FYI, I had the same problem with the original Asus firmware, so it may well be some hard setting in the router as you say could be the case.

So I will now wait for a free day and see what happens with an nvram erase and clean setup.

Thank you so much for your time and trouble @Wildlion, it is greatly appreciated. Have a great day!
kinleyd
DD-WRT Novice


Joined: 01 Oct 2020
Posts: 24

PostPosted: Thu Oct 08, 2020 10:02    Post subject: Reply with quote
OK, so took some time to set up everything from scratch. I reset the router to factory defaults and made the most basic settings only. Everything works, but no updates to router time from NTP Client. I guess that's it for now. Crying or Very sad
Wildlion
DD-WRT Guru


Joined: 24 May 2016
Posts: 983

PostPosted: Thu Oct 08, 2020 21:02    Post subject: Reply with quote
kinleyd wrote:

FYI, I had the same problem with the original Asus firmware, so it may well be some hard setting in the router as you say could be the case.


This is the statement that things that it is really hardware for some odd reason, because if the original Asus firmware has it then that is independent of DDWRT. But since you have said that it does not work with either firmware, that really leads to a hardware issue, *unless* you are doing the same wrong configuration.
kinleyd
DD-WRT Novice


Joined: 01 Oct 2020
Posts: 24

PostPosted: Fri Oct 09, 2020 6:18    Post subject: Reply with quote
Wildlion wrote:

*unless* you are doing the same wrong configuration.


That's been on my mind. I have another router, an Asus RT-N!2, which also fails to update NTP time, so the problem could well be between the keyboard and chair. Still, I'd much rather this be the problem than a fixed hardware issue.

I've tried everything conceivable so far, and now I'm thinking I will go back to the dd-wrt documentation and guidelines and work my way through the installation process step-by-step again. Let's see how it goes.
Alozaros
DD-WRT Guru


Joined: 16 Nov 2015
Posts: 4093
Location: UK, London, just across the river..

PostPosted: Fri Oct 09, 2020 16:26    Post subject: Reply with quote
x3 boxes for DNS are under basic setup settings, either down or up under the WAN set up, depends if you are using auto DHCP or static IP...

do not use 'local DNS' box placed in the middle leave it 0.0.0.0 do not use router IP 192.168.1.1 or what ever is for DNS too...

do you use DNSmasq for DNS/DHCP you better do...
if so, try adding to advanced DNSmasq box

no-resolv
server=9.9.9.9

of what ever DNS you use and use IP only for NTP time...
as you mentioned you tried the same config to another router it smells like bad config to me..no chance both routers to have the same bug with DDWRT and you even tried different builds i guess...do not load different save files do the config manually after reset...

for better help, post a pic of basic set up page (hide the sensitive data like static ip and so) and pic of services page... if the shit continues..
Rolling Eyes

_________________
Atheros
TP-Link WR740Nv1 -----DD-WRT 44538 BS AP,NAT
TP-Link WR740Nv4 -----DD-WRT 44251 BS WAP/Switch
TP-Link WR1043NDv2 ---DD-WRT 45229 BS AP,NAT,AP Isolation,Firewall,Local DNS,Forced DNS,DoT,VPN,VLAN
TP-Link WR1043NDv2 ---DD-WRT 44849 BS AP,NAT,AD Block,Firewall,Local DNS,Forced DNS,DoT,VPN,VLAN
TP-Link WR1043NDv2 ---Gargoyle OS 1.12.0 AP,NAT,QoS,Quotas
Qualcomm/IPQ8065
Netgear R7800 -----DD-WRT 44719 BS AP,NAT,AD-Block,AP&Net Isolation,VLAN's,Firewall,Local DNS,DoT
Broadcom
Netgear R7000 -----DD-WRT 45420 BS AP,Wi-Fi OFF,NAT,AD-Block,Firewall,Local DNS,Forced DNS,DoT,VPN
-----------------------------------------------------------------------------------------------
Stubby for DNS over TLS I DNSCrypt v2 by mac913
yoyoma2
DD-WRT User


Joined: 24 Sep 2016
Posts: 156

PostPosted: Sat Oct 10, 2020 4:46    Post subject: Reply with quote
I have seen ntp clients (not dd-wrt in particular) fail to retrieve time from an ntp server due to a slow/high latency internet connection. If your internet connection isn't the greatest, you could try installing a local ntpd server on dd-wrt with entware and have everyone on the LAN use it including dd-wrt itself.

There's a thread about installing ntpd with entware, it's easy.
kinleyd
DD-WRT Novice


Joined: 01 Oct 2020
Posts: 24

PostPosted: Sat Oct 10, 2020 6:52    Post subject: Reply with quote
yoyoma2 wrote:
I have seen ntp clients (not dd-wrt in particular) fail to retrieve time from an ntp server due to a slow/high latency internet connection. If your internet connection isn't the greatest, you could try installing a local ntpd server on dd-wrt with entware and have everyone on the LAN use it including dd-wrt itself.

There's a thread about installing ntpd with entware, it's easy.


Thanks, will check that out. I get these times when ping pool.ntp.org - do you think that is too much latency?

--- pool.ntp.org ping statistics ---
8 packets transmitted, 8 received, 0% packet loss, time 7007ms
rtt min/avg/max/mdev = 167.560/195.563/241.203/24.704 ms

Edit: I do have ntp installed on my desktop, and with ntpd my NTP time updates work fine.


Last edited by kinleyd on Sat Oct 10, 2020 11:43; edited 1 time in total
kinleyd
DD-WRT Novice


Joined: 01 Oct 2020
Posts: 24

PostPosted: Sat Oct 10, 2020 6:56    Post subject: Reply with quote
Alozaros wrote:
x3 boxes for DNS are under basic setup settings, either down or up under the WAN set up, depends if you are using auto DHCP or static IP...

do not use 'local DNS' box placed in the middle leave it 0.0.0.0 do not use router IP 192.168.1.1 or what ever is for DNS too...

do you use DNSmasq for DNS/DHCP you better do...
if so, try adding to advanced DNSmasq box

no-resolv
server=9.9.9.9

of what ever DNS you use and use IP only for NTP time...
as you mentioned you tried the same config to another router it smells like bad config to me..no chance both routers to have the same bug with DDWRT and you even tried different builds i guess...do not load different save files do the config manually after reset...

for better help, post a pic of basic set up page (hide the sensitive data like static ip and so) and pic of services page... if the shit continues..
Rolling Eyes


Thanks. The only one I haven't tried yet is adding no-resolv and server=9.9.9.9 in advanced dnsmasq settings. I will get back after I've tried that and reviewed all the dd-wrt setup documentation again.
yoyoma2
DD-WRT User


Joined: 24 Sep 2016
Posts: 156

PostPosted: Sat Oct 10, 2020 13:45    Post subject: Reply with quote
kinleyd wrote:
I get these times when ping pool.ntp.org - do you think that is too much latency?

--- pool.ntp.org ping statistics ---
8 packets transmitted, 8 received, 0% packet loss, time 7007ms
rtt min/avg/max/mdev = 167.560/195.563/241.203/24.704 ms

Edit: I do have ntp installed on my desktop, and with ntpd my NTP time updates work fine.
From memory, the ping times were in the 600-700 ms range but dd-wrt was not the ntp client at that time so hard to conclude that's your problem.

If your desktop is always on, use its existing ntpd, otherwise entware's ntpd & ntp-utils is the way to go. I love entware and use it for anything dd-wrt doesn't provide.

Edit: Entware ntpd thread
Goto page Previous  1, 2, 3  Next Display posts from previous:    Page 2 of 3
Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Broadcom SoC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum