sipa / bitcoin-seeder

397 stars 970 forks source link

Seeds do not resolve from certain networks #14

Open schildbach opened 10 years ago

schildbach commented 10 years ago

A small number of Bitcoin Wallet for Android users are facing the problem that all three seed dns domains do not resolve. I file this issue to coordinate a debugging effort between the affected users and the operators of the seeds.

Bitcoin Wallet is using bitcoinj which uses standard Java API "InetAddress.getAllByName(seed)" for resolving. These three names are tried:

seed.bitcoin.sipa.be dnsseed.bluematt.me dnsseed.bitcoin.dashjr.org

If the issue surfaces, all three names cannot be resolved. Message in the log:

[PeerGroup STARTING] DnsDiscovery - Failed to look up DNS seeds from seed.bitcoin.sipa.be: java.net.UnknownHostException: Unable to resolve host "seed.bitcoin.sipa.be": No address associated with hostname

The affected users claim that at the same time there are not issues with other domains or any internet connectivity issues. They an reproduce the issue by moving back and forth an affected network.

Needless to say, DNS requests do not directly go to the seed dns servers but are relayed via the default DNS server if the network (usually set via DHCP). Its very well possible that an intermediate dns server modifies the request in a way the seeders do not understand. In the past, there was one such issue when certain DNS servers randomly camelcased the domain name in the request and the seeders were using case sensitive checks (violating the spec).

Since bitcoinj currently does not persist any peers across restarts or even parse address messages, failure to resolve any peer leads to being disconnected from the P2P network.

One app that might be helpful to debug issues on the Android side is DNS Lookup: https://play.google.com/store/apps/details?id=com.kodholken.dnslookup

sipa commented 10 years ago

I currently don't have the time to investigate this issue.