testcontainers / testcontainers/testcontainers-java
DockerComposeContainer doesn't report underlying issue on start failure.
Nessuno ha ancora preso questa issue.
- Lingua principale
- Java
- Stelle
- 8.7k
- Fork
- 1.9k
- Merge medio
- 2g 17h
- PR unite (30g)
- 9
Descrizione
This isn't necessarily a bug but it seems like its a gap in the start up error reporting.
When starting up a test containers, it's failing with the following "Caused by" stacktrace:
Caused by: org.rnorth.ducttape.RetryCountExceededException: Retry limit hit with exception
at org.rnorth.ducttape.unreliables.Unreliables.retryUntilSuccess(Unreliables.java:88)
at org.testcontainers.containers.GenericContainer.doStart(GenericContainer.java:329)
... 150 more
Caused by: org.testcontainers.containers.ContainerLaunchException: Could not create/start container
at org.testcontainers.containers.GenericContainer.tryStart(GenericContainer.java:525)
at org.testcontainers.containers.GenericContainer.lambda$doStart$0(GenericContainer.java:331)
at org.rnorth.ducttape.unreliables.Unreliables.retryUntilSuccess(Unreliables.java:81)
... 151 more
Caused by: java.lang.IllegalStateException: Container did not start correctly.
at org.testcontainers.containers.GenericContainer.tryStart(GenericContainer.java:463)
... 153 more
None of this is particularly informative.
When directly starting up docker with the same docker-compose.yml, this was reported:
docker-compose -f docker-compose.yml up -d
[+] Running 0/0
⠿ Network appevents-provisioner_default Error 0.0s
failed to create network appevents-provisioner_default: Error response from daemon: could not find an available, non-overlapping IPv4 address pool among the defaults to assign to the network
Another member on our team directed me to docker network ls:
docker network ls
NETWORK ID NAME DRIVER SCOPE
1092d4876829 1eylvttsssuk_default bridge local
aa08e32c77c6 4fq4vqxbmq2e_default bridge local
b9cc9d2c02ea 4gtpimii42dc_default bridge local
6f9835452949 bbfhuyndyhge_default bridge local
1ae2f01181dd bridge bridge local
87d9755d65db ckg9bdaghx2m_default bridge local
54bf8b4e66b4 drdafrr8vcuw_default bridge local
633a08e00dc8 egj2dr2nhju9_default bridge local
42706dd28d31 ghy6amkgx1qr_default bridge local
60e415e7890a gjlmzqcqbyx1_default bridge local
8b788e8024a7 h7limppelzbm_default bridge local
f8143f373104 hg92szytffyx_default bridge local
a2cdb1b4f724 host host local
ada646935572 ictsr19kolym_default bridge local
dd94b53a031a isfskvbc5ixn_default bridge local
6cbc5196ca00 izx7kabwwwja_default bridge local
4c0fcf45402d jmushtb7tbix_default bridge local
08749d2a7159 k4dugcecebye_default bridge local
180ac01fdc35 ks1bev5sildx_default bridge local
6ea09990ab86 local_default bridge local
9bfb392c156a mnsecpxyfd9n_default bridge local
33f5e7d4a820 ndfqhau1lo1r_default bridge local
22ea5a41c9e7 none null local
7c5106cbd5cb owsqlsjrqmyp_default bridge local
d9abe014132f puij6flbbupl_default bridge local
64251795e5ad r8fq5rm7ny7i_default bridge local
b6cc47999a56 rd6mz2aw21vw_default bridge local
863c97bd163c v8cetmwucp3c_default bridge local
da195e1d5c01 wdzbew1jmgb6_default bridge local
350928c753a5 wzeekb96naqr_default bridge local
7934aacf3e73 yjqlo6ve261q_default bridge local
dde63911c6ce zg8uxue47oeh_default bridge local
So I googled and discovered "docker network prune -f"
It would have been helpful if the testcontainers start failure had explicitly said what the underlying problem was rather than just "Container did not start correctly."
Thanks,
-Jonathan
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 con DockerComposeContainer e con il percorso di avvio di GenericContainer indicato nello stack trace, quindi confronta la relativa segnalazione degli errori con l’output del comando docker-compose.yml mostrato nell’issue. Individua dove viene perso l’errore Docker sottostante e verifica che un errore di avvio esponga tale causa invece di mostrare soltanto "Container did not start correctly."
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- docker, docker-compose, java
- Ambito
- devops, testing
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100