node.js - SSL connection code fails with error code ENOTFOUND on bluemix, but code works perfectly on localhost -


i have application makes outbound https request internal server fetch data , sends data client. when run code on local machine, works expected. however, when push code bluemix, error enotfound.

here code:

var options = {     host: 'servername',     path: "path",     port: '7988',     key: fs.readfilesync('server.key'),     cert: fs.readfilesync('mycertificate.crt'),     rejectunauthorized: false };  options.agent = new https.agent(options);  var gis_req = https.get(options, function(gis_res) {      gis_res.on('data', function(d) {         res.send("" + d);     });     gis_res.on('error', function(e) {         res.send("" + e);     }); });  gis_req.on('error', function(e) {     res.send("gis req error " + e); }); 

edit: code works fine on both server , local machine http requests, not https.


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -