truetime-android icon indicating copy to clipboard operation
truetime-android copied to clipboard

Local area network (LAN) to build the NTP Server is not work

Open xfdr0805 opened this issue 6 years ago • 1 comments

//ntp1.aliyun.com ok //TrueTime.build().withNtpHost("120.25.115.20").initialize();

Local area network (LAN) to build the NTP Server is not? LAN structures, I've tested the server is normal but TrueTime.build().withNtpHost("192.168.0.73").initialize(); W/System.err: at com.instacart.library.truetime.SntpClient.requestTime(SntpClient.java:159)

Who cna hlep me ?,thanks a lot

xfdr0805 avatar Sep 21 '18 07:09 xfdr0805

@xfdr0805 If I'm understanding this correctly, your LAN's server probably has wider dispersion than acceptable causing the build() call to fail: https://github.com/instacart/truetime-android/blob/0630cdf3341b82c2fb16d0ff3e95c32c4ee1a78c/library/src/main/java/com/instacart/library/truetime/SntpClient.java#L158.

See this post for some context: https://serverfault.com/questions/768280/what-is-ntp-dispersion-and-how-do-i-control-it. You could increase your root dispersion or fix the server on the LAN itself.

scorpiodawg avatar Oct 01 '18 19:10 scorpiodawg