confluentinc / cp-docker-images

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

TimeoutException on initTransaction version 5.1.2 #706

Open guntherrhon opened 5 years ago

guntherrhon commented 5 years ago

Hi, im using kafka instance from docker-compose (in attach my docker-compose.yml). Using no transactional mode i can connect, publish and correctly consume messages. If i use transactional way during initTransaction method i got TimeoutException:

================ MY YML FILE ================ version: '2.0' services:

kafka-topics-ui: ports:

OneCricketeer commented 5 years ago
  1. hostname should not be set to the same name for each container
  2. I'm surprised this works without network_mode: host on each service
  3. The containers should talk to each other via the Docker network, not be routed through the host network. At the very least, start ove, and limit the problem... Start with just Kafka and Zookeeper, fixing these
    • KAFKA_ZOOKEEPER_CONNECT: 'zookeeper:2181'
    • KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092,PLAINTEXT_HOST://MY_IP_HOST:29092

And test your transactional application.

note: KAFKA_CREATE_TOPICS does not work for these containers.