I have a springboot project and try to connect Kafka. My Kafka server is started on CentOS7 instead of docker.
And then, the program got error said:
Caused by: org.apache.kafka.common.config.ConfigException: No resolvable bootstrap urls given in bootstrap.servers
at org.apache.kafka.clients.ClientUtils.parseAndValidateAddresses(ClientUtils.java:89) ~[kafka-clients-2.6.0.jar:na]
at org.apache.kafka.clients.ClientUtils.parseAndValidateAddresses(ClientUtils.java:48) ~[kafka-clients-2.6.0.jar:na]
at org.apache.kafka.clients.consumer.KafkaConsumer.<init>(KafkaConsumer.java:734) ~[kafka-clients-2.6.0.jar:na]
... 30 common frames omitted
It looks like a problem aboud Kafka server url. However, this url can be connected. And the port 9092 is opened on firewall. The telnet
can connect this url. Here is my application.yml
.
spring:
kafka:
bootstrap-servers: 192.168.1.101:9092
consumer:
group-id: get-seeta-id
auto-offset-reset: earliest
key-deserializer: org.apache.kafka.common.serialization.StringDeserializer
value-deserializer: org.apache.kafka.common.serialization.StringDeserializer
Here is my configuration of Kafka server server.properties
:
broker.id=0
port=9092
host.name=192.168.1.101
log.dirs=/data/kafka/kafka_data/log/kafka
zookeeper.connect=192.168.1.101:2181
listeners=PLAINTEXT://192.168.1.101:9092
Could you please help me solve this problem? Thanks~
user24117701 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.