Hi! Im trying to use a 1 Frontend to connect with 2 openvidu server per session.
Scenario:
OV server 01 for small classrooms (use this for saving resources)
OV server 02 for big classrooms
Frontend to connect in this servers.
So its works fine until i have to access one session on OV server 01 and another session on OV server 02.
After connected successfully in one server and running fine, i cant connect on the other server (this is in the same browser - Firefox).
The session is created corretctly in the second server, the publish start the transmission but the subscriber wont see the video image.
Is there anything that prevents access to two different servers?
It seems to be something globally(javascript) defined when publishing starts, because when i close the first transmission and open the transmission on second server its run fine.
Thks!
Doug
Edit 01: I made a test now using Chrome 83.0.4103.97 and works fine. But the publisher and subscriber must use Chrome. Maybe a compatibility problem with Firefox.
Let me see if I have understood the problem correctly:
In the same Firefox browser tab you are not able to send media to 2 different sessions hosted in 2 different OpenVidu deployments. So, if there is a Chrome browser from device “DeviceA” connected to session “SessionA” and a Chrome browser from a different “DeviceB” connected to “SessionB”, and then a Firefox browser from a third “DeviceC” tries to connect to both “SessionA” and “SessionB” at the same time in the same tab, then…
Firefox is not able to receive the media sent by DeviceA and/or DeviceB?
Firefox cannot send media to DeviceA and/or DeviceB?
After some investigation I found out that this is an issue commonly encountered by most if not all media servers. I found this other post in the mediasoup forums, where also a Licode developer chimes in to talk about how it happens also to them. The best summary explanation seems to be this message: Firefox DTLS certificate error for second RTCPeerConnection on page · Issue #127 · versatica/mediasoup · GitHub (but read the whole conversation if you are interested in the topic, keeping in mind that in the context of mediasoup, what they call a “worker” is equivalent to one instance of KMS)
Firefox rejects a certificate when this contains the same serial number as another certificate issued by the certificate authority.
There is a related Firefox issue which has been around for 10 years .
Having said this. I’d recommend you @kolychev to use your own certificates if you are using multiple mediasoup workers.
I think the same solution applies to Kurento. Firefox will reject connecting from the same tab to 2 different KMS because they will be using different certificates with different subject names.
The solution would be to provide your own certificate to KMS, and make sure that it is the same in all KMS instances. For that, set a property pemCertificateRSA in the file /etc/kurento/modules/kurento/WebRtcEndpoint.conf.ini of all KMS servers:
;; Path (absolute or relative to this config file) to the
;; concatenated certificate (chain) file(s) + private key, in PEM format
pemCertificateRSA=cert+key.pem
I believe this should work and let you use several KMS instances connected to the same Firefox tab. The .pem file is just a concatenation of certificate and private key; you can generate one like this:
cat cert.pem key.pem >cert+key.pem
Please let us know if this works, and we’ll do some needed rewriting of the Kurento docs to explain all this.