Couchbase: Cannot perform operations on a shutdown bucket

前端 未结 5 1014
南方客
南方客 2021-01-06 12:06

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

C:\\Users\\Administrator\\Desktop\\node_modules\\couc

相关标签:
5条回答
  • 2021-01-06 12:12

    I got the error in 2019, I resolved it by authenticating my cluster as now authorization should only be granted at cluster level but no need for bucket level authorization.

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

    0 讨论(0)
  • 2021-01-06 12:13

    You need to authenticate using USERNAME and PASSWORD, incase you setup a custom cluster. So, in the code ...

    var myCluster = new Couchbase.Cluster('couchbase://10.0.0.103,10.0.0.102,10.0.0.101,');
    myCluster.authenticate('Administrator', 'adminadmin'); // Add this credential
    
    var myBucket = myCluster.openBucket('rre');
    

    By default, the USERNAME is Administrator and PASSWORD will be the cluster password(adminadmin, in my case).

    P.S.-This solution is in particular to Error: cannot perform operations on a shutdown bucket

    0 讨论(0)
  • 2021-01-06 12:15

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

    0 讨论(0)
  • 2021-01-06 12:15

    This error may also happen when there is a password set for the specified bucket.

    To verify that open the Couchbase Console -> Navigate to the Data Buckets tab -> Drop-down your bucket -> Click the Edit button -> The third section in the popup dialog is Access Control, which has a password textbox.

    Hope this helps,

    György

    0 讨论(0)
  • 2021-01-06 12:17

    You need to check the compatibility between the couchbase server version and the couchbase npm package version.

    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 was simply downgrading the couchbase npm package back to 2.5.1 with: npm i --save couchbase@2.5.1.

    Or you can upgrade the couchbase server version (haven't tested).

    0 讨论(0)
提交回复
热议问题