Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
taekwonv opened this issue Dec 22, 2017 · 0 comments
Open

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

taekwonv opened this issue Dec 22, 2017 · 0 comments

Comments

@taekwonv
Copy link

taekwonv commented Dec 22, 2017

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'
}

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant