clj-test-containers v0.5.0 fails to start due to outdated version of Ryuk
aratare-jp opened this issue · 2 comments
Problem
I have a simple project that uses clj-test-containers
version 0.5.0 and testcontainers
is having a problem connecting to Ryuk. Here's an excerpt from the log:
ERROR in db.user-test/normal-login (ResourceReaper.java:227)
Uncaught exception, not in assertion.
Exception: java.lang.IllegalStateException: Could not connect to Ryuk at localhost:49153
at org.testcontainers.utility.ResourceReaper.start (ResourceReaper.java:227)
org.testcontainers.DockerClientFactory.client (DockerClientFactory.java:204)
org.testcontainers.LazyDockerClient.getDockerClient (LazyDockerClient.java:14)
org.testcontainers.LazyDockerClient.authConfig (LazyDockerClient.java:12)
org.testcontainers.containers.GenericContainer.start (GenericContainer.java:314)
clj_test_containers.core$start_BANG_.invokeStatic (core.clj:277)
clj_test_containers.core$start_BANG_.invoke (core.clj:271)
db.user_test$setup.invokeStatic (user_test.clj:24)
db.user_test$setup.invoke (user_test.clj:14)
...
kaocha.type.ns$eval4332$fn__4333$fn__4335$fn__4339$fn__4340.invoke (ns.clj:47)
kaocha.plugin.capture_output$capture_output_pre_test_hook$fn__3426$fn__3427.invoke (capture_output.clj:92)
kaocha.type.var$eval13915$fn__13917$fn__13922.invoke (var.clj:30)
kaocha.type.var$eval13915$fn__13917.invoke (var.clj:27)
...
kaocha.plugin.capture_output$capture_output_wrap_run_hook$fn__3418$fn__3419.invoke (capture_output.clj:83)
...
kaocha.plugin.capture_output$capture_output_wrap_run_hook$fn__3418.doInvoke (capture_output.clj:83)
...
kaocha.testable$run.invokeStatic (testable.clj:129)
kaocha.testable$run.invoke (testable.clj:120)
kaocha.testable$run_testable.invokeStatic (testable.clj:211)
kaocha.testable$run_testable.invoke (testable.clj:158)
kaocha.testable$run_testables.invokeStatic (testable.clj:224)
kaocha.testable$run_testables.invoke (testable.clj:214)
It seems that testcontainers
version 1.15.0 (the one being used by clj-test-containers
) is using an old deprecated version of Ryuk, and thus somehow fails to connect.
Potential solution
I decided to move testcontainers
to the latest version (1.16.3) and so far it's working correctly.
Updated: somehow it's bogged again after I tried running it again. Someone also had this same problem as stated in this issue
testcontainers/testcontainers-java#5122
Updated: the root cause turns out to be my VPN. Turning it off or allowing local traffic works just fine. Closing this issue now :)