testcontainers / testcontainers/testcontainers-java

Timed out waiting for container port to open

Open
#4,125 23 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
8.7k
Forks
1.9k
Avg merge
2d 17h
Merged PRs (30d)
9

Description

#3923 is still reproducible with com.playtika.testcontainers:embedded-keycloak:2.0.8 even after forcibly upgrade org.testcontainers:testcontainers transitive dependency to 1.15.3, getting

Caused by: org.testcontainers.containers.ContainerLaunchException: Timed out waiting for container port to open (localhost ports: [49187] should be listening)
	at org.testcontainers.containers.wait.strategy.HostPortWaitStrategy.waitUntilReady(HostPortWaitStrategy.java:49)
	at org.testcontainers.containers.wait.strategy.AbstractWaitStrategy.waitUntilReady(AbstractWaitStrategy.java:35)
	at org.testcontainers.containers.GenericContainer.waitUntilContainerStarted(GenericContainer.java:892)
	at org.testcontainers.containers.GenericContainer.tryStart(GenericContainer.java:440)
	... 104 more

Docker For Windows 3.3.3

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 reproducing the failure with embedded-keycloak 2.0.8, Testcontainers 1.15.3, and Docker for Windows 3.3.3. Read HostPortWaitStrategy, AbstractWaitStrategy, and GenericContainer around the stack trace, then trace why port 49187 does not become ready. Done means the reported container starts reliably without the timeout and the behavior is covered by a relevant test.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, java
Domain
devops, testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.