truetime-android
truetime-android copied to clipboard
NTP hostname is not resolved
When i am trying to initialize true time using TrueTime.build().initialize() in a background thread and I am getting this exception:
"Unable to resolve host "1.us.pool.ntp.org": No address associated with hostname"
This means the ips aassociated to that hostname cannot be resolved. Try this in your command line to see if it's an issue with your internet provider:
$ dig 1.us.pool.ntp.org
; <<>> DiG 9.10.6 <<>> 1.us.pool.ntp.org
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 41735
;; flags: qr rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1460
;; QUESTION SECTION:
;1.us.pool.ntp.org. IN A
;; ANSWER SECTION:
1.us.pool.ntp.org. 107 IN A 173.255.215.209
1.us.pool.ntp.org. 107 IN A 138.68.46.177
1.us.pool.ntp.org. 107 IN A 155.94.164.121
1.us.pool.ntp.org. 107 IN A 69.164.198.192
;; Query time: 78 msec
;; SERVER: 80.58.61.254#53(80.58.61.254)
;; WHEN: Thu Jan 24 16:01:28 CET 2019
;; MSG SIZE rcvd: 110