Description
When using the golang SDK 1.x version, we are not able to connect to the Couchbase Cluster with SRV Record. This is needed for Sync Gateway to connect to a Couchbase cloud spawned cluster.
Wondering if i am missing something.
Code for the following
endpoint := " cb.329c5386-0894-4e31-9a0f-f886b09b4a3d.dp.cloud.couchbase.com"
bucketName := "Couchbase_Cloud_Bucket"
cluster, err := gocb.Connect("couchbases://" + endpoint + "?ssl=no_verify")
if err != nil
username := "manirahul"
password := "Welcome!2020"
_ = cluster.Authenticate(gocb.PasswordAuthenticator{ Username: username, Password: password, })
_, err = cluster.OpenBucket(bucketName, "")
if err != nil { fmt.Println(err) os.Exit(1) }
fmt.Println("Connected..")
This works with Golang SDK 2.0
Error is
panic: failed to connect to any of the specified hosts