Trying to connect to Cassandra (v 3.10.0) using gocql (Go: 1.8.3). Here is the error
gocql: unable to dial control conn [hostIP]: gocql: no response to connection startup within timeout
panic: gocql: unable to create session: control: unable to connect to initial hosts: gocql: no response to connection startup within timeout
here is the code...
func test() {
cluster := gocql.NewCluster("hostIP")
cluster.ProtoVersion = 4
cluster.Authenticator = gocql.PasswordAuthenticator{
Username: "<username>",
Password: "<password>",
}
cluster.Keyspace = "myspace"
cluster.Consistency = gocql.One
session, err := cluster.CreateSession()
if err != nil {
panic(err)
}
defer session.Close()
}
Can anyone point to what i could be missing ?