What's new

[Novice] NTP clock won't sync

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

teknowledgit

New Around Here
Hello All,

I'm a longtime lurker, have and continue to enjoy reading the many posts scattered around this board on various topics. Today, decided it was time to create an account and ask for help of my own.

I am running 2x Asus RT-N66U routers on my network (both routers running the latest version of custom fork 374.43). Both routers can see each other no problem via custom routing. Router #2 is used strictly for VPN purposes and runs fine.

Router #1 is giving me the trouble. Router #1 is the "Main" unit -- the DSL connection feeds into its WAN port using a bridged D-Link DSL-520B to provide the 7Mb service (all I can get in my part of the woods -- cable is not yet an option).

For some reason, I can't get the clock on Router #1 to sync properly. I've tried resetting all connections, factory wiping the unit and reconfiguring. It just never syncs. Router #2 on the other hand, syncs perfectly fine. Both use pool.ntp.org as the NTP link. Keep in mind that Router #2's WAN port connects to a LAN port on Router #1. How is it that it can pick up the time without issue (thank goodness as accurate time is needed for the VPN to even run), and yet Router #1 (with the modem in its WAN port) doesn't adjust at all?

Upon reading around on this forum, I came across many with similar issues over the previous months/years. Results varied....most seem to be resolved. However, I haven't been able to resolve mine.

I am currently attempting to run this script in my JFFS sector: NTP does not work in asuswrt. From the looks of it, the script does execute, however to no positive results. This is what shows up in my log:

Code:
Jan  1 00:00:01 crond[361]: crond: USER admin pid 1318 cmd /jffs/scripts/ntpclient.sh
Jan  1 00:00:21 ntpclient.sh: setup_receive:: bind...
Jan  1 00:00:21 ntpclient.sh: setup_transmit:: connect...
Jan  1 00:01:01 crond[361]: crond: USER admin pid 1364 cmd /jffs/scripts/ntpclient.sh
Jan  1 00:01:21 ntpclient.sh: setup_receive:: bind...
Jan  1 00:01:21 ntpclient.sh: setup_transmit:: connect...

Every 6 hours, for 1 hour these lines constantly repeat and the clock never sets. Now, I know I could post this question to the creator of the script, however I do not believe the script is the problem. Even if I try to manually trigger anything with the clock in a Terminal window, I end up with the same "bind/connect" lines and it eventually times out.

Thus, I am of the belief that something else (???) is preventing me from doing so. If Port 123 was blocked, how does Router #2 (which is pretty much a slave to Router #1) acquire the time without issue?

I do apologize for this long message as I've tried to convey my thoughts/experiences as best as possible. I admit I'm nowhere near a pro at this stuff -- simply "learning by doing". I could very well be missing something and may just be staring at it for too long (2 days now). I certainly do thank you all for reading and greatly appreciate any feedback you can provide.
 
What do you see if you try ntpclient from the command line?
Code:
# ntpclient -s -h pool.ntp.org
setup_receive:: bind...
setup_transmit:: connect...

send packet OK!
Recvfrom pack_len= 48, incoming= 1500
call udp_handle
UDP_handle: 48
[ntpclient] set time to 1440971939.179830
#
 
NTP implementation may still be broken even though it is claimed to be fixed.

My workaround has changed a tad bit. Instead of placing the cron job in init-start, I've moved it to services-start as recommended by another user.
 
What do you see if you try ntpclient from the command line?

Using Putty, I get:
Code:
ntpclient -s -h pool.ntp.org
setup_receive:: bind...
-sh: setup_receive::: not found
setup_transmit:: connect...
-sh: setup_transmit::: not found

Opening a Terminal window in WinSCP, I get:
Code:
/$ ntpclient -s -h pool.ntp.org
setup_receive:: bind...
setup_transmit:: connect...

From there, an Error Window opens up and states:
Code:
Command 'ntpclient -s -h pool.ntp.org'
failed with return code 0 and error message
setup_receive:: bind...
setup_transmit:: connect...
 
Using Putty, I get:
Code:
ntpclient -s -h pool.ntp.org
setup_receive:: bind...
-sh: setup_receive::: not found
setup_transmit:: connect...
-sh: setup_transmit::: not found
It looks as though it's having trouble finding your WAN interface. Do you have some sort of non-standard WAN setup?
 
Hmmmmm....I don't think there is anything non-standard about it. It's a DSL connection configured via PPPoE. The modem is a D-Link DSL-520B, configured in Bridge mode via here...and has an IP of 192.168.2.1.
 
Do you run firewall on this router? Worth disabling it and try the test command again..
 
Do you run firewall on this router? Worth disabling it and try the test command again..

Firewall is enabled. Disabled it (verified in system log) to try your suggestion. No change -- same errors as above (#4). Have now re-enabled the firewall.

Just a guess... try disabling IPv6 if you have it turned on.

IPv6 is disabled according to the "System Log - IPv6 Network Information". It never was enabled on my end.


Thank you for all suggestions so far. My journey continues...
 
Do you try to open the website of pool.ntp.org in your side?
If it can't open, I think you have some limitation in your side to access ntp server, you can use other ntp server like below :
server 2.tw.pool.ntp.org
server 1.asia.pool.ntp.org
server 0.asia.pool.ntp.org

You must can find such server in your country, and then you can use ntpclient to sync with this server by yourself, hope it's helpful.
 

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!

Staff online

Top