Fork me on GitHub
#jackdaw
<
2021-04-28
>
finchharold09:04:34

When I try to poll, I'm getting this:

WARN [org.apache.kafka.clients.NetworkClient:725] - [Consumer clientId=consumer-1, groupId=app Connection to node 2147483646 (/172.18.0.4:9092) could not be established. Broker may not be available.
[org.apache.kafka.clients.consumer.internals.AbstractCoordinator:727] - [Consumer clientId=consumer-1, groupId=app] Group coordinator 172.18.0.4:9092 (id: 2147483646 rack: null) is unavailable or invalid, will attempt rediscovery

Daniel Stephens15:04:08

The error says your client can't reach your broker at the address 172.18.0.4:9092, there's little to do with jackdaw here, it's just about getting your clients to talk to your kafka server, there are a number of tutorials online.

finchharold16:04:04

Yeah, I got that, but where do you think it's going wrong? I thought the whole docker yml file may have issues, so now configured each service separately in a docker container now. But still getting the same error.

finchharold16:04:33

leave polling, even when I try to use a watch method to see the data in a topic it is returning nothing but it is showing this: docker run -it --name watch --link zk:zookeeper --link kaf:kafka debezium/kafka:1.4 watch-topic -a -k public.app.chatroom this I did to see the contents of chatroom topic and it returned this:

WARNING: Using default BROKER_ID=1, which is valid only for non-clustered installations.
Using ZOOKEEPER_CONNECT=172.17.0.2:2181
Using KAFKA_LISTENERS=: and KAFKA_ADVERTISED_LISTENERS=
Using KAFKA_BROKER=172.17.0.3:9092
Contents of topic public.app.chatroom:

finchharold16:04:16

Now here it is saying BROKER_ID=1, and KAFKA_LISTENERS=: and KAFKA_ADVERTISED_LISTENERS= but in my server.properties file BROKER_ID=0 and KAFKA_LISTENERS AND ADVERTISED_LISTENERS isn't configured?

gklijs06:04:04

Do you use docker-compose? I think the ip's of the advertised listeners might be wrong. I usually do it like https://github.com/gklijs/bkes-demo/blob/main/docker-cluster.yml so that I can easily connect from other docker compose files, or locally.