What's new

[SOLVED] Time synchronization problem

  • 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!

FalconB

Regular Contributor
Hi all!

Don't know if it's related to the new FW-release but after upgrading to 384.14 on my AC68U I have difficulties with the time synchronization which breaks TLS among other things. Surfing still works but services relying on time sync will not. After reboot or restart (power off/on), checking the date through the command 'date' yields:
Code:
Sat May  5 05:07:35 UTC 2018
By manually typing the command:
Code:
/usr/sbin/ntp -t -S /sbin/ntpd_synced -p <ntp-server>
(where <ntp-server> is the address of the choosen ntp-server) results in the time beeing set and everything needing time sync comes to life. I have tried to add the command to firewall-start script and services-start script in /jffs/scripts, but I does not have any effect, the date is still May 5 2018 after the router has booted. Any advice on what could be the problem?

I am currently using the following scripts: amtm, diversion with pixelserv-tls, yazfi and uiDivstats.
 
Hi all!

Don't know if it's related to the new FW-release but after upgrading to 384.14 on my AC68U I have difficulties with the time synchronization which breaks TLS among other things. Surfing still works but services relying on time sync will not. After reboot or restart (power off/on), checking the date through the command 'date' yields:
Code:
Sat May  5 05:07:35 UTC 2018
By manually typing the command:
Code:
/usr/sbin/ntp -t -S /sbin/ntpd_synced -p <ntp-server>
(where <ntp-server> is the address of the choosen ntp-server) results in the time beeing set and everything needing time sync comes to life. I have tried to add the command to firewall-start script and services-start script in /jffs/scripts, but I does not have any effect, the date is still May 5 2018 after the router has booted. Any advice on what could be the problem?

I am currently using the following scripts: amtm, diversion with pixelserv-tls, yazfi and uiDivstats.
have you given thought to running the jack yaz ntp server.
 
Are you using some sort of encrypted DNS and a hostname as your time server?
 
have you given thought to running the jack yaz ntp server.
No I haven't. I haven't seen the need for that, yet. Could be something to look into after I get the router's normal NTP to work though.
Are you using some sort of encrypted DNS and a hostname as your time server?
No, not that I know of. Haven't changed the ntp-server in the router gui since forever (several fw-versions back). The strange thing is when I do a ntp time update from the command line it kicks in instantly. Since the router seem to fail setting the time, I tried to put the manual command in one of the scripts in /jffs/scripts, but it dosen't seem to take effect, even though the rest of the commands in the script work. I'm kinda lost here...
 
Is the router able to successfully do an nslookup of your selected ntp server names from the command line? What WAN DNS servers do you use?
 
Is the router able to successfully do an nslookup of your selected ntp server names from the command line? What WAN DNS servers do you use?
Currently I'm not allowed to reboot the router or disrupt internet services by my family ( :oops: ) so I can't tell if I can do a nslookup when the time is not set. However, I know that I can access the internet even though time is off. So that would imply that dns is working.

Also, when going to the Administration->System tab there is a yellow text stating that time isn't synced when the router has booted up. It also says that my locale is wrong (can't remember the exact words). After entering the ntp command at the command prompt, that text dissapears.

My DNS settings are attached in image.
 

Attachments

  • WAN DNS.JPG
    WAN DNS.JPG
    68.7 KB · Views: 1,752
Currently I'm not allowed to reboot the router or disrupt internet services by my family ( :oops: ) so I can't tell if I can do a nslookup when the time is not set. However, I know that I can access the internet even though time is off. So that would imply that dns is working.

Also, when going to the Administration->System tab there is a yellow text stating that time isn't synced when the router has booted up. It also says that my locale is wrong (can't remember the exact words). After entering the ntp command at the command prompt, that text dissapears.

My DNS settings are attached in image.
I’m going to guess that on Tools /Other settings page that “Wan: Use local caching DNS server as system resolver (default: No)” is set to Yes. Change it to No now and watch after the next reboot.
 
