Cannot query nodes with 2.0.3 version of golang SDK

Description

we ran into an issue with the 2.0.3 golang SDK for running queries
Code for it
// Use query
fmt.Println("Querying data")
queryStr := "SELECT * FROM " + bucketName + " WHERE $1 IN interests"
params := make(map[string]interface{}, 1)
params["interest"] = "African Swallows"
fmt.Println(queryStr)
qr, err := cluster.Query(queryStr, &gocb.QueryOptions{NamedParameters: params})
// rows, err := bucket.ExecuteN1qlQuery(query)
if err != nil {
fmt.Println(err)
os.Exit(1)
}
var row interface{}
for qr.Next() {
err := qr.Row(&row)
if err != nil {
fmt.Printf("row error: %s\n", err)
os.Exit(1)
}
fmt.Printf("result: %s\n", row)
}
This gave this error
Post http://cb-0000.cb.ceced4a6-505d-49cc-a9a1-6d6a27a766cf.dataplane.nonprod-project-avengers.com:18093/query/service: net/http: HTTP/1.x transport connection broken: malformed HTTP response “\x15\x03\x01\x00\x02\x02\x16” | {“statement”:“PREPARE SELECT * FROM Couchbase_Cloud_Bucket WHERE $1 IN interests”,“client_context_id”:“1108bd5d-b30c-4a6d-8c63-b0604d101633”,“endpoint”:“http://cb-0000.cb.ceced4a6-505d-49cc-a9a1-6d6a27a766cf.dataplane.nonprod-project-avengers.com:18093”}
exit status 1expected it to post to https instead of http.

Cluster connection details
endpoint := "cb.ceced4a6-505d-49cc-a9a1-6d6a27a766cf.dataplane.nonprod-project-avengers.com"
bucketName := "Couchbase_Cloud_Bucket"
username := "iegomez"
password := "password1"
// bucketName := "thor"
cluster, err := gocb.Connect(
"couchbases://"endpoint"?ssl=no_verify",
gocb.ClusterOptions{
Username: username,
Password: password,
})
if err != nil {
panic(err)
}

Environment

None

Gerrit Reviews

None

Release Notes Description

None

Activity

Show:

CB robot November 11, 2020 at 11:43 AM

Build sync_gateway-3.0.0-52 contains gocbcore commit ac4efa4 with commit message:
: If ssl is enabled then use https for http endpoints

CB robot May 13, 2020 at 9:11 AM

Build couchbase-server-6.6.0-7624 contains gocbcore commit ac4efa4 with commit message:
: If ssl is enabled then use https for http endpoints

CB robot April 22, 2020 at 8:54 AM

Build couchbase-server-7.0.0-1878 contains gocbcore commit ac4efa4 with commit message:
: If ssl is enabled then use https for http endpoints

Fixed
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Story Points

Components

Fix versions

Priority

Instabug

Open Instabug

PagerDuty

Sentry

Zendesk Support

Created March 31, 2020 at 6:07 AM
Updated November 11, 2020 at 11:43 AM
Resolved April 2, 2020 at 8:09 AM
Instabug