Fork me on GitHub
#jackdaw
<
2021-04-12
>
finchharold14:04:01

I'm trying to use jackdaw along with lacinia(graphql)...

finchharold14:04:35

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.

finchharold14:04:46

Any help on what's going wrong?

finchharold14:04:52

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

finchharold14:04:42

Can I just copy the whole thing you've pasted above and remove the ksql and add postgres?

gphilipp14:04:08

That should work yes

gphilipp14:04:49

you can just docker-compose up broker

finchharold14:04:07

I didn't get it, you mean while using the above yaml or ?

finchharold14:04:38

I've added the broker part from the config you;ve sent and did docker-compose up broker

gphilipp14:04:46

mkdir runapp && cd runapp
curl -O 
docker-compose up broker

gphilipp14:04:46

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

finchharold14:04:11

it's still downloading

finchharold14:04:08

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

finchharold14:04:18

zookeeper is already running...

gphilipp14:04:28

Kill the previous containers

finchharold14:04:02

thank you so much