testcontainers / testcontainers/testcontainers-java
[Centos 7] ContainerLaunchException: Timed out waiting for container port to open (0.0.0.0 ports: [32807] should be listening)
Nessuno ha ancora preso questa issue.
- Lingua principale
- Java
- Stelle
- 8.7k
- Fork
- 1.9k
- Merge medio
- 2g 17h
- PR unite (30g)
- 9
Descrizione
@ClassRule
public static GenericContainer myum = new GenericContainer("myum:latest")
.withExposedPorts(11111)
.waitingFor(Wait.forListeningPort().withStartupTimeout(Duration.ofSeconds(240)));
while running the junit I see the following ,
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
ℹ︎ Checking the system...
✔ Docker version should be at least 1.6.0
✔ Docker environment should have more than 2GB free disk space
✔ File should be mountable
2018-07-18 15:00:56,007 ERROR (org.testcontainers.shaded.io.netty.util.ResourceLeakDetector) [testcontainers-netty-1-8] - LEAK: ByteBuf.release() was not called before it's garbage-collected. Enable advanced leak reporting to find out where the leak occurred. To enable advanced leak reporting, specify the JVM option '-Dorg.testcontainers.shaded.io.netty.leakDetection.level=advanced' or call ResourceLeakDetector.setLevel() See http://netty.io/wiki/reference-counted-objects.html for more information.
Test ignored.
org.testcontainers.containers.ContainerLaunchException: Container startup failed
at org.testcontainers.containers.GenericContainer.doStart(GenericContainer.java:231)
at org.testcontainers.containers.GenericContainer.start(GenericContainer.java:209)
at org.testcontainers.containers.GenericContainer.starting(GenericContainer.java:690)
at org.testcontainers.containers.FailureDetectingExternalResource$1.evaluate(FailureDetectingExternalResource.java:29)
at org.junit.rules.RunRules.evaluate(RunRules.java:20)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
Caused by: org.rnorth.ducttape.RetryCountExceededException: Retry limit hit with exception
at org.rnorth.ducttape.unreliables.Unreliables.retryUntilSuccess(Unreliables.java:83)
at org.testcontainers.containers.GenericContainer.doStart(GenericContainer.java:224)
... 10 more
Caused by: org.testcontainers.containers.ContainerLaunchException: Could not create/start container
at org.testcontainers.containers.GenericContainer.tryStart(GenericContainer.java:297)
at org.testcontainers.containers.GenericContainer.lambda$doStart$0(GenericContainer.java:226)
at org.rnorth.ducttape.unreliables.Unreliables.retryUntilSuccess(Unreliables.java:76)
... 11 more
Caused by: org.testcontainers.containers.ContainerLaunchException: Timed out waiting for container port to open (0.0.0.0 ports: [32807] should be listening)
at org.testcontainers.containers.wait.strategy.HostPortWaitStrategy.waitUntilReady(HostPortWaitStrategy.java:47)
at org.testcontainers.containers.wait.strategy.AbstractWaitStrategy.waitUntilReady(AbstractWaitStrategy.java:32)
at org.testcontainers.containers.GenericContainer.waitUntilContainerStarted(GenericContainer.java:559)
at org.testcontainers.containers.GenericContainer.tryStart(GenericContainer.java:276)
... 13 more
Process finished with exit code 255
BUILD DETAILS
testcontainers1.8.1
Docker version 17.03.2-ce, build f5ec1e2
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia da GenericContainer.java e HostPortWaitStrategy.java nelle posizioni dello stack trace, utilizzando l’esempio JUnit e l’ambiente con Testcontainers 1.8.1, Docker 17.03.2-ce e CentOS 7 descritto qui. Riproduci il timeout dell’attesa della porta e traccia il motivo per cui la porta esposta del container non viene rilevata; il lavoro è completo quando l’errore di avvio segnalato è spiegato e coperto da un test di regressione superato oppure è disponibile una risoluzione documentata.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- docker, java
- Ambito
- devops, testing
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 25/100