Description
Description
I am trying to run sample Ruby SDK code to fetch a document from a bucket against a Capella cluster. The script fails everytime with following error.
[2023-01-23 15:02:09.484] [52574,11621318] [error] 0ms, [8e83b051-2bfe-4420-359b-31fbf1f2ee41/bb33e37d-90e0-455e-b60e-0eb38a56916e/tls/-] <fopyongbf4mp5lyu.8v34feikfgwhshgw.nonprod-project-avengers.com:11207> no more endpoints left to connect, will try another address |
[2023-01-23 15:02:09.556] [52574,11621318] [critical] 0ms, Caught unhandled std::exception-derived exception. what(): The state of the promise has already been set. |
/usr/local/lib/ruby/gems/3.2.0/gems/couchbase-3.3.0/lib/couchbase/cluster.rb:419:in `open': unable open cluster at cb.8v34feikfgwhshgw.nonprod-project-avengers.com: unambiguous_timeout (Couchbase::Error::UnambiguousTimeout) |
Following is the sample code which I am trying to execute against a Capella cluster.
require "couchbase" |
include Couchbase
|
|
options = Cluster::ClusterOptions.new |
options.authenticate("<username>", "<password>") |
cluster = Cluster.connect("couchbases://<connection string>", options) |
|
bucket = cluster.bucket("travel-sample") |
collection = bucket.default_collection
|
|
begin
|
get_result = collection.get("airline_10") |
puts get_result.content
|
rescue Couchbase::Error::DocumentNotFound => ex
|
puts "Document not found!" |
end
|
I have also attached output from debug logging to this ticket.
debug-logging-output.txt
In order to make sure that this is not a setup issue from my end, I also ran Ruby SDK sample code from Couchbase playground application where the execution failed with same error.