You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes the creation of a Couchbase container hangs. When making the call to create the primary index the response isn't checked. This means that any errors returned in the response body are not caught and hence the isPrimaryIndexOnline polls until the timeout. In our case this occurs if we try to create the index to early before the bucket is ready. See output from a test app with some print debugging below.
Relevant log output
starting setup
Creating primary index
{
"requestID": "fbb6b590-e549-4c3b-953b-4b35d3f8abd0",
"signature": null,
"results": [
],
"errors": [{"code":5000,"msg":"GSI CreatePrimaryIndex() - cause: Index creation for index #primary, bucket nutshell, scope _default, collection _default cannot start. Reason: Create index or Alter replica cannot proceed due to rebalance in progress..","reason":{"_level":"exception","caller":"secondary_index:413","cause":{"error":"Index creation for index #primary, bucket nutshell, scope _default, collection _default cannot start.","reason":"Create index or Alter replica cannot proceed due to rebalance in progress..","source":"CreatePrimaryIndex()"},"code":4350,"icause":"Index creation for index #primary, bucket nutshell, scope _default, collection _default cannot start. Reason: Create index or Alter replica cannot proceed due to rebalance in progress..","key":"indexing.error","message":"GSI CreatePrimaryIndex()"}}],
"status": "fatal",
"metrics": {"elapsedTime": "32.491ms","executionTime": "32.454959ms","resultCount": 0,"resultSize": 0,"serviceLoad": 2,"errorCount": 1}
}
is index online?: false
is index online?: false
is index online?: false
is index online?: false
is index online?: false
is index online?: false
is index online?: false
is index online?: false
^Csignal: interrupt
Hi yes I do work for Couchbase. Ive got a pr which just checks the response for an error and adds a backoff similar to the isPrimaryIndexOnline which seems to do the trick. Just about to put it up for review now.
It could well be but its difficult to know without actually seeing the response. The issue is the cluster does an initial rebalance on start up when adding services which needs to finish before we can do anything with it.
Testcontainers version
0.32.0
Using the latest Testcontainers version?
Yes
Host OS
macOS Sonoma
Host arch
ARM
Go version
1.22.2
Docker version
Client: Version: 27.0.3 API version: 1.46 Go version: go1.21.11 Git commit: 7d4bcd8 Built: Fri Jun 28 23:59:41 2024 OS/Arch: darwin/arm64 Context: desktop-linux Server: Docker Desktop 4.32.0 (157355) Engine: Version: 27.0.3 API version: 1.46 (minimum version 1.24) Go version: go1.21.11 Git commit: 662f78c Built: Sat Jun 29 00:02:44 2024 OS/Arch: linux/arm64 Experimental: false containerd: Version: 1.7.18 GitCommit: ae71819c4f5e67bb4d5ae76a6b735f29cc25774e runc: Version: 1.7.18 GitCommit: v1.1.13-0-g58aa920 docker-init: Version: 0.19.0 GitCommit: de40ad0
Docker info
What happened?
Sometimes the creation of a Couchbase container hangs. When making the call to create the primary index the response isn't checked. This means that any errors returned in the response body are not caught and hence the
isPrimaryIndexOnline
polls until the timeout. In our case this occurs if we try to create the index to early before the bucket is ready. See output from a test app with some print debugging below.Relevant log output
Additional information
No response
The text was updated successfully, but these errors were encountered: