besu
besu copied to clipboard
Improve error message when verifying enode syntax with xdns-enabled
Description
When deploying multiples nodes on private network, the same BESU_BOOTNODES env variable is set with all the enodes.
This is ok as a node will detect its own enode.
Now, in a private networking environment such a Kubernetes, the option BESU_XDNS_ENABLED is set to true so we can point to the Pods hostnames instead of IPs that will change.
Internally, Besu seems to retrieve from DNS the IP and then substitute it in the enode string.
If any of the nodes listed on the BESU_BOOTNODES option is not yet ready, the Kubernetes DNS will not report any IP, and then the Besu command will fail with this message:
Invalid enode URL syntax. Enode URL should have the following format 'enode://<node_id>@<ip>:<listening_port>[?discport=<discovery_port>]'. Invalid ip address.
If the option BESU_XDNS_UPDATE_ENABLED is also enabled, Besu does not substitute any IP in the enode string and passes the boot up validations.
Expected behavior:
If BESU_XDNS_ENABLED is set to true, but BESU_XDNS_UPDATE_ENABLED isn't, the error message displayed should be more clear on what is actually happening.
Example:
Invalid ip address or DNS query resolved an invalid ip.
Versions
- Software version:
besu/v21.7.1/linux-x86_64/adoptopenjdk-java-11(docker latest tag at the time of writting).
thanks for your feedback we will try to improve the message in this case
@daniellehrner easy logging change?
@non-fungible-nelson @macfarla Shall we close this issue?
all you Nick! You handled the changes, you should get the satisfaction ;)
Closing issue, Fixes merged - https://github.com/hyperledger/besu/pull/5346