javascript – node-request – Getting error SSL23_GET_SERVER_HELLO:unknown protocol
javascript – node-request – Getting error SSL23_GET_SERVER_HELLO:unknown protocol
You will get such error message when you request HTTPS resource via wrong port, such as 80. So please make sure you specified right port, 443, in the Request options.
This was totally my bad.
I was using standard node http.request on a part of the code which should be sending requests to only http adresses. Seems like the db had a single https address which was queried with a random interval.
Simply, I was trying to send a http request to https.
javascript – node-request – Getting error SSL23_GET_SERVER_HELLO:unknown protocol
I got this error because I was using require(https)
where I should have been using require(http)
.