Data unable to insert in deployment server - context: KeyValueErrorContext - status_code: 4

Hi All,

I am tried with some basic operation my deployment server. we facing issue data insert.

We have 8 couchbase servers
4 - data node, 2- index node, 2 - query node

and we opened below ports for node to application communications,
8091-8096,11210

We can connect with single node, connection string - couchbase://88.xx.xx.xx, able to connect cluster on single node, but multiple node connect string throw cluster failed to connect error for cluster connection. so we tried with single data node connection.

Get below error for ,
at _getWrappedErr (D:\node\API\node_modules\couchbase\lib\errors.js:816:14)
at Object.wrapLcbErr (D:\node\API\node_modules\couchbase\lib\errors.js:1009:20) at D:\node\API\node_modules\couchbase\lib\collection.js:572:24 {
cause: LibcouchbaseError { code: 201 },
context: KeyValueErrorContext {
status_code: 4,
opaque: 0,
cas: CbCas { ‘0’: <Buffer 00 00 00 00 00 00 00 00> },
key: ‘airline_88331’,
bucket: ‘DataSystems’,
collection: ‘’,
scope: ‘’,
context: ‘’,
ref: ‘’
}

Please tell me, anything need to change server side or any problem on connection string.

Thanks

Hello @Rajasekar I am assuming its the same question that you had on the Ottoman issues channel on Github ?
Are you seeing issues when running node.js application? Can you share the GitHub code or code snippet ? And the version you are using is it same as CE 6.5.1 with Node SDK 3.1.1 ?

Please re-run with the environment variable DEBUG=* to get more information about the error.

2 Likes

@AV25242 that was different issue on my local setup and i update the issue logs on ottoman channel, please check, Thanks

Hi @mreiche / @AV25242 ,

Please find dubug mode error logs,

C:\Jenkins\workspace\nodejs\couchnode\couchnode-scripted-build-pipeline\couchnode\deps\lcb\src\mcserver\negotiate.cc:311) xx.xx.yy.zz:11210 (CTX=00000242F302EBA0,sasl,SASLREQ=00000242F30508A0) SASL PLAIN authentication is not allowed on non-TLS connections +6ms
couchnode:lcb:error (bootstrap @ C:\Jenkins\workspace\nodejs\couchnode\couchnode-scripted-build-pipeline\couchnode\deps\lcb\src\bootstrap.cc:198) Failed to bootstrap client=00000242F3054BE0. Error=LCB_ERR_TIMEOUT (201) (Last=LCB_ERR_TIMEOUT (201)), Message=Failed to bootstrap in time +985ms
couchnode failed to connect to bucket: [Error: LCB_ERR_TIMEOUT (201): The request was not completed by the user-defined timeout] {
couchnode code: 201
couchnode } +0ms
couchnode:lcb:error (bootstrap @ C:\Jenkins\workspace\nodejs\couchnode\couchnode-scripted-build-pipeline\couchnode\deps\lcb\src\bootstrap.cc:198) Failed to bootstrap client=00000242F30537E0. Error=LCB_ERR_TIMEOUT (201) (Last=LCB_ERR_TIMEOUT (201)), Message=Failed to bootstrap in time +6ms couchnode failed to connect to bucket: [Error: LCB_ERR_TIMEOUT (201): The request was not completed by the user-defined timeout] {
couchnode code: 201
couchnode } +6ms
–error-- Error: cluster object was closed
at Connection.close (D:\node\API\node_modules\couchbase\lib\connection.js:267:25)
at D:\API\node_modules\couchbase\lib\cluster.js:612:14
cluster error-- Error: cluster object was closed

@Rajasekar “SASL PLAIN authentication is not allowed on non-TLS connections +6ms”
Tells me that you have either s towards the end of couchbase in the connection string i.e you are probably using couchbases://localhost . Can you double check ?

@AV25242 This is not using my localhost, i’m using demo servers on 8 db servers

Thats fine I understand but what is your connectionstring looking like, can you paste your connection information. you can mask your password and username if you want.

@AV25242 This is my connection string,

//mentioned 2 data nodes
const cluster = new couchbase.Cluster(“couchbase://33.xxx.xx.xxx,33.xxx.xx.xx”, {
username: “mr-yyyyy”,
password: “zzzzzzzz”
});

const bucket = cluster.bucket(“StoreOperations”);
const collection = bucket.defaultCollection();

if you have time please check another one issue Most of the time bucket unable to connect - Error: cluster object was closed · Issue #399 · couchbaselabs/node-ottoman · GitHub

I don’t see any nodejs debug logging.

If it connects sometimes but not others, try specifying a longer timeout.