2022-08-0614:49:54,714 org.testcontainers.DockerClientFactory 190 [main] INFO [] - Connected to docker: Server Version: 19.03.10 API Version: 1.40 Operating System: CentOS Linux 7 (Core) Total Memory: 386685 MB 2022-08-0614:49:54,877 docker[testcontainers/ryuk:0.3.3] 376 [main] INFO [] - Creating container for image: testcontainers/ryuk:0.3.3 2022-08-0614:49:54,884 org.testcontainers.utility.RegistryAuthLocator 164 [main] INFO [] - Failure when attempting to lookup auth config. Please ignore if you don't have images in an authenticated registry. Details: (dockerImageName: testcontainers/ryuk:0.3.3, configFile: /root/.docker/config.json. Falling back to docker-java default behaviour. Exception message: /root/.docker/config.json (No such file or directory) 2022-08-06 14:49:55,088 docker[testcontainers/ryuk:0.3.3] 440 [main] INFO [] - Container testcontainers/ryuk:0.3.3 is starting: 066d1e071dfc6bce3a71c1321a4331d1b388f50ac25d7c9de3f41f31447500e2 2022-08-06 14:49:55,854 docker[testcontainers/ryuk:0.3.3] 520 [main] INFO [] - Container testcontainers/ryuk:0.3.3 started in PT1.13S 2022-08-06 14:50:00,863 org.testcontainers.utility.RyukResourceReaper 120 [testcontainers-ryuk] WARN [] - Can not connect to Ryuk at 172.17.0.1:32775 java.net.SocketTimeoutException: connect timed out at java.net.PlainSocketImpl.socketConnect(Native Method) ~[?:1.8.0_212] at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) ~[?:1.8.0_212] at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) ~[?:1.8.0_212] at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) ~[?:1.8.0_212] at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[?:1.8.0_212] at java.net.Socket.connect(Socket.java:589) ~[?:1.8.0_212] at org.testcontainers.utility.RyukResourceReaper.lambda$null$0(RyukResourceReaper.java:92) ~[testcontainers-1.17.3.jar:?] at org.rnorth.ducttape.ratelimits.RateLimiter.doWhenReady(RateLimiter.java:27) ~[duct-tape-1.0.8.jar:?] at org.testcontainers.utility.RyukResourceReaper.lambda$maybeStart$1(RyukResourceReaper.java:88) ~[testcontainers-1.17.3.jar:?] at java.lang.Thread.run(Thread.java:748) ~[?:1.8.0_212] ...... 2022-08-06 14:50:25,873 org.testcontainers.utility.RyukResourceReaper 131 [main] ERROR [] - Timed out waiting for Ryuk container to start. Ryuk's logs: 2022/08/0606:49:55 Pinging Docker... 2022/08/0606:49:55 Docker daemon is available! 2022/08/0606:49:55 Starting on port 8080... 2022/08/0606:49:55 Started!
[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 31.939 s <<< FAILURE! - in org.apache.dolphinscheduler.e2e.cases.TenantE2ETest [ERROR] org.apache.dolphinscheduler.e2e.cases.TenantE2ETest Time elapsed: 31.937 s <<< ERROR! java.lang.IllegalStateException: Could not connect to Ryuk at 172.17.0.1:32775
2022/08/0608:51:49,364 docker[testcontainers/sshd:1.1.0] 440 [main] INFO [] - Container testcontainers/sshd:1.1.0 is starting: a9a5ccc8addcedb374a290675893291214d2123b6e2a5dc5e30b9e54aa01e828 2022/08/0608:52:50,405 docker[testcontainers/sshd:1.1.0] 529 [main] ERROR [] - Could not start container org.testcontainers.containers.ContainerLaunchException: Timed out waiting for container port to open(172.17.0.1 ports: [32812] should be listening) at org.testcontainers.containers.wait.strategy.HostPortWaitStrategy.waitUntilReady(HostPortWaitStrategy.java:102) ~[testcontainers-1.17.3.jar:?] ...... [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 62.677 s <<< FAILURE! - in org.apache.dolphinscheduler.e2e.cases.TenantE2ETest [ERROR] org.apache.dolphinscheduler.e2e.cases.TenantE2ETest Time elapsed: 62.675 s <<< ERROR! org.testcontainers.containers.ContainerLaunchException: Container startup failed Caused by: org.rnorth.ducttape.RetryCountExceededException: Retry limit hit with exception Caused by: org.testcontainers.containers.ContainerLaunchException: Could not create/start container Caused by: org.testcontainers.containers.ContainerLaunchException: Timed out waiting for container port to open(172.17.0.1 ports: [32812] should be listening)
2022-08-0614:49:55,088 docker[testcontainers/ryuk:0.3.3] 440 [main] INFO [] - Container testcontainers/ryuk:0.3.3 is starting: 066d1e071dfc6bce3a71c1321a4331d1b388f50ac25d7c9de3f41f31447500e2 2022-08-0614:49:55,854 docker[testcontainers/ryuk:0.3.3] 520 [main] INFO [] - Container testcontainers/ryuk:0.3.3 started in PT1.13S 2022-08-0614:50:00,863 org.testcontainers.utility.RyukResourceReaper 120 [testcontainers-ryuk] WARN [] - Can not connect to Ryuk at 172.17.0.1:32775
那登陆到Jenkins pod查看一下,实际上是否启动了服务:
1 2
root@jenkins-pipeline-ln62r:~/agent# docker ps | grep ryuk f1298662d49f testcontainers/ryuk:0.3.3 "/app"7 seconds ago Up 6 seconds 0.0.0.0:32772->8080/tcp testcontainers-ryuk-e84b7bc3-00cd-491f-9d47-e2d156e91669
可以看到,实际上是启动了ryuk的,那么问题就在于无法连接,我们通过wget命令来试一下:
1 2 3
root@jenkins-pipeline-ln62r:~/agent# wget 172.17.0.1:32772 --2022-08-0611:52:48-- http://172.17.0.1:32772/ Connecting to 172.17.0.1:32772...