besu
besu copied to clipboard
Retry DNS timeout more aggresively
DNS was down for me today (now more resilient with backup yay) and the logs says contacting DNS times out every 10 min. Not sure if it's working for a long time before logging, but to me I think it would be nice to be a bit more aggressive and try again a bit sooner that after 10 min.
WARN | DNSResolver | I/O exception contacting remote DNS server when resolving all.mainnet.ethdisco.net
java.io.IOException: Timed out while trying to resolve all.mainnet.ethdisco.net./TXT, id=61644
at org.xbill.DNS.Resolver.send(Resolver.java:170)
at org.apache.tuweni.discovery.DNSResolver.resolveRecordRaw(DNSResolver.kt:155)
at org.apache.tuweni.discovery.DNSResolver.resolveRecord(DNSResolver.kt:73)
at org.apache.tuweni.discovery.DNSResolver.visitTree(DNSResolver.kt:120)
at org.apache.tuweni.discovery.DNSResolver.visitTree(DNSResolver.kt:111)
at org.apache.tuweni.discovery.DNSResolver.collectAll(DNSResolver.kt:95)
at org.apache.tuweni.discovery.DNSTimerTask.run(DNSDaemon.kt:89)
at java.base/java.util.TimerThread.mainLoop(Timer.java:566)
at java.base/java.util.TimerThread.run(Timer.java:516)
Hi @estensen thanks for your feedback - some thoughts -
- the DNS entries are updated from here https://github.com/ethereum/discv4-dns-lists on a daily basis so most of the time as long as you connect once to the DNS server you'll have the latest entries
- even if you can't connect to your DNS, you can still run discovery
- if everything is working fine, 10 minutes might be too frequent to update
- but if your DNS was down, 10 minutes seems like a long time
How did you solve it? I added new DNS servers to my network configuration and reboot the machine but the message is still shown...
@ayo91 it is normal to get occasional errors like that - Besu tries to contact several DNS servers - but some DNS servers may be down, it's out of our control. As long as some are contactable, you should be fine.
Experienced this twice in the last week. Have set DNS to Cloudflare and Google as backup. Maybe network providers fault? Anyway, causing some downtime :/