Hey everyone
I'm trying to use jackdaw along with lacinia(graphql)...
in my docker-compose file I have the kafka config like this:
BOOTSTRAP_SERVERS=kafka:9092
But in the application I've kept it like this:
"bootstrap.servers" "localhost:9092"
So, now when I'm running the app it is saying : WARN [org.apache.kafka.clients.NetworkClient:725] - [AdminClient clientId=adminclient-1] Connection to node 1 (/172.20.0.4:9092) could not be established. Broker may not be available.Any help on what's going wrong?
@kishorekaranam99 There might be multiple issues. Can you try with this docker-compose https://github.com/confluentinc/cp-all-in-one/blob/6.1.1-post/cp-all-in-one/docker-compose.yml?
Can I use other one? coz I kept it as per my app like for postgres I'm running it on port 5433 and all. This is mine:
version: '2'
services:
zookeeper:
image: debezium/zookeeper:${DEBEZIUM_VERSION}
ports:
- 2181:2181
- 2888:2888
- 3888:3888
kafka:
image: debezium/kafka:${DEBEZIUM_VERSION}
ports:
- 9092:9092
links:
- zookeeper
environment:
- ZOOKEEPER_CONNECT=zookeeper:2181
postgres:
image: debezium/example-postgres:${DEBEZIUM_VERSION}
ports:
- 5433:5432
environment:
- POSTGRES_USER=pguser
- POSTGRES_PASSWORD=pgpwd
volumes:
- ~/backup:/data
connect:
image: debezium/connect:${DEBEZIUM_VERSION}
ports:
- 8083:8083
links:
- kafka
- postgres
environment:
- BOOTSTRAP_SERVERS=kafka:9092
- GROUP_ID=1
- CONFIG_STORAGE_TOPIC=my_connect_configs
- OFFSET_STORAGE_TOPIC=my_connect_offsets
- STATUS_STORAGE_TOPIC=my_connect_statuses
- INTERNAL_KEY_CONVERTER=org.apache.kafka.connect.json.JsonConverter
- INTERNAL_VALUE_CONVERTER=org.apache.kafka.connect.json.JsonConverter
Can I just copy the whole thing you've pasted above and remove the ksql and add postgres?
That should work yes
you can just docker-compose up broker
I didn't get it, you mean while using the above yaml or ?
I've added the broker part from the config you;ve sent and did docker-compose up broker
mkdir runapp && cd runapp
curl -O <https://raw.githubusercontent.com/confluentinc/cp-all-in-one/6.1.1-post/cp-all-in-one/docker-compose.yml>
docker-compose up broker
docker-compose ps
Name Command State Ports
----------------------------------------------------------------------------------------
broker /etc/confluent/docker/run Up 0.0.0.0:9092->9092/tcp,
0.0.0.0:9101->9101/tcp
zookeeper /etc/confluent/docker/run Up 0.0.0.0:2181->2181/tcp, 2888/tcp,
3888/tcp
oh ok cool
it's still downloading
ERROR: for zookeeper Cannot start service zookeeper: driver failed programming external connectivity on endpoint zookeeper (0792f04ecbe54eceb3e6081c67b8da5c6d8fb1aa45506d158cdb36d3f62e70d3): Bind for 0.0.0.0:2181 failed: port is already allocated
zookeeper is already running...
Kill the previous containers
got it
thank you so much