I have problem with my Node.js app on hosting in Plesk.
After I run app I got error “TypeError: NetworkError when attempting to fetch resource.” when fetch data to https://example.com:3000/abc.
So I opened link https://example.com:3000 in browser, nothing happend. Port 3000 was found to be down. So we started port 3000 and added him to firewall.
I opened link https://example.com:3000 in browser again and got:
“Secure connection error – An error occurred while connecting to example.com:3000. A record exceeding the maximum allowed length was received during SSL communication. – Error code: SSL_ERROR_RX_RECORD_TOO_LONG”
With http link worked.
So I disabled proxy mode in Plesk and if I used this code:
location ~ / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_pass https://example.com:3000;
}
I got “Server Error – 502 Bad Gateway” error from browser for link https://example.com:3000.
And Nginx gave me this error in logs:
2825143#0: *11563 SSL_do_handshake() failed (SSL: error:0A00010B:SSL routines::wrong version number) while SSL handshaking to upstream
And if I used this code:
location / {
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $http_host;
proxy_pass http://127.0.0.1:3000;
}
Link with http worked, but link https://example.com:3000/ got me error: “SSL_ERROR_RX_RECORD_TOO_LONG”
Any ideas?
Thank you.
Ondra is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.