iotaledger / iri

IOTA Reference Implementation
Other
1.15k stars 370 forks source link

IllegalArgumentException if remote node on IPV6 changes IP id DNS #240

Open frohal opened 7 years ago

frohal commented 7 years ago

If a neighbour is configured with IPV6 in DNS and the IP-address changes, the internal DNS-updater fails with an exception:

07/25 23:42:29.778 [pool-2-thread-3] INFO com.iota.iri.network.Node - Checking Neighbors' Ip... 07/25 23:42:29.778 [pool-2-thread-3] INFO com.iota.iri.network.Node - DNS Checker: Validating DNS Address 'iotaw.fritid.lokal' with ' new IPV6-address' 07/25 23:42:29.778 [pool-2-thread-3] INFO com.iota.iri.network.Node - IP CHANGED for iotaw.fritid.lokal! Updating... 07/25 23:42:29.778 [pool-2-thread-3] ERROR com.iota.iri.network.Node - Neighbor DNS Refresher Thread Exception: java.lang.IllegalArgumentException: hostname can't be null

Probably the parser of the ip-address fails because the IPV6-address contains a few ':' and that normally a valid URI only contians one of those, right before the host-name.

paaland commented 6 years ago

Have you tried running with argument: -Djava.net.preferIPv4Stack=true