couchbase.exceptions.UnAmbiguousTimeoutException:

raise ErrorMapper.build_exception(ret)
couchbase.exceptions.UnAmbiguousTimeoutException: UnAmbiguousTimeoutException(<ec=14, category=couchbase.common, message=unambiguous_timeout (14), C Source=C:\Jenkins\workspace\python\sdk\python-packaging-pipeline\py-client\src\connection.cxx:202>)

trying to connect the capella couchbase DB server using python getting this error
COUCHBASE_URL = ‘cb.couchbases://cb..cloud.couchbase.com’
COUCHBASE_BUCKET = ‘sample’
COUCHBASE_USERNAME = ‘sample’
COUCHBASE_PASSWORD = ‘Pwd’
python version 3.10

The operation could not be compled within the timeout. Probably because the client could not connect to the server. If there is insufficient information in the exception, use SDK Doctor to diagnose, running from the same location as the client application. A common problem is that the client ip has not been added to Allowed IPs

To add to what Michael says, the “cb.” at the front of the connection string doesn’t look correct - a connection string starts with just “couchbases://”

1 Like

without cb. also getting same error
COUCHBASE_URL = ‘couchbases://cb..cloud.couchbase.com’
from couchbase.cluster import Cluster, ClusterOptions
from couchbase.auth import PasswordAuthenticator
import json
from couchbase.options import ClusterTimeoutOptions
from datetime import timedelta

Connect to Couchbase cluster

cluster = Cluster(settings.COUCHBASE_URL, ClusterOptions(
PasswordAuthenticator(settings.COUCHBASE_USERNAME, settings.COUCHBASE_PASSWORD),
timeout_options=ClusterTimeoutOptions(kv_timeout=timedelta(seconds=20))
))
#Open a bucket
bucket = cluster.bucket(settings.COUCHBASE_BUCKET)

Get a collection from the bucket

collection = bucket.default_collection()
here iam using capella couchbase Db free trail account.
anything need to add
or any other steps to connect.

The operation could not be compled within the timeout. Probably because the client could not connect to the server. If there is insufficient information in the exception, use SDK Doctor to diagnose, running from the same location as the client application. A common problem is that the client ip has not been added to Allowed IPs

thank you mreiche . it’s working now. after adding ip address

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.