The above command will resolve the SRV record to individual hosts in the cluster. The hosts can be then be used to connect to the cluster through curl for example.
When using the most recent version of all our SDKs you can use the SRV record in the connection string and the SDK will resolve the SRV record to a host in the cluster, this is outlined in our documentation, for example here for the go sdk: Start Using the Go SDK | Couchbase Docs.
yes, i can get the cluster host by nslookup,
but when i use the SRV record in go lastest sdk to connect the cluster server,
i had add my ip to allowed ip list, it always timeout err
like this:
unambiguous timeout | {“InnerError”:{“InnerError”:{“InnerError”:{},“Message”:“unambiguous timeout”}},“OperationID”:“WaitUntilReady”,“Opaque”:"",“TimeObserved”:5000264187,“RetryReasons”:[“NOT_READY”,“CONNECTION_ERROR”],“RetryAttempts”:12,“LastDispatchedTo”:"",“LastDispatchedFrom”:"",“LastConnectionID”:""}
Thanks for sharing the timeout error. However it will be helpful if you could provide actual SDK logs for us to debug it further.
Have you tried validating the connectivity using the SDK Doctor? This will at least help us see whether the connectivity to Capella works in the general case.
You can also try reading this about managing connections and use CA certificate to connect to the cluster.
Please feel free to reply if you need further help on this.
thank you very much! i use the couchbase doctor connect success and use the go-sdk/v2 is success too.
but when i use the curl command in the linux shell to connect the cluster host,it sitll can not access
My suggestion is to use port 18091 instead of 11207 because 11207 is for data traffic by the SDKs and does not respond to http requests. You also need to use https since all Capella traffic is encrypted.
Please take note that you may also need to apply -k to the curl command to disable SSL checking if you haven’t added the root certificate to your local machine.
You may also find this article helpful which shows all the compatible SDK versions supported by Capella. For Go, it specifically mentioned the following:
With Go 1.6, which does not have the Alternate Address feature, you need to use ?network=default in the connection string.