SSL issue with express server on EC2

0

I have a small express.js server running on a EC2 instance on port 4000. This is for a back end service to be used by another front end later. The instance is t2.micro. I opened up port 4000 in the security group rules. But when I try and visit the instance at its ip_address:4000, I get an SSL error. It should be returning some default text.

In Firefox I get SSL_ERROR_RX_RECORD_TOO_LONG. Other browsers return ERR_SSL_PROTOCOL_ERROR.

Running locally works great. What am I missing here?

Ken
asked 7 months ago170 views
1 Answer
0
Accepted Answer

Record_too_long often/usually means you sent non-SSL-data to a client expecting SSL.

Try to visit your site and port via HTTP (not HTTPS). If it works, you have bound an HTTP server to it, not an HTTPS server.

profile picture
EXPERT
answered 7 months ago
  • Ahh that was it. Thanks. I had the server running on http, but not https. I needed to generate a cert, and then serve with both protocols.

  • Sweet.. Easy fix.. All the best Ken

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions