amazon web services - AWS EC2 websocket over https ERR_SSL_VERSION_OR_CIPHER_MISMATCH -


i'm having trouble getting websocket work on https.

when i'm on localhost , connect on http (and change node.js server http) works fine.

however in production, can't connect on http due mixed content issue, , when change node.js server https , websocket url https following error:

https://ec2-35-166-xxx-xxx.us-west-2.compute.amazonaws.com:8080/socket.io/?eio=3&transport=polling&t=lj0qxtq net::err_ssl_version_or_cipher_mismatch

obviously, node.js server on aws' ec2 instance doesn't have ssl certificate how web socket work site running on https?

i tried replacing https:// ws:// saw suggested somewhere results in same http , get's blocked.

here's node.js code set socket:

var app = express() var https = require( "https" ).createserver( app ) var io = require( "socket.io" )( https ) https.listen(8080, "0.0.0.0") 

here's how connect on client's side:

import io 'socket.io-client/dist/socket.io.min' let socket let socketurl = 'https://ec2-35-166-xxx-xxx.us-west-2.compute.amazonaws.com:8080' ... socket = io.connect(socketurl) 

for sake of trying make work, set inbound security groups allow traffic anywhere. shouldn't issue. tried allow https traffic anywhere.

i tried changing https.listen port 443, , removing :8080 websocket url. still same error.

i absolutely no response headers or server (i assuming doesn't make far can't find ssl certificate aws server), leaves me absolutely no idea how can debug this.

how can connect websocket on aws https website?

do have buy , set second ssl certificate server?

apparently did require ssl certificate. after purchasing , setting one, https works fine.


Comments