Second Videobridge only delivers LD

Hey everyone,
it’s me again with my video quality problems :grin: :man_facepalming:

So my previous problems are (mostly) solved by a decent dedicated server (8 cores, 64 GB RAM, 1 GBit/s Interface) ; the quality is still a bit wobbly but most of the time pretty good.

Now i’ve got a new problem: As the number of users to serve will increase dramatically in the next few days, a second videobridge server (4 cores, 32 GB RAM, 1 GBit/s interface) should complement the first main server.
The problem is, that the video streams sent to the second videobridge are recieved as full resolution (around 3 to 4 MBit/s) but sent back as LD (around 0.2 to 0.3 MBit/s).
As soon as i shutdown the videobridge service on the second server and the conference is switched to the main server, the quality is fine again.

I’m really unsure what’s the problem and kindly ask for your help!

Some information about the config:
Main Server:
Allow in from everywhere: 80/tcp; 443/tcp; 4443/tcp; 10000/udp; 8080/tcp
Allow in from Second Server: 5347/tcp; 5222/tcp

Prosody Logs register authentication of second videobridge.

Second Server:
Allow in from everywhere: 443/tcp, 4443/tcp, 10000/udp

Kind regards,

Make sure the websocket connection to the second bridge works, when that does not work, clients cannot report what is currently dispalyed on stage view or what resolution is needed for tile view and the bridge sends LD always.


You’re right, that was the problem.
Changing the stats port away from 8080 solved it.
Found the solution in this thread:

Thanks a lot!


Hi! I experience the same issue.
But changing the colibri stats port from 8080 to something else doesn’t do the trick.
When enabling the secondary videobridge only, to ensure to use ist, the quality is stuck on LD with more than 2 simultanious users in one conference.
When using only the first videobridge (on the meet instance), the quality is set maintained at HD with more than 2 simultanious users in one conference.
the ports are configured exactly as in johns first post.
Does anyone has any suggestions?

Kind regards Carsten

Have you made sure the websocket is forwarded to the second bridge?
This is for the default bridge on the localhost, you must have something similar for the second one:

@damencho what this are mean?

You’s mean I need crate another like that inside nginx? I no comprend. I just do new install for jitsi then I do new server to do new install for jvb. I join jvb to jitsi he show fine for jicofo he join. But I do meeting and plenty plenty error for websocket. So now I see this thing you say here but I no undastand. I suppose to create new one like yellow line inside nginx? Where I put it?

Search for JVB server-id too

@emrah Thank you for respond. I put for my nginx as you put here but he still show websocket error. I even change put jvb2 name same thing

# colibri (JVB) websockets for additional JVBs
   location ~ ^/colibri-ws/jvb2/(.*) {
   proxy_pass http://$1:9090/colibri-ws/$1/$2$is_args$args;
   proxy_http_version 1.1;
   proxy_set_header Upgrade $http_upgrade;
   proxy_set_header Connection "upgrade";
   tcp_nodelay on;

How to do this? I suppose do this for everytime new jvb for aws? How this to work for autoscale? This too confusing

Don’t change it, keep as in the sample.

Check this post

@emrah Thank you my friend
But if I change or no change I still see same websocket error like so

WebSocket connection to 'wss://*@##**********' failed: Error during WebSocket handshake: Unexpected response code: 403

[modules/RTC/BridgeChannel.js] <WebSocket.e.onclose>:  Channel closed: 1006 

[modules/RTC/BridgeChannel.js] <l._send>:  Bridge Channel send: no opened channel.

Is JVB running on the same server on JMS or on a seperate server when you get this message?

@emrah I first make jitsi with quick instal and he make jitsi jicofo prosody jvb. He work fine. So now I want add new jvb so I make another server for aws put only jvb and now i get websocket error. If I block 2nd jvb everything work fine no error. If I start 2nd jvb everything he give websocket error like so

  • On a typical installation, websocket are managed by Nginx on the server side

  • Nginx gets the websocket requests and redirects them to the videobridge

  • Nginx catches the websocket requests using the location block
    location /colibri-ws/(server-id)/(.*)

  • and redirects to JVB using the proxy conf
    proxy_pass http://$1:9090/colibri-ws/$1/$2$is_args$args;

  • Nginx needs to know the related JVB’s IP to redirect successfully

  • If the request path has default-id then Nginx redirects it to the local JVB

  • Each JVB has a server-id and if it’s not explicitly defined then the default value is default-id

  • If you don’t set the server-id for an additional JVB, it will use the default ID which is default-id and the socket doesn’t work since Nginx tries to redirect it to the wrong JVB (the local one)

  • You can use the remote IP as the server-id for the additional JVBs.

  • Then Nginx can get the IP address of JVB from the request path

  • And it can redirect it to the correct JVB ($1 will get the value of JVB-SERVER-IP)
    proxy_pass http://$1:9090/colibri-ws/$1/$2$is_args$args;

  • On an autoscaling scenario you should set the server-id as the JVB IP before the service started

  • The following script do this

  • But you should run it before the jitsi-videobridge2 service. So you need the following systemd config file too

1 Like

@emrah thank you too much for this very good explain. I undastand a little now. In my case I use skript make aws instance id for name autoscale jvb. In my case what this line suppose be? I no use ip address i use instance id

The script can find the IP address and you can use it as is.
Is it possible to resolv the JVB address using its instance-id? If no, it doesn’t work

Yes my autoscale now he are use instance-id thats why.
So if I use instance-id how I are change this line so he use the instance-id instead ip address? You know?

Can you give me a working instance-id as an example?

@emrah I send you inbox message ok

@emrah it are fix now! Thank you emrah for work with me so long to fix my problem!
I open port but forget open firewall before. Thank you emrah!

1 Like