Couchbase: cannot perform operations in shutdown slave

I am getting this error when trying to insert 2M objects via node.js into Couchbase. 1M works great.

C: \ Users \ Administrator \ Desktop \ node_modules \ couchbase \ Lib \ bucket.js: 728 throw new Error ("cannot perform shutdown bucket operations");

I am using Couchbase 3.0.1, node.js 2.0.2 SDK.

This is the code:

     var Couchbase = require('couchbase');

var myCluster = new Couchbase.Cluster('couchbase://10.0.0.103,10.0.0.102,10.0.0.101,');

var myBucket = myCluster.openBucket('rre');


   for (var i = 0;i<1000000;i++)
   {





    myBucket.insert('dwhtryrdue_'+i,  {
    "guid": "003dddbf-da50-46d4-a2aa-319677b5d2be",
    "CampaignID": 22,
    "ZoneID": 29,
    "AdvertiserID": 30,
    "BannerID": 36,
    "UserID": 32,
    "ClickIP": "Bette",
    "ClickHost": "Jerry",
    "ClickReferringURL": "Dejesus",
    "ClickDateTime": "2014-06-09T12:53:22 -00:00",
    "ClickCountry": "Central African Republic",
    "ClickState": "Kentucky",
    "ClickBrowser": "Chrome"
    }, function(err, res) {

    });

    }

      

+2


source to share


4 answers


Fixed the issue by increasing the timeout: myBucket.operationTimeout = 120 * 1000;



+4


source


This error can also occur if a password has been set for the specified bucket.

To make sure the Couchbase console is open -> Go to Data Buckets tab -> Dropdown menu -> Click "Edit" -> The third section in the popup dialog - "Access Control", which has a password text field.



Hope it helps,

Gyrd

+5


source


You need to check compatibility between couchbase server

and couchbase npm package

.

On my machine:

  1. The couchbase server was 4.5.1-2844 Enterprise Edition (build-2844)

    .
  2. The couchbase npm package version was 4.6.2

    .

My soluton simply lowered npm package from couchbase up 2.5.1

with: npm --save couchbase@2.5.1

.

Or you can upgrade your couchbase server version (not tested).

0


source


I got an error in 2019, fixed it by authenticating my cluster, as now authorization should only be provided at the cluster level, but no segment level authorization is required.

"cluster.authenticate ('usernameForCluster', 'passwordForCluster');"

0


source







All Articles