Want to turn on query services on server to run N1QL

I am unable to run N1QL queries on my ubuntu couchbase cloud server.

When I run
couchbase-cli cluster-edit -c localhost:8091 -u admin -p pass --services=data,index,query
, it keeps giving me :
ERROR: command: cluster-edit: localhost:8091, local variable 'output_result' referenced before assignment.
I run the latest version of couchbase and want to use N1QL queries for my cloud asap.

Generally, when I open the couchbase client and click on the Query tag, it states that “No query nodes were found on this cluster, so N1QL querying is not possible” and I want to fix this asap as it would not even let me access the cbq tools.

Thanks for reading!

I don’t believe you can add services after the fact. @anil?

Hi @jonathan.ling:

Your cluster was set up without a query service. If it’s a multi-node service, remove a node and add it back with a query service. If you only have a single machine available (say your laptop) you’ll need to tear down the instance and restart (simplest way is to uninstall and reinstall) making sure to include a query service during set up. (In the UI the query service is included by default.)

As Gerald mentions, we don’t support adding services to already provisioned nodes – they can only be added via node addition.


1 Like

Hi Davef,

Is this still true? I’m running couchbase on my laptop and localhost it is.
I cant query my localhost:8091,
My query:
http://localhost:8091/query/service?statement='SELECT meta().id FROM travel-sample WHERE type = “hotel” and meta().id LIKE “hotel_1002”’

response: Not Found

Use query service port (8093)

1 Like