Problem with bucketManager.CreateBucket

Hi @1110 this is a bug that I’ve raised an issue for https://issues.couchbase.com/browse/GOCBC-879. The problem is that you are calling the function before the cluster is actually connected properly (which happens asynchronously) so it thinks that it doesn’t support the performing operations without a bucket.

There is a workaround for this (against 6.5+) which is to use something like the following before performing any operations: err := cluster.WaitUntilReady(2*time.Second, nil). This will block for a maximum of the time specified returning either a timeout error if the timeout hit or no error if the cluster object connected successfully before the time.

1 Like