testcontainers / testcontainers/testcontainers-java

KafkaContainer transactions: Timeout expired while initializing transactional state in 60000ms.

Open
#1,816 31 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

modules/kafka resolution/acknowledged type/bug
Dominant language
Java
Stars
8.7k
Forks
1.9k
Avg merge
2d 17h
Merged PRs (30d)
9

Description

I'm trying create a test that uses kafka transactions. If I use a local instance of Kafka instead of KafkaContainer everything works fine, but when I use KafkaContainer it fails and I see the following:
Timeout expired while initializing transactional state in 60000ms.
org.apache.kafka.common.errors.TimeoutException: Timeout expired while initializing transactional state in 60000ms.
Attached are the source for my test and the logfile from the run.
kafka.log
Test.java.txt

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running the attached Test.java.txt reproduction and reading kafka.log, focusing on transactional-state initialization in KafkaContainer. Compare the container setup with the working local Kafka configuration and identify why initialization exceeds 60000ms; done means the transaction test completes successfully against KafkaContainer.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, java, kafka
Domain
distributed-systems, testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.