Skip to content

Getting error 'EOF' when to read data from a bucket in CB 5.0.1 #83

@taekwonv

Description

@taekwonv

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions