How to setup nodejs client to use SSL connection to 4.1 Couchbase server


#1

Been trying so hard to make this work. I tried using the regular install procedures for installing nodejs, libcouchbase and couchbase sdk. I also tried compiling the libcouchbase 2.5 myself. Nothins worked and I just get the message below everytime. Can anybody point me to any trype of resource to do this? Thanks in advance!

/usr/local/src/files/couchtest/node_modules/couchbase/lib/bucket.js:167
this._cb = new CBpp(bucketDsn, bucketUser, bucketPass);
^
CouchbaseError: The requested feature is not supported by the client, either because of settings in the configured instance, or because of options disabled at the time the library was compiled
at new Bucket (/usr/local/src/files/couchtest/node_modules/couchbase/lib/bucket.js:167:14)
at Cluster.openBucket (/usr/local/src/files/couchtest/node_modules/couchbase/lib/cluster.js:58:16)
at prepareClient (/usr/local/src/files/couchtest/couchbench.js:128:27)
at Object. (/usr/local/src/files/couchtest/couchbench.js:122:3)
at Module._compile (module.js:435:26)
at Object.Module._extensions…js (module.js:442:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:313:12)
at Function.Module.runMain (module.js:467:10)
at startup (node.js:136:18)


#2

Hey @andy_galvez,

Due to various linking issues related to the use of OpenSSL alongside Node.js libraries, the libcouchbase install which is bundled with the Node.js SDK is incapable of connecting via SSL. What you should be able to do however is install libcouchbase yourself as per the libcouchbase installation instructions (http://developer.couchbase.com/documentation/server/4.1/sdks/c-2.4/download-install.html). Once you have a working libcouchbase install, you can install the Node.js SDK using your local libcouchbase rather than the bundled one: npm install couchbase --couchbase-root=PATH_TO_LIBCOUCHBASE. This should allow you to instantiate an SSL client.

Cheers, Brett


#3

Hi Brett,

Thank you very much for your response. Yesterday I compiled my own libcouchbase 2.5 from the git repo. I cloned the repo into /root/src/libcouchbase and did the npm install as you instructed. But I still got the same error. The thing is when I do npm install, it does not even throw me an error no matter what path I give to it in ‘–couchbase-root=’. So I am not sure if I am giving it the correct path. I tried giving it /root/src/libcouchbase and /root/src/libcouchbase/build and /root/src/libcouchbase/somefolder and all options gave me exact error as using the originally linked libcouchbase. I even tried giving it /anynonexistingfolder and got the same result. So now my problem is I dont even know if it is using the library I compiled as I dont even know which folder should I place in that parameter. I hope you can help me with this problem.

Thanks and best regards,
Andy


#4

By the way, I also tried installing c sdk using couchbase-csdk-setup yesterday using the installation procedure indicated in couchbase sdk guides. The library installed itself into /usr… folders. I used all the paths created after the installation process for couchbase-root in npm install couchbase. Stil, I get the old “not supported” error.


#5

anybody can help me on this?