Built a clean new ubuntu server to use for openVidu. Followed the on premises instructions. We are using a public CA signed cert from godaddy and have it installed properly on both the openVidu server and our IIS server which acts as a reverse proxy for the subdomain we are suing for openVidu.
If we test on the openVidu server, which does not have a camera, it appears to be able to open a room and join it.
If we test from any other system, as soon as you try and join the room you get this error.
main.059bc9d7fcc0db699d41.js:1 WebSocket connection to ‘wss://[publicserverURL]/openvidu’ failed: Error during WebSocket handshake: Incorrect ‘Sec-WebSocket-Accept’ header value
Does anyone know how to correct this or where you can even ?
Do you have websockets support configured in your IIS server?
Some reverse proxies don’t allow using websockets by default.
I assumed the reverse proxy was doing what it needed to because before I set up this clean install I setup Kurento and got the Conference Call working. What port are the websockets using? I only have http and https going through the web server, everything else is going directly from the router to the Openvidu system.
The challenge I am having is I figured out what to fix in Kurento, Nginx, and in the Java files for the sample applications. I suspect I need to do something similar here, but cannot figure out where or how to fix these settings.
To get Kurento working I had to do the following.
I had to add .setAllowedOrigins("*") to java file in each sample.
And for nginx i needed these settings
location / {
proxy_pass https://localhost:8443;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
# WebSocket support (nginx 1.4)
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_connect_timeout 4s;
proxy_read_timeout 86400s;
proxy_send_timeout 12s;
}
I found the nginx log and it might indicate what the problem is. Note: 192.168.0.3 is my IIS server, and 192.168.0.4 is the openvidu server. This looks like the problem, I just don’t know what the solution is. I removed all the http because I cannot save posts with links. To reduce spammers, also removed the actual public URL and put in publicurl instead.
nginx_1 | ==> /var/log/nginx/access.log <==
nginx_1 | 2020/07/22 17:15:11 [error] 66#66: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.0.3, server: publicurl, request: “GET /openvidu HTTP/1.1”, upstream: “://127.0.0.1:5443/openvidu”, host: “192.168.0.4”
nginx_1 | 2020/07/22 20:14:40 [warn] 66#66: *2775 an upstream response is buffered to a temporary file /var/cache/nginx/proxy_temp/1/00/0000000001 while reading upstream, client: 192.168.0.3, server: publicurl, request: “GET /main.059bc9d7fcc0db699d41.js HTTP/1.1”, upstream: “://127.0.0.1:5442/main.059bc9d7fcc0db699d41.js”, host: “192.168.0.4”, referrer: “s://publicurl/”
We usually use the NGINX provided in OpenVidu as the main proxy. In case we need to deploy another application, it is deployed behind this.
We haven’t experience combining chained NGINX and IIS…
hey why you want to use IIS If nginx is capable do what you want do .
Tell me i have solved this problems . And 90% people want use another instead but when solved issue then say Nginx Is nice…
Thanks
Any other help needed let us know