[Couchbase Capella]: Curl timeout when using couchbases schema

When running a curl command to a local couchbase server for rebalance endpoint, it works (given username and password are both couchbase ).

curl  -u couchbase:couchbase -X GET http://127.0.0.1:8091/pools/default/rebalanceProgress

When I uses couchbase capella url (svc-***.cloud.couchbase.com), It does not work. What am I missing ?

the svc name, when prefixed with _couchbase._tcp., (or _couchbases._tcp. for tls) can be used to to lookup the SRV DNS records for the nodes in the cluster. Then you can curl to those services that are http/s. Be sure that you have added your client to Allowed IPs on Capella. If you would just like to check connectivity, SDK Doctor is a better option. It does the lookup for you. The SDKs have the default Capella root certificate built-in, I believe that SDK Doctor has it as well.

Thanks for your reply.
In fact I am looking to check if the node is in rebalance or not. If it is the case, then I want to set the spring boot couchbase health indicator to down until the rebalance finish.
Can you please give me a full curl command ?

@amir_choubani, Here is a link to a Google Doc with steps to get from SRV DNS Record to Node Names.

1 Like

Thanks. I will try it

  1. A properly defined and sized couchbase cluster should work fine during rebalance.
  2. I don’t believe the Health Check status can be set.

/pools/default/rebalanceProgress endpoint returns if the couchbase server is in rebalance or not, Am I wrong ?

In that case, spring boot application throw a timeout exception somewhere saying it is unable to connect to couchbase. Looking at couchbase logs, the reason is the rebalance.

Please show the exception and logging.
While the Couchbase SDK may log a timeout during a rebalance, it should be automatically retried on an active node.

Here is an example of exception log:

c.c.c.c.e.UnambiguousTimeoutException: GetRequest, Reason: TIMEOUT {"cancelled":true,"completed":true,"coreId":"0x2c73426900000001","idempotent":true,"lastDispatchedTo":"svc-d-node-003.eyzzxl7n9mahkrjl.cloud.couchbase.com","reason":"TIMEOUT","requestId":5393539,"requestType":"GetRequest","retried":14,"retryReasons":["ENDPOINT_NOT_AVAILABLE"],"service":{"bucket":"my_bucket_name","collection":"my_collection_name","documentId":"my_document_id","opaque":"0x524d4e","scope":"_default","type":"kv","vbucket":984},"timeoutMs":2500,"timings":{"totalMicros":2501333}}
	at c.c.c.core.msg.BaseRequest.cancel(BaseRequest.java:184)
	at c.c.client.core.msg.Request.cancel(Request.java:71)
	at c.couchbase.client.core.Timer.lambda$register$2(Timer.java:172)
	at c.c.c.c.d.i.n.u.HashedWheelTimer$HashedWheelTimeout.run(HashedWheelTimer.java:715)
	at c.c.c.c.d.i.n.u.c.ImmediateExecutor.execute(ImmediateExecutor.java:34)
	at c.c.c.c.d.i.n.u.HashedWheelTimer$HashedWheelTimeout.expire(HashedWheelTimer.java:703)
	at c.c.c.c.d.i.n.u.HashedWheelTimer$HashedWheelBucket.expireTimeouts(HashedWheelTimer.java:790)

That shouldn’t happen. Can you open case with customer support?

I do not know how to open case.
Thank you anyway