Python sdk error connect to Couchbase

Hi All,

I’m using Couchbase CE 6.5.1 and python sdk 3.8.2
Here’s my code snippet :

echo “from couchbase.cluster import Cluster, ClusterOptions
from couchbase.auth import PasswordAuthenticator
from couchbase.cluster import QueryOptions
cluster = Cluster(‘couchbase://xx.xx.xx.xx’, ClusterOptions(PasswordAuthenticator(‘xxxx’, ‘xxxx’)))
cb = cluster.bucket(‘bucket’)
result = cluster.query(“SELECT 1=1”, QueryOptions(metrics=True))
print(“Execution time: {}”.format(result.metadata().metrics().execution_time()))” >

In my lower env, it has no issue.
But in my production, it get this error :

Traceback (most recent call last):
File “”, line 8, in
for row in row_iter: print(row)
File “/usr/local/lib/python3.8/site-packages/couchbase_core/”, line 279, in iter
next_item = next(parent_iter)
File “/usr/local/lib/python3.8/site-packages/couchbase_core/”, line 582, in iter
File “/usr/local/lib/python3.8/site-packages/couchbase_core/”, line 477, in _start
self._mres = self._submit_query()
File “/usr/local/lib/python3.8/site-packages/couchbase_core/”, line 468, in _submit_query
return self._parent._n1ql_query(self._params.encoded,
couchbase.exceptions.NotSupportedException: <RC=0xD6[LCB_ERR_UNSUPPORTED_OPERATION (214)], Couldn’t schedule n1ql query, C Source=(src/n1ql.c,475)>

I have checked the firewall and telnet, seems fine.
Is there any solution for this?
How to troubleshoot this issue?

Although I don’t have direct answers to your questions, I’d like to introduce SDK Doctor in case you haven’t checked it.

I hope this helps.
(Even if you cannot find the solution with the tool, I think it’ll become easier to get experts feedback by sharing the general output from the tool.)

Hi @Han_Chris1,

Could you share the code snippet that you are running in your production environment? It looks different from the one you shared. For example, the error refers to line 8 with row_iter which is not in the code snippet.

You can also check the connectivity issues with SDK Doctor as @YoshiyukiKono suggested.