Cannot connect to bucket using n1ql in couchbase v4.6


#1

I can’t connect to couchbase v4.6.

Im using Node js sdk and I initialize my cluster / bucket as follows:

var cluster = new couchbase.Cluster(“couchbase://mydbserverurl.com”);
cluster.authenticate(“Admin”, “Password”);
var bucket = cluster.openBucket(“myBucket”);

and try to insert:

bucket.insert(“sampleID”, {“channels”: ["A, CSB], “name”: “SAMPLE”}, function(err, result) {
if(err){ callback(null, err); }
callback(null, result);
});

It returns an error “cannot perform operations on a shutdown bucket”

Ive tried the same way to other couchbase server with 5.0 version and it works.

PS: Ive also tried

  1. var cluster = new couchbase.Cluster(“mydbserverurl.com”);
  2. var cluster = new couchbase.Cluster(“192.152.5.1”); // sample by IP address

#2

Hey @nacion.emelson,

You may want to try using legacy authentication with a 4.6 server, for instance:

var cluster = new couchbase.Cluster('couchbase://mydbserverurl.com');
var bucket = cluster.openBucket('myBucket', 'maybeAPasswordMaybeBlank');

Cheers, Brett