Connect to Cassandra Apache with SSL using cassandra-driver in Node.js -


i try connect cassandra have wrongly configured. run on localhost. cassandra has generated certificated , add on. in cqlsh there no errors flag --ssl. fragment code

var tls = require('tls');  var fs = require('fs');  var options = {  	key : fs.readfilesync('client-key.pem'),  	cert : fs.readfilesync('client-cert.pem'),  	ca : [fs.readfilesync('server-cert.pem')]  };  var client = new cassandra.client({  		contactpoints : ['127.0.0.1'],  		authprovider : new cassandra.auth.plaintextauthprovider('cassandra', 'cassandra'),  		ssloptions : tls.connect(options)  	});

what i'm doing wrong? please help!

you should not need specify tls.connect(options) rather should provide options ssloptions. driver calls tls.connect ssloptions provide.

if make change , still errors, can share me are? there lot of different factors can make establishing ssl connection fail.


Popular posts from this blog