GENERIC Couchbase error! N1qlMetrics

Getting a transient issue for couchbase 5.0.1 with spring boot:
GENERIC Couchbase error!!! N1qlMetrics{resultCount=0, errorCount=0, warningCount=0, mutationCount=0, sortCount=0, resultSize=0, elapsedTime=‘12.202461ms’, executionTime=‘12.159354ms’} | status: closed

Did you tried same query using in Query Work Bench or cbq shell or REST API

Yes the query is running successfully from CB console. Actually the status of N1qlQueryResult object ststus is coming CLOSED.

What could be reason for for status CLOSED in N1qlQueryResult object ?

The issue is coming in this sample code when calling couchbaseBucket.query()

public List execute(String query, ScanConsistency scanConsistency) {
final Bucket couchbaseBucket = getSampleCouchbaseBucket(); // get couchbase bucket here
final N1qlQueryResult result = couchbaseBucket.query(N1qlQuery.simple(query, N1qlParams.build().consistency(ScanConsistency.NOT_BOUNDED)));

    if (!SUCCESS.equals(result.status())) {
        throw new RuntimeException(//get errors here);
    }
    return result.allRows();
}

“Closed” status means client is closed the connection. cc @marcoeg