Closed ziogaschr closed 3 years ago
In order to examine the error better without all the node clutter, we can reproduce it using:
devp2p --verbosity 5 dns sync --timeout 10s enrtree://AJE62Q4DUX4QMMXEHCSSCSC65TDHZYSMONSD64P3WULVLSF6MRQ3K@all.classic.blockd.info
Which gives the following failing log:
TRACE[12-22|18:11:12.728] Updating DNS discovery root tree=all.classic.blockd.info err=nil
TRACE[12-22|18:11:12.736] DNS discovery lookup name=FDXN3SN67NA5DKA4J2GOK7BVQI.all.classic.blockd.info err=nil
TRACE[12-22|18:11:12.772] DNS discovery lookup name=LB7XC5HGUHM7OTXE2ADPBQYPRA.all.classic.blockd.info err=nil
TRACE[12-22|18:11:12.787] DNS discovery lookup name=45WAU3H6PGBALIAO4OCBMCOHEE.all.classic.blockd.info err="lookup 45WAU3H6PGBALIAO4OCBMCOHEE.all.classic.blockd.info on 192.168.1.18:53: cannot unmarshal DNS message"
lookup 45WAU3H6PGBALIAO4OCBMCOHEE.all.classic.blockd.info on 192.168.1.18:53: cannot unmarshal DNS message
By researching for this error we found out references that the:
net
package implementationIn my home network I am using a Mikrotik router with custom configuration which might have issues. For this reason, I tried connecting to my phone hotspot (4G) and check if it reproduces. And magically it works out nicely.
Back to Mikrotik and with some further investigation, I figured out that under DNS settings I had the Max UDP packet size = 4096
. By setting this value to 512
it worked like a charm.
But hey, how this works, the message is still >512. Haven't researched it more than that as much time has been spent, but from what I read when this setting is set to lower value than what comes in, it converts UDP to TCP. So it will work as UDP for <=512 bytes but will use TCP above it.
I hope the solution will help someone. Cheers
Wow, nice one :)
System information
Expected behaviour
Chain will start syncing.
Actual behaviour
Chain fails to sync, or better it syncs slowly, losing peers very often.
Steps to reproduce the behaviour
Backtrace
Logs to check:
Full backtrace: