Error connection cassandra

Hello! I’m doing a local test and I would like to connect to my cassandra db that is in azure, specifically a cosmosdb with cassandra api. The correct way to connect from the command line is:

SET export SSL_VALIDATE=false
cqlsh myhost 10350 -u myuser -p mypassword --connect-timeout 20 --ssl --cqlversion=3.4.4

However, I was reviewing the master image and the connection to cassandra would be something like this:

wait_for_cassandra() {
server=`echo $CASSANDRA_SEEDS | awk -F ',' '{print $1}'`
until cqlsh --cqlversion=3.4.4 $server < /dev/null; do
         echo 'waiting for cassandra to start up'
        sleep 1
    echo 'cassandra started'

Which does not allow me to execute by parameter all the values environment in my docker-compose:

  - "SSL_VALIDATE=false"
  - "CASSANDRA_SEEDS=cqlsh myhost 10350 -u myuser -p mypassword --connect-timeout 20 --ssl --cqlversion=3.4.4"

Apparently I advance a little more, but I receive the following error:

cassandra schema version compatibility check failed: unable to create CQL Client: gocql: unable to create session: failed to resolve any of the provided hostnames

I wanted to check first, if it is possible to connect to a cassandra raised in this way (cosmos db with cassandra api) and if it is, if there are configurable parameters


I did a test with go and gocql and everything works fine, but since cadence no.

    cluster := gocql.NewCluster("myuser.myhost")
    cluster.Port = 10350
    var sslOptions = new(gocql.SslOptions)
    sslOptions.EnableHostVerification = false


Add the env LOG_LEVEL = debug and I can see that cassandra can receive User and Password, but I don’t know what variable I can add in the docker-compose to take the values. Try CASSANDRA_USER and CASSANDRA_PASSWORD but nothing.

1 Like

Hey Nicolas, thank you for playing with Temporal.

To make sure I understand the problem you are experiencing correctly – my understanding is that you are using docker-compose to start temporal, and you want to configure temporal to use an instance of Cassandra[like] data store in Azure, and you are not having much luck making temporal do that (which seems to be happening because wait_for_cassandra does not seem to have a way to accept any configuration parameters beyond $server). Is that about right?

If so, can you share (or point me to) the docker-compose you are using (is it + edits?) and the command line you are using to invoke it.

Thank you!

Hi Mark!, thank you very much for answering. Indeed, you are correct, I am using the docker-compose and I have not been very successful. I leave you my docker-compose + edits.

    image: temporalio/auto-setup:0.26.0
        - "7233:7233"
        - "SSL_VERSION=TLSv1_2"
        - "SSL_VALIDATE=false"
        - "KEYSPACE=mypassword"
        - "CASSANDRA_SEEDS=myuser.myhost 10350 --connect-timeout 20 --ssl"
        # - "CASSANDRA_SEEDS=myuser.myhost 10350 -u myuser -p mypassword --connect-timeout 20 --ssl"
        - "STATSD_ENDPOINT=statsd:8125"
        - "SKIP_SCHEMA_SETUP=true"
        - "LOG_LEVEL=debug"

To run it I just type docker-compose up in console

1 Like

Nicolas and I looked into this offline / in slack, and, long story short, we seem to have a bug.

Thank you, Nicolas, for discovering this!

1 Like