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
var row interface{}
for qr.Next() {
err := qr.Row(&row)
if err != nil
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” |
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
)
if err != nil
Attachments
For Gerrit Dashboard: GOCBC-838 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
124580,3 | GOCBC-838: If ssl is enabled then use https for http endpoints | master | gocbcore | Status: MERGED | +2 | +1 |
138470,4 | Update agent_diag.go | master | gocbcore | Status: ABANDONED | -1 | 0 |