testcontainers / testcontainers/testcontainers-java
Timed out waiting for Ryuk container to start - Ubuntu 20.04.3, Docker 20.10.12, 1.16.3
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- Java
- Estrellas
- 8.7k
- Forks
- 1.9k
- Merge medio
- 2 d 17 h
- PR fusionados (30 d)
- 9
Descripción
Hi,
I am using Webdriver Containers for Selenium test.
When the tests are running on my local machine everything works fine.
However when I run the same tests on a jenkins agent following errors are thrown:
00:12:41.410 [main] INFO o.t.d.DockerClientProviderStrategy - Loaded org.testcontainers.dockerclient.UnixSocketClientProviderStrategy from ~/.testcontainers.properties, will try it first
00:12:41.621 [main] INFO o.t.d.DockerClientProviderStrategy - Found Docker environment with local Unix socket (unix:///var/run/docker.sock)
00:12:41.622 [main] INFO o.testcontainers.DockerClientFactory - Docker host IP address is localhost
00:12:41.639 [main] INFO o.testcontainers.DockerClientFactory - Connected to docker:
Server Version: 20.10.12
API Version: 1.41
Operating System: Ubuntu 20.04.3 LTS
Total Memory: 64220 MB
00:12:41.641 [main] INFO o.t.utility.ImageNameSubstitutor - Image name substitution will be performed by: DefaultImageNameSubstitutor (composite of 'ConfigurationFileImageNameSubstitutor' and 'PrefixingImageNameSubstitutor')
00:13:12.080 [main] ERROR o.t.utility.ResourceReaper - Timed out waiting for Ryuk container to start. Ryuk's logs:
2022/01/27 00:12:42 Pinging Docker...
2022/01/27 00:12:42 Docker daemon is available!
2022/01/27 00:12:42 Starting on port 8080...
2022/01/27 00:12:42 Started!
As of the start of each test following error is thrown:
FAILED: java.lang.IllegalStateException: Could not connect to Ryuk at localhost:49210
Specification of the server:
Ubuntu 20.04.3
Docker 20.10.12
Testcontainers 1.16.3
OpenJDK 16.0.1
It seems that the container starts correctly:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
3f263aa0e454 testcontainers/ryuk:0.3.3 "/app" 5 seconds ago Up 4 seconds 0.0.0.0:49209->8080/tcp, :::49209->8080/tcp testcontainers-ryuk-3cb3f86e-546d-4ae0-9d37-c0ce13659bf1
Disabling ryuk with TESTCONTAINERS_RYUK_DISABLED=true doesn't` solve the problem. When disabling ryuk selenium and vnc-recorder are started but there are also errors thrown:
00:35:10.486 [main] INFO o.t.d.DockerClientProviderStrategy - Loaded org.testcontainers.dockerclient.UnixSocketClientProviderStrategy from ~/.testcontainers.properties, will try it first
00:35:10.697 [main] INFO o.t.d.DockerClientProviderStrategy - Found Docker environment with local Unix socket (unix:///var/run/docker.sock)
00:35:10.698 [main] INFO o.testcontainers.DockerClientFactory - Docker host IP address is localhost
00:35:10.715 [main] INFO o.testcontainers.DockerClientFactory - Connected to docker:
Server Version: 20.10.12
API Version: 1.41
Operating System: Ubuntu 20.04.3 LTS
Total Memory: 64220 MB
00:35:10.715 [main] INFO o.testcontainers.DockerClientFactory - Checking the system...
00:35:10.715 [main] INFO o.testcontainers.DockerClientFactory - ✔︎ Docker server version should be at least 1.6.0
00:35:10.717 [main] INFO o.t.utility.ImageNameSubstitutor - Image name substitution will be performed by: DefaultImageNameSubstitutor (composite of 'ConfigurationFileImageNameSubstitutor' and 'PrefixingImageNameSubstitutor')
00:35:11.193 [main] INFO o.testcontainers.DockerClientFactory - ✔︎ Docker environment should have more than 2GB free disk space
00:35:11.537 [main] INFO o.t.containers.SeleniumUtils - Selenium API version 3.141.59 detected on classpath
00:35:11.553 [main] INFO ?.141.59] - Creating container for image: selenium/standalone-chrome-debug:3.141.59
00:35:12.372 [main] INFO ?.141.59] - Container selenium/standalone-chrome-debug:3.141.59 is starting: c8d62a89d143f988ea7d82d21517583aa84fb0d0b635eef4c4a1d4549e0d6ed8
00:35:14.950 [main] INFO ?.141.59] - Container selenium/standalone-chrome-debug:3.141.59 started in PT3.404032216S
00:35:14.951 [main] INFO ?.2.0] - Creating container for image: testcontainers/vnc-recorder:1.2.0
00:35:14.976 [main] INFO ?.2.0] - Container testcontainers/vnc-recorder:1.2.0 is starting: 223d9db7a3401544ae0ea9d624f849d2c36bf7ffe18367daa9e8139df8511d25
00:35:15.330 [main] INFO ?.2.0] - Container testcontainers/vnc-recorder:1.2.0 started in PT0.379303582S
org.rnorth.ducttape.TimeoutException: Timeout waiting for result with exception
Caused by: java.lang.RuntimeException:
org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'hostname', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '5.4.0-96-generic', java.version: '16.0.1'
Driver info: driver.version: RemoteWebDriver
Caused by: org.openqa.selenium.remote.UnreachableBrowserException:
Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'hostname', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '5.4.0-96-generic', java.version: '16.0.1'
Driver info: driver.version: RemoteWebDriver
Caused by: java.net.SocketException: Connection reset
Any ideas what could be the cause?
Thanks in advance for the support!
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Empieza reproduciendo el fallo en el Jenkins agent y comparando su red de Docker con la de la máquina local, usando los logs de Ryuk y Selenium/VNC mostrados en la issue. Sigue el puerto de Ryuk mapeado y la ruta de conexión del navegador; el trabajo estará terminado cuando se identifique la causa específica del agent y se confirme que las sesiones de Ryuk y Selenium se conectan de forma fiable.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- docker, java
- Área
- devops, networking, testing-qa
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 25/100