Hi,
I’m working on a Ubuntu 18.04 LTS machine. Couchbase (6.6) runs via minikube with Kubernetes.
When I try to query with Python:
from couchbase.cluster import Cluster, ClusterOptions, QueryOptions
from couchbase.auth import PasswordAuthenticator
cluster = Cluster("couchbase://localhost", ClusterOptions(PasswordAuthenticator("Administrator", "password")))
cb = cluster.bucket("default")
cb_coll = cb.default_collection()
result = cluster.query("SELECT * FROM 'default' WHERE age > 0")
for row in result:
print(row)
The loop throws the following error:`
Traceback (most recent call last):
File "/home/sa6/Documents/Python/ML Course/couchbaseTest.py", line 19, in <module>
for row in result:
File "/home/sa6/.local/lib/python3.6/site-packages/couchbase_core/__init__.py", line 279, in __iter__
next_item = next(parent_iter)
File "/home/sa6/.local/lib/python3.6/site-packages/couchbase_core/n1ql.py", line 530, in __iter__
self._start()
File "/home/sa6/.local/lib/python3.6/site-packages/couchbase_core/n1ql.py", line 425, in _start
self._mres = self._submit_query()
File "/home/sa6/.local/lib/python3.6/site-packages/couchbase_core/n1ql.py", line 419, in _submit_query
cross_bucket=self._params.cross_bucket)
couchbase.exceptions.NotSupportedException: <RC=0xD6[LCB_ERR_UNSUPPORTED_OPERATION (214)], Couldn't schedule n1ql query, C Source=(src/n1ql.c,493)>
yaml file:
apiVersion: v1
kind: Secret
metadata:
name: cb-nativa-auth
type: Opaque
data:
username: QWRtaW5pc3RyYXRvcg== # Administrator
password: cGFzc3dvcmQ= # password
---
apiVersion: couchbase.com/v2
kind: CouchbaseBucket
metadata:
name: default
spec:
memoryQuota: 128Mi
---
apiVersion: couchbase.com/v2
kind: CouchbaseCluster
metadata:
name: cb-nativa
spec:
image: couchbase/server:6.6.0
security:
adminSecret: cb-nativa-auth
networking:
exposeAdminConsole: true
adminConsoleServices:
- data
cluster:
dataServiceMemoryQuota: 256Mi
indexServiceMemoryQuota: 256Mi
searchServiceMemoryQuota: 512Mi
eventingServiceMemoryQuota: 256Mi
analyticsServiceMemoryQuota: 1024Mi
indexStorageSetting: memory_optimized
autoFailoverTimeout: 120s
autoFailoverMaxCount: 3
autoFailoverOnDataDiskIssues: true
autoFailoverOnDataDiskIssuesTimePeriod: 120s
autoFailoverServerGroup: false
buckets:
managed: true
memoryQuota: 1024
servers:
- size: 3
name: data_service
services:
- data
- size: 1
name: index_query_service
services:
- index
- query
- size: 1
name: analytics_service
services:
- analytics
Python 3.6.9
couchbase 3.0.8
If I go to the UI I can execute the same query easily… Any idea please?