OpenVidu / openvidu-tutorials

OpenVidu tutorials to get started
http://openvidu.io/tutorials
Apache License 2.0
228 stars 255 forks source link

WebSocket Connection failed at server run at Virtual machine with different IP #170

Closed Ryanshinta closed 2 years ago

Ryanshinta commented 2 years ago

I try to run the openvide-js-java at Virtual Machine, compile is fine. Then I using the VM’s IP (192.168.0.142) address to access it. but when I try to Join a video session, click the Join, no respond. after then I check the Console. image The all Websocket connection try to connect to the wss://Localhost:4443/... But in my situation, it should be connect to the wss://192.168.0.142:4443/...
Am I right?
Thanks.

micaelgallego commented 2 years ago

If you want to deploy OpenVidu for development, we recommend you to use the Docker container so you can use "localhost" to connect to OpenVidu. In that way, you can avoid any issue with certificates.

If you want to deploy OpenVidu in a VM and access to it from the host, then you will need to configure the PUBLIC_IP_OR_DOMAIN to 192.168.0.142.

image

From here: https://docs.openvidu.io/en/stable/deployment/ce/on-premises/

But remember that you have to open the URL https://192.168.0.142/ in the browser to accept the self-signed certificate in your browser BEFORE trying to execute any OpenVidu tutorial. If you do not accept the security exception in the browser, the web socket won't be able to connect to OpenVidu Server.