Well, actually it is not :(. Will do some more testing and rebooting tomorrow and see what I can come up with. Thanks for your help though!
 

Attachments

  • Advanced tweaks.JPG
    Advanced tweaks.JPG
    29.4 KB · Views: 1,024
Well, actually it is not :(. Will do some more testing and rebooting tomorrow and see what I can come up with. Thanks for your help though!
Just run this now and post the output to clarify which dns server it uses and what ntp server you use.
Code:
nslookup $(nvram get ntp_server0)
nslookup $(nvram get ntp_server1)
 
Code:
XXXX@RT-AC68U:/jffs/scripts# nslookup $(nvram get ntp_server0)
Server:    1.1.1.1
Address 1: 1.1.1.1 one.one.one.one

Name:      ntp.se
Address 1: 2a01:3f7::1 ntp.se
Address 2: 194.58.200.20 ntp.se

XXXX@RT-AC68U:/jffs/scripts# nslookup $(nvram get ntp_server1)
BusyBox v1.25.1 (2019-12-13 19:39:26 EST) multi-call binary.

Usage: nslookup [HOST] [SERVER]

Query the nameserver for the IP address of the given HOST
optionally using a specified DNS server

My ntp-values i nvram:
Code:
XXXX@RT-AC68U:/jffs/scripts# nvram show | grep ntp
ntpd_server_redir=0
ntp_server0=ntp.se
ntp_server1=
rc_support=mssid 2.4G 5G update usbX2 switchctrl manual_stb pwrctrl WIFI_LOGO nandflash meoVoda movistarTriple app reboot_schedule ipv6 ipv6pt PARENTAL2 dnsfilter ntpd dnspriv dnspriv dualwan pptpd openvpnd utf8_ssid printer modem webdav rrsut cloudsync media appnet timemachine hdspindown diskutility nfsd dnssec dblog email bwdpi snmp tor HTTPS letsencrypt ssh vpnc repeater psta wl6 optimize_xbox wifi_tog_btn user_low_rssi bcmfa tcode usericon stainfo cloudcheck realip netool cfg_sync amas bcmwifi eula proxysta
ntp_ready=1
ntpd_enable=0
size: 52269 bytes (13267 left)
 
A few weeks ago on 384.14b I changed the NTP server to time.cloudflare.com, but after a reboot there was also no time sync. I changed it back to pool.ntp.org and the time was synced as normal right after the reboot.
 
A few weeks ago on 384.14b I changed the NTP server to time.cloudflare.com, but after a reboot there was also no time sync. I changed it back to pool.ntp.org and the time was synced as normal right after the reboot.
Ok. Will try that later and see if it makes any difference. It shouldn't make a difference since the user is allowed (and rightfully so) to enter his/hers preferred ntp server. But I'll give it a try tomorrow and see what happens. Thanx for the tip!
 
Last edited:
I believe I had something similar a couple firmware upgrades ago.

My NTP would not update by rebooting my 86U alone. I had to completely power down the router and power back up. Since then it has been fine.
 
These are the entries in the syslog regarding NTP. Router starttime is:
Code:
May  5 07:05:02 syslogd started: BusyBox v1.25.1

Syslog entries:
Code:
May  5 07:05:18 rc_service: udhcpc 552:notify_rc stop_ntpd
May  5 07:05:18 rc_service: udhcpc 552:notify_rc start_ntpd
May  5 07:05:18 rc_service: waitting "stop_ntpd" via udhcpc ...

May  5 07:05:19 custom_script: Running /jffs/scripts/service-event (args: stop ntpd)

May  5 07:05:21 rc_service: waitting "stop_ntpd" via udhcpc ...

May  5 07:05:21 rc_service: waitting "stop_ntpd" via udhcpc ...

May  5 07:05:33 rc_service: skip the event: start_ntpd.

May  5 07:05:38 ntpd: Stopped ntpd

May  5 07:07:04 amtm disk-check: NTP timeout (100s) reached, date is router default

Dec 14 09:37:02 ntpd: Initial clock set
The last line is presumably when I set the ntp manually.
 
I believe I had something similar a couple firmware upgrades ago.

My NTP would not update by rebooting my 86U alone. I had to completely power down the router and power back up. Since then it has been fine.
I've tried that with no luck. Neither a reboot or restart (power off/on) solves it :(.
 
When you run the ntp command manually, are you using the hostname ntp.se or an IP address? You call it “address” in your original post, so just checking.
 
When you run the ntp command manually, are you using the hostname ntp.se or an IP address? You call it “address” in your original post, so just checking.
I'm using the hostname. I think I tried the ip address also. Either sets the time.
 
Try running this now to see if the anycast ntp server responds consistently:
Code:
ntp -w -p ntp.se
 

Latest threads

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