com.couchbase.client.core.CouchbaseCore$3.handleEventException Exception while Handling Request Events RequestEvent{request=null}, com.couchbase.client.core.ServiceNotAvailableException: The Query service is not enabled or no node in the cluster supports it.
i am getting the following exception each time i am trying to use bucket.query();
when i am using bucket.query on the bean of the bucket, i am not able to query that bean ,i.e, i am not able to use bucket.query on that bean more than once.
whereas when i am opening bucket in my code using cluster bean, everything is working fine.
I need to know why??
My first attempt this morning was to try the CLI on the server… that failed due to not enabling the query checkbox on cluster creation (I am assuming from the other thread).
I then tried to run N1QL queries in Java.
I found an example in the documentation that when I ran I got the same error that akshay received.
@DavidActualX the queryEnabled is not needed if you run 4.0 beta, this setting will be deprecated for the upcoming 2.2… it was actually used to manually enabled when we were shipping N1QL binaries alongside with the server as experimental.
If you pick a 4.0 and you enable the query and index services, it will pick them up without anything to do on your side.
I understand what you are saying, but if you didn’t enable the index and query services during initial setup this queryEnabled setProperty is the only way to get passed the query service is not enabled issue.
@DavidActualX no it’s not, because this will only force the client to look on port 8093 for the query service, but if the server doesn’t have it enabled nothing is running on that port. The reason why we deprecated this option is that it is now picked up automatically through the server side config (but all of those make you need to enable the query and indexing service on the cluster).