Problem with cassandra. #6411
Unanswered
MateuszBednarczyk
asked this question in
Q&A
Replies: 1 comment
-
An example using |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello. I'm trying to create a test container for docker-compose, which uses Cassandra but unfortunately, I am stuck right now.
Here's what stops me.
An exception while executing the internal check: Container.ExecResult(exitCode=137, stdout=, stderr=/bin/sh: 1: nc: not found /bin/bash: connect: Cannot assign requested address /bin/bash: /dev/tcp/localhost/9042: Cannot assign requested address /bin/sh: 1: nc: not found
Here's my docker-compose
`
version: '3'
services:
cassandra:
image: amd64/cassandra:latest
ports:
- '9042:9042'
networks:
- cassandra_network
volumes:
- 'cassandra_data:/bitnami'
healthcheck:
test: [ "CMD", "/opt/bitnami/cassandra/bin/cqlsh", "-u cassandra", "-p cassandra" ,"-e "laser"" ]
interval: 15s
timeout: 10s
retries: 10
environment:
- CASSANDRA_SEEDS=cassandra
- CASSANDRA_PASSWORD_SEEDER=yes
- CASSANDRA_PASSWORD=cassandra
volumes:
cassandra_data:
driver: local
networks:
cassandra_network:
external: true
`
And finally, it's my Groovy /w Spock code
`@ClassRule
@shared
static DockerComposeContainer env = new DockerComposeContainer(new File("src/test/resources/compose-test.yml"))
.withExposedService("cassandra", 9042, Wait.forListeningPort()
.withStartupTimeout(Duration.ofSeconds(30)))
Beta Was this translation helpful? Give feedback.
All reactions