Skip to content

gocql throwing 'unable to connect to initial hosts: tls: DialWithDialer timed out'  #1472

Closed

Description

Hello,
I am unable to connect to Cassandra flavor of cosmos db. I am trying to run docker all in one image to remote cosmos db cassandra API from my local mac machine.

Appreciate any help in resolving below issue.

I am able to connect and create schema via cqlsh. But, docker image is unable to pass through ssl stage it seems.

On docker image run command, it throws below error,

{"level":"fatal","ts":1555153542.5605443,"caller":"query/main.go:87","msg":"Failed to init storage factory","error":"gocql: unable to create session: control: unable to connect to initial hosts: tls: DialWithDialer timed out","stacktrace":"main.main.func1\n\t/home/travis/gopath/src/github.com/jaegertracing/jaeger/cmd/query/main.go:87\ngithub.com/jaegertracing/jaeger/vendor/github.com/spf13/cobra.(*Command).execute\n\t/home/travis/gopath/src/github.com/jaegertracing/jaeger/vendor/github.com/spf13/cobra/command.go:762\ngithub.com/jaegertracing/jaeger/vendor/github.com/spf13/cobra.(*Command).ExecuteC\n\t/home/travis/gopath/src/github.com/jaegertracing/jaeger/vendor/github.com/spf13/cobra/command.go:852\ngithub.com/jaegertracing/jaeger/vendor/github.com/spf13/cobra.(*Command).Execute\n\t/home/travis/gopath/src/github.com/jaegertracing/jaeger/vendor/github.com/spf13/cobra/command.go:800\nmain.main\n\t/home/travis/gopath/src/github.com/jaegertracing/jaeger/cmd/query/main.go:147\nruntime.main\n\t/home/travis/.gimme/versions/go1.12.1.linux.amd64/src/runtime/proc.go:200"}

cmd used to run and connect to remote cassandra

docker run --rm
--name jaeger
-e SPAN_STORAGE_TYPE=cassandra
-e CASSANDRA_SERVERS=abcd.cassandra.cosmos.azure.com
-e CASSANDRA_PORT=10350
-e CASSANDRA_PASSWORD=pwd
-e CASSANDRA_USERNAME=user
-e CASSANDRA_TLS=false
-e CASSANDRA_KEYSPACE=jaeger_v1_test
-e CASSANDRA_CONNECTIONS_PER_HOST=1
-e CASSANDRA_TLS_VERIFY_HOST=false
jaegertracing/all-in-one:latest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions