Queries to newly installed cluster fail

Fresh installed community edition 7.1.1 in docker.
Host system: Ubuntu 22.04.1 LTS

Query from UI:
SELECT * FROM system:completed_requests
The result after timeout:
{"status": "Failure contacting server."}

Query from Go SDK:
ambiguous timeout | {\"InnerError\":{\"InnerError\":{\"InnerError\":{},\"Message\":\"ambiguous timeout\"}},\"OperationID\":\"http\",\"Opaque\":\"fcc61c26-387d-465b-8c76-9efa1b85f149\",\"TimeObserved\":311321,\"RetryReasons\":null,\"RetryAttempts\":0,\"LastDispatchedTo\":\"http://cb-2ms.activecdn.net:8093\",\"LastDispatchedFrom\":\"\",\"LastConnectionID\":\"\"} | {\"statement\":\"SELECT META(t1).id, t1.*\\n\\t\\tFROM activecdn._default.entries AS t1\\n\\t\\tWHERE request_key = $1\\n\\t\\tORDER BY created DESC\",\"client_context_id\":\"fcc61c26-387d-465b-8c76-9efa1b85f149\"}

But records successfully create via Go SDK.

Where should I find the root of problem? In log directory so many different log-files, but I can’t find something helpful there.

Hi @dtelyukh welcome to couchbase forums. I suspect that your cluster was created without a query service. In the UI under Dashboard, click on “Servers” - under the Services column does it show a “query” service?

Query service exists
Screenshot

Are all the client-to-node ports mapped in docker? The unencrypted query port is 8093.

Yes, they are

        ports:
            - 8091:8091
            - 8092:8092
            - 8093:8093
            - 8094:8094
            - 11210:11210

Query from application outside docker (error 503, not timeout):

{
  "statement": "SELECT META(t1).id, t1.*\n\t\tFROM activecdn._default.entries AS t1\n\t\tWHERE request_key = $1\n\t\tORDER BY created DESC",
  "client_context_id": "4b9a2824-f162-4a84-9856-f8278d7e5ca6",
  "http_status_code": 503
}

What does this give:

curl -v http://<couchbasehost>:8093/query/service -u Administrator:password -d “statement=SELECT 1”

Maybe there is some diagnostic information in the query log file?

query.log - it should be in a directory like $HOME//Library/Application Support/Couchbase/var/lib/couchbase/logs

Searching the couchbase issues database, I found an issue with query on Ubuntu 20 in 7.1.1. I assume the same issue exists on Ubuntu 22. Checking to see what the solution is…

Can you check in the Web UI → Query → Monitor tab. Does it show the failed queries as active? If so, that is likely https://issues.couchbase.com/browse/MB-54043 . There does not appear to be any Community Edition containing the fix yet.

  • Mike

Make sure 8093 port is open

MB-54043 kill cbq-engine process it will restart and should work.

Can you check in the Web UI → Query → Monitor tab. Does it show the failed queries as active? If so, that is likely https://issues.couchbase.com/browse/MB-54043 . There does not appear to be any Community Edition containing the fix yet.

No, it doesn’t :frowning: Still, this is probably this bug or another.

kill cbq-engine process it will restart and should work.

It helped. Thank you

P.S. After few seconds the problem came back :frowning:

What does this give:
curl -v http://:8093/query/service -u Administrator:password -d “statement=SELECT 1”

* Mark bundle as not supporting multiuse
< HTTP/1.1 503 Service Unavailable
< Content-Type: application/json; version=7.1.1-N1QL
< Date: Mon, 26 Dec 2022 07:21:09 GMT
< Content-Length: 0
< 
* Connection #0 to host *** left intact

but after restarting cbq-engine and coming back of the problem the same request hanged

https://issues.couchbase.com/browse/MB-54043 . There does not appear to be any Community Edition containing the fix yet.