couchbase.exceptions.AuthenticationException in Pyhton SDK couchbase==4.1.0

I got Authentication error when I try to connect to couchbase server. The error show look like below:

couchbase.exceptions.AuthenticationException: <RC=0xCE[LCB_ERR_AUTHENTICATION_FAILURE (206)], There was a problem while trying to send/receive your request over the network. This may be a result of a bad network or a misconfigured client or server, C Sour

the code structure is here:

 db_info = {'host': 'couchbase://{host}', 'secure': False,'bucket_name': 'default','username': 'Administrator','password': 'password'}
 auth = PasswordAuthenticator(db_info['username'], db_info['password'])
 cluster = Cluster(db_info['host'], authenticator=auth)
 bm = cluster.buckets()

Your suggestion is highly appreciated!!! @ellis.breen

Hi @mayyi,

You could enable logging to see if there’s any useful information there, see here for more information.

It might also be worth checking if your server is generally reachable from your client, if it has an IP address allowlist or something similar.

SDK Doctor is useful for diagnosing SDK connectivity issues. SDK Doctor | Couchbase Docs