redpanda
redpanda copied to clipboard
Improve redpanda validation error for unset advertised addresses
Who is this for and what problem do they have today?
If a user has a redpanda.yaml with no advertised addresses configured but the listeners set to 0.0.0.0:
# redpanda.yaml
redpanda:
rpc_server:
address: 0.0.0.0
port: 33145
kafka_api:
- address: 0.0.0.0
port: 9092
Redpanda will fail to start with the following logs:
WARN 2024-02-16 12:40:47,313 [shard 0:main] main - application.cc:763 - Node property 'advertised_kafka_api' validation error: listener '' improperly configured with ADDR_ANY (0.0.0.0)
WARN 2024-02-16 12:40:47,313 [shard 0:main] main - application.cc:763 - Node property 'advertised_rpc_api' validation error: listener '' improperly configured with ADDR_ANY (0.0.0.0)
INFO 2024-02-16 12:40:47,313 [shard 0:main] main - application.cc:433 - Shutdown complete.
ERROR 2024-02-16 12:40:47,313 [shard 0:main] main - application.cc:459 - Failure during startup: std::invalid_argument (Validation errors in node config)
The errors mention advertised_kafka_api and advertised_rpc_api to be set to ADDR_ANY (0.0.0.0) even if the configuration file does not set these properties.
What are the success criteria?
To warn the user that Redpanda sets the advertised addresses to the listener addresses when the advertised address is not set. Hence the error message.
Why is solving this problem impactful?
Better UX when facing this error, since 0.0.0.0 is a valid value for a listener, but not for an advertised address.
Additional notes
Original issue: https://github.com/redpanda-data/redpanda/issues/12395