I've tried with this sample code but it's not working:
func sessionForRemote() (*gocql.Session, error) { log.Println("Connecting to the database") config := gocql.NewCluster("14043648-xxxx-469a-a1e0-8331f2739475-us-east1.db.astra.datastax.com") //from bundle's config.json config.Authenticator = gocql.PasswordAuthenticator{ Username: "frameapp", Password: "db_password_here", } certPath, _ := filepath.Abs("./secure-connect-frame-db/cert") //extracted bundle caPath, _ := filepath.Abs("./secure-connect-frame-db/ca.crt") keyPath, _ := filepath.Abs("./secure-connect-frame-db/key") config.SslOpts = &gocql.SslOptions{ CertPath: certPath, CaPath: caPath, KeyPath: keyPath, } config.ConnectTimeout = time.Second * 6 config.ProtoVersion = 4 //Have tried all (0, 1, 2, 3, 4), to no avail! //config.CQLVersion = "3.0.0" config.Port = 30431 //From the bundle's config.json (it isn't 9042, rather 30xxx) config.Keyspace = "frame_ks" fmt.Println("Creating session") session, err := config.CreateSession() fmt.Println("That's all!") if err != nil { return nil, err } return session, nil }
Output:
Connecting to the database Creating session 2020/05/01 02:53:29 gocql: unable to dial control conn 34.74.218.22: gocql: unsupported protocol response version: 72 2020/05/01 02:53:34 gocql: unable to dial control conn 35.196.48.167: gocql: unsupported protocol response version: 72 2020/05/01 02:53:39 gocql: unable to dial control conn 35.196.198.226: gocql: unsupported protocol response version: 72
That's all
So it did discover the 3 nodes and passed auth too. It's just this protocol 72 that's annoying!!!!
On the remote, cqlsh'ing
$ show version [cqlsh 6.8.0 | DSE 6.8.0 | CQL spec 3.4.5 | DSE protocol v2]
I hope you guys come up with some workaround soon... Our whole system is in Go and we can't afford to migrate to python just to be able to connect to Astra! And Astra was such a blessing for a small team of ours that we really don't want to setup DSE on GCP ourselves!