-
Notifications
You must be signed in to change notification settings - Fork 87
Open
Description
Hello,
I recently built a new Couchbase server (community 5.0.1) and started getting an error when I tried to read any item in my bucket. The code shown below is a simple test code to read data from CB, it works well with CB 4.5. However, EOF error when it calls 'bucket.Get' consists with CB 5.0.1, the only difference from the code is authentication part since CB 5.0 requires using authentication. Would this be my fault or something that go-couchbase does not support with 5.0.1?
Thanks!
func main() {
c, err := couchbase.Connect("http://test1:test123@mycouchbase:8091/") // CB 5.0.1
// c, err := couchbase.Connect("http://@mycouchbase:8091/") // CB 4.5
if err != nil {
log.Fatalf("Error connecting: %v", err)
}
pool, err := c.GetPool("default")
if err != nil {
log.Fatalf("Error getting pool: %v", err)
}
bucket, err := pool.GetBucket("Mybucket")
if err != nil {
log.Fatalf("Error getting bucket: %v", err)
}
val := make(map[string]interface{})
err = bucket.Get("mykey1", &val)
if err != nil {
log.Fatalf("Error getting data from bucket: %v", err) // <- Error 'EOF'
}
}
Metadata
Metadata
Assignees
Labels
No labels