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

untrusted stratum value for TrueTime: 0 ?

Open ZimM-LostPolygon opened this issue 6 years ago • 1 comments

No idea what triggers it, but occasionally, TrueTimeRx fails to initialize with a untrusted stratum value for TrueTime: 0. I am using the pool.ntp.org pool.

After a few hours, the issue just goes away, but it's usually back soon enough. Looking at the logs, my guess about what happens is that TrueTimeRx only does requests to a single server (193.70.94.182 in this case) again and again, even though it is misbehaving. Perhaps it would be better to retry with a different server instead of wasting all attempts on a single one?

Code I use:

mTrueTime =
	TrueTimeRx
		.build()
		.withLoggingEnabled(true)
		.withConnectionTimeout(15 * 1000)
		.withServerResponseDelayMax(1000)
		.withRootDispersionMax(1500)
		.withRootDelayMax(1500)
		.withSharedPreferencesCache(context);
mTrueTime
	.initializeRx("pool.ntp.org")
	.subscribeOn(Schedulers.io())
	.subscribe(...)

Full log: log.txt

ZimM-LostPolygon avatar Dec 26 '19 20:12 ZimM-LostPolygon

Another source indicates that value 0 is valid (= Unspecified or Unavailable)

mice777 avatar May 12 '23 07:05 mice777