YAML kafka.brokers config doesn't handle comma separated hostnames.
Today, the console yaml config file expects kafka.brokers to be an array like the following:
kafka:
#Brokers is a list of bootstrap servers with
#port (for example "localhost:9092").
brokers:
- redpanda-0:9092
- redpanda-1:9092
- redpanda-2:9092
A user can also specify the broker list via an environment variable providing a comma separated list of broker hostnames and ports. In this form, console is doing some sort of string splitting to generate the broker list.
KAFKA_BROKERS=redpanda-0:9092,redpanda-1:9092,redpanda-2:9092
This difference has caused confusion for some users in that they also attempt to set the yaml file to look something like this (which doesn't appear to work)
kafka:
brokers: "redpanda-0:9092,redpanda-1:9092,redpanda-2:9092"
When configured like the above, it seems like console attempts to connect to a host name "redpanda-0:9092,redpanda-1:9092,redpanda-2:9092"
I'm not sure if the right fix is to
- make console error startup when it encounters literal strings with comma separated values in settings like kafka.brokers (or other configs that can take an array of multiple hostnames)
- make console accept a string value for kafka.brokers and detect/split on comma to generate the array list on the user's behalf (similar to parsing KAFKA_BROKERS).
Fixing this will reduce configuration papercuts and support questions.
Related thread: https://redpandadata.slack.com/archives/C02RQPX6A1K/p1697641985342729
Related: #762 ?