testcontainers / testcontainers/testcontainers-java
Timed out waiting for Ryuk container to start - Ubuntu 20.04.3, Docker 20.10.12, 1.16.3
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 8.7k
- Forks
- 1.9k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 9
Description
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!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the failure on the Jenkins agent and comparing its Docker networking with the local machine, using the Ryuk and Selenium/VNC logs shown in the issue. Trace the mapped Ryuk port and browser connection path; done means identifying the agent-specific cause and confirming that Ryuk and Selenium sessions connect reliably.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, java
- Domain
- devops, networking, testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100