instacart / instacart/truetime-android
untrusted stratum value for TrueTime: 0 ?
- Dominant language
- Kotlin
- Stars
- 1.5k
- Forks
- 196
- PR merge metrics
- No merged PRs in 30d
Description
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](https://github.com/instacart/truetime-android/files/4003429/log.txt)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.