Couchbases (plural) SSL configuration string returns not supported


#1

Server: Couchbase EE 4.0.0 (on Ubuntu 14.04LTS)

Client:
Node.js 4.2.1
Couchbase 2.1.2

I’m able to successfully connect, write, query, using the smart client SDK with the example below (WORKING). But as soon as I try to leverage the SSL connection version it breaks (BREAKING). I can’t find any working documentation for smart client SDK in node for SSL. Critical path as we are assessing NoSQL backends for a new Angular/Node app and everything else around couchbase is very appealing. Just can’t be caught in a situation where we are missing a critical item.

Any support here would be appreciated.

BREAKING
var cluster = new cb.Cluster(“couchbases://mycbserver.local”);

Node throws:
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

WORKING
var cluster = new cb.Cluster(“couchbase://mycbserver.local”);
var bucket = cluster.openBucket(“default”, function(bucketErr){
if (bucketErr){
response.send(bucketErr);
}
else {
bucket.insert(‘testuser@testemail.com’, {name: ‘TestUser’}, function (upsertErr, upsertRes) {
if (upsertErr) {
response.send(upsertErr);
}
else {
response.send(upsertRes);
}
bucket.disconnect();
}
);
}
});


#2

Hey @joshua.howard,

Unfortunately in order to use the SSL features of the Node.js SDK, you must manually build libcouchbase with SSL support and then specify this version of the library to your npm install using --couchbase-root=. This is due to the fact that the version of libcouchbase that is embedded within the Node.js SDK is unable to build w/SSL due to conflicts with the SSL built into Node itself.

Cheers, Brett


#3

Thanks for the quick return here Brett.

Do you have a reference to any existing docs for doing a libcouchbase buiild on Ubuntu?


#4

Hey joshua.howard,

Your best bet is to take a look here:
http://developer.couchbase.com/documentation/server/4.0/sdks/c-2.4/download-install.html.

Cheers, Brett


#5

No luck.

I can pull and build from C source, and reference --couchbase-root on npm install, but I can’t find the specifics on enabling SSL support during build/configure.


#6

Personally what I would do to solve this issue is a reverse proxy of the node js server in nginx, define the ssl in nginx then reverse proxy to the local http node js server. I have been following this tutorial to do the same thing with my setup. https://www.digitalocean.com/community/tutorials/how-to-set-up-a-node-js-application-for-production-on-ubuntu-14-04