-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Could not connect to Ryuk when running Testcontainers in Docker Desktop on Mac OS #7036
Comments
Copy from comment in Issue #4395.
I still see:
I am attempting to run tests using Testcontainers to bootstrap a Apache Cassandra
Essentially, bootstrapping the Cassandra container with: private static final DockerImageName CASSANDRA_DOCKER_IMAGE_NAME = DockerImageName.parse("cassandra:3.11.15");
private static final String LOCAL_DATACENTER_NAME = "datacenter1";
private static final int CASSANDRA_DEFAULT_PORT = 9042;
@Bean("CassandraContainer")
GenericContainer<?> cassandraContainer(Environment environment) {
GenericContainer<?> cassandraContainer = newEnvironmentOptimizedCassandraContainer();
71: cassandraContainer.start();
return withCassandraServer(cassandraContainer, environment);
}
private @NonNull GenericContainer<?> newCassandraContainer() {
return new CassandraContainer<>(CASSANDRA_DOCKER_IMAGE_NAME)
.withInitScript(CASSANDRA_SCHEMA_CQL)
//.withInitScript(CASSANDRA_INIT_CQL)
.withExposedPorts(CASSANDRA_DEFAULT_PORT)
.withReuse(true);
}
private @NonNull GenericContainer<?> newEnvironmentOptimizedCassandraContainer() {
return newCassandraContainer()
.withEnv("CASSANDRA_SNITCH", "SimpleSnitch")
.withEnv("HEAP_NEWSIZE", "128M")
.withEnv("MAX_HEAP_SIZE", "1024M")
.withEnv("JVM_OPTS", "-Dcassandra.skip_wait_for_gossip_to_settle=0 -Dcassandra.initial_token=0");
}
private @NonNull CqlSession newCqlSession(@NonNull GenericContainer<?> cassandraContainer) {
return CqlSession.builder()
.addContactPoint(resolveContactPoint(cassandraContainer))
.withLocalDatacenter(LOCAL_DATACENTER_NAME)
.build();
}
private @NonNull InetSocketAddress resolveContactPoint(@NonNull GenericContainer<?> cassandraContainer) {
return new InetSocketAddress(cassandraContainer.getHost(),
cassandraContainer.getMappedPort(CASSANDRA_DEFAULT_PORT));
} |
+1 |
Hi, IIRC latest version of Docker Desktop doesn't provide Rootless is still not supported for Docker Desktop for Mac and Linux. Hope this help. |
I have the same issue; I have an M1 mac with the Docker for desktop and the Docker socket is enabled and accessible in
The same thing works with 1.17.6 |
@ph4r5h4d can you share your logs? Also, this is a different issue I think. In the meantime, can we go move to discussion, please? |
@eddumelendez still can't connect to Ryuk |
Testcontainers for Java 1.18.2 will auto-detect |
Has anyone figured out how to fix this error? I'm getting it on my M3 Pro device. When I set this env var, the exact same test succeeds: os.Setenv("TESTCONTAINERS_RYUK_DISABLED", "true") |
The only way I could get it solved on my M2 Pro is via |
Module
Cassandra
Testcontainers version
1.18.1
Using the latest Testcontainers version?
Yes
Host OS
Mac OS
Host Arch
x86 64
Docker version
m$ docker version Client: Cloud integration: v1.0.31 Version: 23.0.5 API version: 1.42 Go version: go1.19.8 Git commit: bc4487a Built: Wed Apr 26 16:12:52 2023 OS/Arch: darwin/amd64 Context: default Server: Docker Desktop 4.19.0 (106363) Engine: Version: 23.0.5 API version: 1.42 (minimum version 1.12) Go version: go1.19.8 Git commit: 94d3ad6 Built: Wed Apr 26 16:17:45 2023 OS/Arch: linux/amd64 Experimental: false containerd: Version: 1.6.20 GitCommit: 2806fc1057397dbaeefbea0e4e17bddfbd388f38 runc: Version: 1.1.5 GitCommit: v1.1.5-0-gf19387a docker-init: Version: 0.19.0 GitCommit: de40ad0
What happened?
This: #4395 (comment)
I am running Mac OS
13.3.1
, using Docker Desktop4.19.0 (106363)
and Testcontainers1.18.1
When using the Cassandra Testcontainer in particular, on
cassandraContainer.start()
, I am still seeing the following Exception being thrown:Relevant log output
No response
Additional Information
Again, this: #4395 (comment)
The text was updated successfully, but these errors were encountered: