# Err\_insecure\_response

**URL:** <https://openvidu.discourse.group/t/err-insecure-response/2150>\
**Category:** Issues with deployment\
**Tags:** v2\
**Created:** [October 14, 2020, 9:45pm UTC](https://openvidu.discourse.group/t/err-insecure-response/2150 "2020-10-14T21:45:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jperuzzi](https://avatars.discourse-cdn.com/v4/letter/j/34f0e0/32.png) [@jperuzzi](https://openvidu.discourse.group/u/jperuzzi)\
**Post date:** [October 14, 2020, 9:45pm UTC](https://openvidu.discourse.group/t/err-insecure-response/2150/1 "2020-10-14T21:45:46Z")

</div>

We followed the tutorial and made an ec2 instance on aws.

Right now, our application server is running on my localhost at localhost:8080 in development. In my server.js file, we use the node package to make a new openvidu variable like so.

new OpenVidu(“http://\*\*\*\*\*.us-east-2.compute.amazonaws.com:5443/”, \*\*\*\*\*\*)

We can connect to the ec2 just fine, make a new session, and get a token from it. However, in the browser code (we are building our app in electron), when we try to connect to the session with the token, we get this error over and over:

webSocketWithReconnection.js:101 WebSocket connection to ‘wss://ec2-\*\*\*\*\*\*\*.us-east-2.compute.amazonaws.com/openvidu’ failed: Error in connection establishment: net::ERR\_INSECURE\_RESPONSE

I’m not sure if this has anythgin to do with the fact that my server is running on a localhost, or that I’m connecting to my ec2 instance at http://\*\*

---

<div class="post-metadata">

**Author:** ![cruizba](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/cruizba/32/18_2.png) [@cruizba](https://openvidu.discourse.group/u/cruizba)\
**Post date:** [October 15, 2020, 9:30am UTC](https://openvidu.discourse.group/t/err-insecure-response/2150/2 "2020-10-15T09:30:50Z")

</div>

Hi @jperuzzi, what instructions are you using? If you’ve deployed with instructions here:

- [https://docs.openvidu.io/en/2.15.0/deployment/deploying-aws/](https://docs.openvidu.io/en/2.15.0/deployment/deploying-aws/)  
or
- [https://docs.openvidu.io/en/2.15.0/deployment/deploying-on-premises/](https://docs.openvidu.io/en/2.15.0/deployment/deploying-on-premises/)

You should not be using port 5443. You must use port 443 and https. Container `openvidu-nginx` acts as a reverse proxy for the openvidu-server running
