confluentinc / cp-docker-images

[DEPRECATED] Docker images for Confluent Platform.
Apache License 2.0
1.14k stars 703 forks source link

Queries on making a connection to Kafka #439

Open smitaminakshi opened 6 years ago

smitaminakshi commented 6 years ago

Our Kafka Zookeeper setup

We pull the docker image from confluentinc/cp-kafka:latest for kafka and for zookeeper confluentinc/cp-zookeeper:latest and followed this documentation https://docs.confluent.io/current/installation/docker/docs/development.html to start the container We use consul as service discovery to register cp-kafka and cp-zookeper to consul . From our Java application(will try give a brief explanation about this later) we try to connect to cp-kafka and cp-zookeeper using consul DNS queries . It's consul functionality that we can reach a certain service registered in consul using <regsitered-service.service>, in our case its cp-kafka.service and if we want to reach zookeeper it is cp-zookeeper.service. So, this is our setup for kafka/zookeeper

Now comes the issue: We aren't able to connect to kafka service registered in Consul. The DNS name resolution fails (that's what we assume from the stacktrace as seen in the application), thus giving the exception:

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:64)
       at org.apache.kafka.clients.producer.KafkaProducer.<init>(KafkaProducer.java:372)
       ... 87 common frames omitted

Could you let me know if there could be anything missing in the setup. Please let me know if any more information is required.

smitaminakshi commented 6 years ago

Has anybody taken a look at this issue? This is urgent.

sdinakar85 commented 6 years ago

Hi Team,

We are from SAP Ariba and we are trying out your opensource confluent kafka/zookeeper version to get things testing for one of the crucial projects. It would be great and very helpful if you guys could share your thoughts on this issue that we are facing currently.

OneCricketeer commented 5 years ago

The images work fine on their own...

Perhaps you should better document your Consul configurations so that your issue can be reproduced?