Unable to perform operations on an external couchbase server


#1

Hi,

I am using Couchbase Server which is hosted on an external server. I am able to connect to the external server but not able to perform any operations on the server. I am using N1ql queries and nodejs sdk to perform the operations.
This is my dbConfig file: //CouchBase DB configuration like connecting to cluster and bucket

var Couchbase = require("couchbase");

let cluster = new Couchbase.Cluster("couchbase://IP_ADDRESS/");
cluster.authenticate("USERNAME", "PASSWORD");
let bucketName = "BUCKETNAME";
let bucket = cluster.openBucket(bucketName, function(err, data) {
  if (err) {
    console.log("Unable to Connect to Couchbase", err);
  } else {
    console.log(`Connected to Couchbase bucket ${bucketName}`);
  }
});

bucket.operationTimeout = 200000;

module.exports = {
  bucket
};

First I was not using bucket.operationTimeout command and I was getting operationTimeOut error.
Secondly I used bucket.operationTimeout = 5000 I got same error
Thirdly I used the above command I got Generic network failure error and I get this response after a long time.

Any help would be helpful.


#2

Issue Resolved
The ports required by couchbase server were blocked by firewall. So after disabling firewall I was able to perform operations.