-
-
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]: New CassandraContainer implementation fails when ssl is enabled and required #9410
Comments
Hi @maximevw, your feedback is very welcome here :) |
Also, I think it would be nice to have integration tests for ssl as well and make them part of the docs. |
Hello @eddumelendez I think the second option is better. We could add a method like |
and reduce error logging while trying to connect to Cassandra database at container startup
Hello @eddumelendez @kiview I submitted the PR #9419 to fix this issue. I let you review it. |
Module
Cassandra
Testcontainers version
1.20.2
Using the latest Testcontainers version?
Yes
Host OS
MacOS
Host Arch
ARM
Docker version
Client:
Version: 24.0.6-rd
API version: 1.43
Go version: go1.20.7
Git commit: da4c87c
Built: Wed Sep 6 16:40:13 2023
OS/Arch: darwin/arm64
Context: tcd
Server: Testcontainers Cloud
Engine:
Version: 82+testcontainerscloud
API version: 1.46 (minimum version 1.24)
Go version: go1.21.12
Git commit: cc13f952511154a2866bddbb7dddebfe9e83b801
Built: Thu Aug 1 16:00:49 2024
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.7.12
GitCommit:
runc:
Version: 1.1.12-0ubuntu2~22.04.1
GitCommit:
docker-init:
Version: 0.19.0
GitCommit:
What happened?
Spring Boot project uses Testcontainers to test SSL against different services, one of them is Cassandra. Recent update to the new
org.testcontainers.cassandra.CassandraContainer
broke the integration test and fixed switching the default strategy. See spring-projects/spring-boot@e015209#diff-b0a149f2cf485e597a8b639871643e71e78ba76bc12580da827bce321e7e4859Relevant log output
INFO [nioEventLoopGroup-2-7] 2024-10-15 10:55:28,562 Message.java:826 - Unexpected exception during request; channel = [id: 0xa3393c93, L:0.0.0.0/0.0.0.0:9042 ! R:/127.0.0.1:41786]
io.netty.handler.ssl.NotSslRecordException: not an SSL/TLS record: 0400000001000000160001000b43514c5f56455253494f4e0005332e302e30
at io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1057) ~[netty-all-4.0.44.Final.jar:4.0.44.Final]
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:411) [netty-all-4.0.44.Final.jar:4.0.44.Final]
Additional Information
I've seen some ways to make it work given that the new CassandraContainer implementation relies on cqlsh
ssl
flag.The text was updated successfully, but these errors were encountered: