You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: New Cassandra container fails to start DSE 6.8.47 #9337
In the previous, non-deprecated Cassandra container, CassandraDatabaseDelegate was using Cassandra Session to execute statement that determines whether the server is up. New logic is using csqlsh which doesn't work with the DSE distribution anymore. Since the old Cassandra container is deprecated, this is a breaking change.
Relevant log output
2024-10-01T04:54:50.667-0600 ERROR ducttape-0 org.testcontainers.cassandra.delegate.CassandraDatabaseDelegate CQL script execution failed with error:
Connection error: ('Unable to connect to any servers', {'127.0.0.1:9042': error(111, "Tried connecting to [('127.0.0.1', 9042)]. Last error: Connection refused")})
On my side, I successfully tested it with the dse-server 6.9.2. I didn't test with the version you mentioned, but DSE images normally include cqlsh.
Do you have some specific settings (like env variables) when you start your container?
If you have an init script, you must also specify withWorkingDirectory("/") (because the DSE container starts in the /opt/dse directory and the init script is copied at the root of the container).
Note the error could appear several times in the logs before the server is finally up (it could take until 10 seconds in my tests before the query is finally executed with success). Also, the logs could be improved in the new implementation in order to not log such "expected" errors because it is just checking the server is up.
However, since I am running an x86 image here in my AppleSilicon through emulation, it is slow and you will indeed see the error logged multiple times:
15:03:25.399 ERROR org.testcontainers.cassandra.delegate.CassandraDatabaseDelegate - CQL script execution failed with error:
Connection error: ('Unable to connect to any servers', {'127.0.0.1:9042': error(111, "Tried connecting to [('127.0.0.1', 9042)]. Last error: Connection refused")})
@maximevw I guess changing the log level for these interim logs would help with the experience.
For now, I will close this issue, since I can't reproduce it, but please consider to follow up with more information @wendigo.
Activity
kiview commentedon Oct 1, 2024
Thanks for raising the issue @wendigo.
Are the publicly available DSE images we can use for testing?
To unblock you, I would recommend to continue using the deprecated
CassandraContainerfor now.wendigo commentedon Oct 1, 2024
@kiview
datastax/dse-server:6.8.47maximevw commentedon Oct 8, 2024
Hello @wendigo
On my side, I successfully tested it with the dse-server 6.9.2. I didn't test with the version you mentioned, but DSE images normally include
cqlsh.Do you have some specific settings (like env variables) when you start your container?
If you have an init script, you must also specify
withWorkingDirectory("/")(because the DSE container starts in the/opt/dsedirectory and the init script is copied at the root of the container).Note the error could appear several times in the logs before the server is finally up (it could take until 10 seconds in my tests before the query is finally executed with success). Also, the logs could be improved in the new implementation in order to not log such "expected" errors because it is just checking the server is up.
kiview commentedon Oct 11, 2024
I can confirm, the following works for me:
However, since I am running an x86 image here in my AppleSilicon through emulation, it is slow and you will indeed see the error logged multiple times:
@maximevw I guess changing the log level for these interim logs would help with the experience.
For now, I will close this issue, since I can't reproduce it, but please consider to follow up with more information @wendigo.
wendigo commentedon Oct 11, 2024
That's not what I observe while running in the CI (x86 based).
wendigo commentedon Oct 11, 2024
I'll send you a link to the run