I upgraded Node.js on my Mac to the latest, 0.12.4, as well as NPM to 2.10.1, and I re-ran npm install for my Express project.
Now, when I visit https://localhost:3001, I get "This webpage is not available / ERR_CONNECTION_REFUSED" in Chrome. When I run curl -v https://localhost:3001
I get
curl -v https://localhost:3001/
* Hostname was NOT found in DNS cache
* Trying ::1...
* Connected to localhost (::1) port 3001 (#0)
* Server aborted the SSL handshake
* Closing connection 0
curl: (35) Server aborted the SSL handshake
This is definitely a result of upgrading Node.js, as the problem cropped up immediately after upgrading.
I start my service like this:
options = {
key: fs.readFileSync('sslkey.pem'),
cert: fs.readFileSync('sslcert.pem')
};
http.createServer(app).listen(settings.apiPort);
https.createServer(options, app).listen(settings.apiSSLPort);
console.log('Listening on ports: ' + settings.apiPort + ' and ' + settings.apiSSLPort);
Does anyone have any ideas what is causing this problem?
I had the same problem, try this:
options = {
key: fs.readFileSync('sslkey.pem', 'utf-8'),
cert: fs.readFileSync('sslcert.pem', 'utf-8'),
ca: fs.readFileSync(<CA_FILE>, 'utf-8'),
requestCert: true,
rejectUnauthorized: false
};
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With