Hi,
I’m trying to query a view using nodejs (couchbase@2.4.3) on couchbase server community edition 5.0
I keep getting this error:
{ Error: unknown error : error parsing failed at ..../node_modules/couchbase/lib/bucket.js:523:17 responseBody: null } null
here is my testing code:
const config = require(‘…/config/torus_server_config.js’);
const _database = require(‘…/controllers/dbControllers.js’);
let ViewQuery = _database.ViewQuery;
console.log(ViewQuery);
var query = ViewQuery.from(‘stats’, ‘user_main_stats’);
setTimeout(() => {
console.log(“start”, query);/buckest are created in dbcontrollers by cluster.openBucket after connecting and auth to the cluster/
_database.buckets.users.query(query, function(err, res) {
console.log(“loggin err res in querying views”, err, res);
if (err) {
return console.log(err);
}
for (i in res) {
console.log(res[i]);
}
});}, 10000);
views are in production on a single node couchbase server 5.0
I really canno understand what is wrong. I’ve just made a simple test using code from examples here: Couchbase SDKs
can someone help?
thanks
UPDATE!!!
I’m really sorry, port 8092 was blocked by the firewall.
I apologize for this.