Cannot connect to bucket using n1ql in couchbase v4.6

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://”);
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(“”);
  2. var cluster = new couchbase.Cluster(“”); // sample by IP address

Hey @nacion.emelson,

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

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

Cheers, Brett