Skip to content

Getting timeout error #1

Open
Open
@naveensanks

Description

@naveensanks

I used the configs provided by you and ran the below two docker run commands on EC2

docker run -d
--name zookeeper
--hostname zookeeper
-e ZOOKEEPER_CLIENT_PORT=2181
-e ZOOKEEPER_TICK_TIME=2000
--restart unless-stopped
confluentinc/cp-zookeeper:5.2.1

docker run -d
--name kafka
--hostname kafka
-p 9092:9092
-p 29094:29094
-e KAFKA_BROKER_ID=1
-e KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181
-e KAFKA_LISTENERS=DOCKER_INTERNAL://kafka:29092,HOST_INTERNAL://kafka:9092,EXTERNAL://kafka:29094
-e KAFKA_ADVERTISED_LISTENERS=DOCKER_INTERNAL://kafka:29092,HOST_INTERNAL://localhost:9092,EXTERNAL://:29094
-e KAFKA_LISTENER_SECURITY_PROTOCOL_MAP=DOCKER_INTERNAL:PLAINTEXT,HOST_INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT
-e KAFKA_INTER_BROKER_LISTENER_NAME=DOCKER_INTERNAL
-e KAFKA_AUTO_CREATE_TOPICS_ENABLE="true"
-e KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR=1
-e KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS=100
confluentinc/cp-enterprise-kafka:5.2.1

But I am getting the below error when I try to send a message from a producer

File "C:\Python27\lib\site-packages\kafka\producer\kafka.py", line 564, in send
self._wait_on_metadata(topic, self.config['max_block_ms'] / 1000.0)
File "C:\Python27\lib\site-packages\kafka\producer\kafka.py", line 691, in _wait_on_metadata
"Failed to update metadata after %.1f secs." % (max_wait,))
kafka.errors.KafkaTimeoutError: KafkaTimeoutError: Failed to update metadata after 60.0 secs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions