Load balancing jitsi videobridges

Hello, i followed the video for load-balancing jitsi-meet which is available on jitsi.org.

it seems that this video is a bit outdated - the videobridges cannot connect to jicofo server with the pubsub method. then i read that the prefered method is now to use the MUC-Method as described here: https://github.com/jitsi/jitsi-videobridge/blob/master/doc/muc.md

is there anywhere a howto or turorial which thing i have todo to get the bridges connect to the jicofo server? … or you can help me here and i can write a turorial after it :wink:

as i said, i did the things in the video and i ended up this this:
Jicofo 2020-04-03 14:07:15.193 SCHWERWIEGEND: [56] org.jitsi.jicofo.discovery.DiscoveryUtil.discoverVersion().204 Failed to discover version, req: , response:
Jicofo 2020-04-03 14:07:15.193 INFORMATION: [56] org.jitsi.jicofo.ComponentsDiscovery.log() New component discovered: videobridge2.mydomain.tld, null
Jicofo 2020-04-03 14:07:15.193 INFORMATION: [56] org.jitsi.jicofo.bridge.BridgeSelector.log() Added videobridge: videobridge2.mydomain.tld v: null
Jicofo 2020-04-03 14:07:15.193 WARNUNG: [56] org.jitsi.jicofo.bridge.BridgeSelector.log() No pub-sub node mapped for videobridge2.mydomain.tld

i then tried the muc method but result is the same,

i copied the content from jitsi-meet server with working videobridge to the other stand alone servers in ordner to connect these too; but this did not work.

  • prosody is listen to public ip and port is open.
  • added the lines videobridge2 in configs like in video described
  • copied the content from main jitsi-meet server /etc/jitsi/videobridge/sip-communicator.properties to the stand-alone servers
    –> Must the The MUC_NICKNAME an unique id for each videobridge or is this the one fom the jitsi-meet-server?

Thanks. i hope you can help me.

2 Likes

i anwser myself after hours of search in this Forum for the anwser: i got it to work and will write a tutorial for that!

2 Likes

Hi,

Im in the process of trying to do this at the moment for a charity event tomorrow, any chance you can point me in the right direction?

I’ve worked out that this needs to be implemented in MUC just seem to be missing something somewhere.

Regards

Lee

here is my tutorial: https://github.com/flyinghuman/jitsi-meet/wiki/jitsi-meet-load-balancing-installation-Ubuntu-18.04-with-MUC-and-JID

@devs please review it. if it is okay, i can also add it to the jitsi-meet wiki pages or you add it to the doc folder. i can also do a pull request if all is okay.

anyway, i get this error in jicofo log:

WARNUNG: [30] org.jitsi.jicofo.bridge.BridgeSelector.log() No pub-sub node mapped for jvbbrewery@internal.auth.mydomain.tld/jvb2

is this normal and expected or will load balance not work when not subscribed? --> how to subscribe?

4 Likes

Hi Flying Human, Thanks for this. I’ve just run through it and it all works correctly…

Ive tested the balancing at it seems to 1st to the 1st and 2nd conf to the 2nd.

But I do note the log about pub-sub… Maybe somebody on here knows a bit more.??

For the pubsub error

vi /etc/jitsi/jicofo/sip-communicator.properties

Change “focus” to “jicofo” in the last line:

org.jitsi.focus.pubsub.ADDRESS=jitsi-test.example.org
org.jitsi.jicofo.STATS_PUBSUB_NODE=sharedStatsNode

#(from [Solved]How to handle the “No pub-sub node mapped” warning)

1 Like

Hi, thanks for your answer but this did not worked for me - i assume because i use the MUC method to connect the bridges.

i get these errors when i add the lines you wrote:

Jicofo 2020-04-04 09:37:58.215 SCHWERWIEGEND: [34] org.jitsi.impl.protocol.xmpp.OpSetSubscriptionImpl.log() Failed to subscribe to sharedStatsNode at mydomain.tld error: org.jivesoftware.smack.XMPPException$XMPPErrorException: XMPP error reply received from mydomain.tld: XMPPError: item-not-found - cancel
Jicofo 2020-04-04 09:38:13.212 INFORMATION: [33] org.jitsi.jicofo.ComponentsDiscovery.log() New component discovered: focus.mydomain.tld, null
Jicofo 2020-04-04 09:38:13.215 INFORMATION: [36] org.jitsi.impl.protocol.xmpp.OpSetSubscriptionImpl.log() Subscribing to sharedStatsNode node at mydomain.tld
Jicofo 2020-04-04 09:38:13.216 SCHWERWIEGEND: [36] org.jitsi.impl.protocol.xmpp.OpSetSubscriptionImpl.log() Failed to subscribe to sharedStatsNode at mydomain.tld error: org.jivesoftware.smack.XMPPException$XMPPErrorException: XMPP error reply received from mydomain.tld: XMPPError: item-not-found - cancel
Jicofo 2020-04-04 09:38:28.216 INFORMATION: [47] org.jitsi.impl.protocol.xmpp.OpSetSubscriptionImpl.log() Subscribing to sharedStatsNode node at mydomain.tld
Jicofo 2020-04-04 09:38:28.218 SCHWERWIEGEND: [47] org.jitsi.impl.protocol.xmpp.OpSetSubscriptionImpl.log() Failed to subscribe to sharedStatsNode at mydomain.tld error: org.jivesoftware.smack.XMPPException$XMPPErrorException: XMPP error reply received from mydomain.tld: XMPPError: item-not-found - cancel

Thanks!

Hi,

could be that my proposal is not appropriate fir MUC…

Could you check one more thing?

Is DNS or name resolution working?

Can the main server resolve the domain you are using?
Try “host yoursubdomain.example.org” on the shell, it should give its own IP address.

I just put the domain and IP address in /etc/hosts for this to work.

The additional videobridge servers also must be able to resolve the domain.

I’m not sure if this is necessary, but I also entered the subdomains and respective IP of the additional videobridges to /etc/hosts on the main server.
This could also be done with proper DNS…

Let me know if you succeed!
Beste Grüße

PS: Wie hast du es geschafft, dass das Logging auf Deutsch erfolgt? :smiley: „SCHWERWIEGEND“ :smiley:

yes, DNS is working correctly; resolves all like it should and the additional servers are connecting and working; the only warning are now the pubsub warnings. i don’t know if that is okay if they are there or if there is a solution for that.

Wegen deutsch: Ubuntu auf deutsch installiert…

In your jvb sip-communicator.properties, what is the value of this line?

org.jitsi.videobridge.STATISTICS_TRANSPORT=

it is

org.jitsi.videobridge.STATISTICS_TRANSPORT=muc

you can see here my files: https://github.com/flyinghuman/jitsi-meet/wiki/jitsi-meet-load-balancing-installation-Ubuntu-18.04-with-MUC-and-JID

Hi flyinghuman,

many thanks for the short tutorial about adding new videobridges.
I have a question:

How does load balancing work at this point? And is there a way to monitor the load balancing?
I installed three videobridges and everyone worked for me, but i don’t know the load balancing works fine.

Cheers!

actually you have to look into the jicofo.log to see which bridge is actually used. we are still in testing Phase at our University; i can’t say much about the load balancing right now. it would be cool to have some tools for it to make it easier to see how much conferences are on which bridge. if anyone has such tools or scripts; please share with us.

Edit: look at https://github.com/jitsi/jitsi-videobridge/tree/master/doc there are some options to query the bridges for informations.

If you’re using the MUC mode you can remove all pubsub configuration: pubsub is not used and it’s just logging confusing warnings.

Boris

1 Like

thanks for clarifying this. Can i add the tutorial to the official jitsi wiki too? @Boris_Grozev

i added the tutorial to the official wiki: https://github.com/jitsi/jitsi-meet/wiki/jitsi-meet-load-balancing-installation-Ubuntu-18.04-with-MUC-and-JID

3 Likes

Hi! I feel confident enough to give your explanation/tutorial a try.

One question I would have: will this loadbalancing improve quality/capacity for many users in a single conference or will this improve scalability of multiple conferences on the jitsi-server setup?

Thank you for your document, much appreciated!

A single conference is running on one of the videobridge-servers only. It does not span across videobridge-servers. When starting a new conference, jicofo decides on which videobridge the conference will be based on statistics of the server.

Having multiple videobridges means, that you can run more concurrent conferences (at the same time).

1 Like

Official documentation

Hi,

Thanks for the tutorial, I really appreciate it. I have try the instruction in the wiki, but always get reconnecting error message when the second participant join the conference. This error message show up when i shutdown the videobridge service on the JMS and only rely to the JVB server to provide videobridge service. Below are configuration settings on both server:

  • JMS ufw status:
    22/tcp ALLOW Anywhere
    80/tcp ALLOW Anywhere
    443/tcp ALLOW Anywhere
    10000:20000/udp ALLOW Anywhere
    5222/tcp ALLOW Anywhere
    22/tcp (v6) ALLOW Anywhere (v6)
    80/tcp (v6) ALLOW Anywhere (v6)
    443/tcp (v6) ALLOW Anywhere (v6)
    10000:20000/udp (v6) ALLOW Anywhere (v6)
    5222/tcp (v6) ALLOW Anywhere (v6)

  • JVB ufw status:
    22/tcp ALLOW Anywhere
    443/tcp ALLOW Anywhere
    4443/tcp ALLOW Anywhere
    10000:20000/udp ALLOW Anywhere
    22/tcp (v6) ALLOW Anywhere (v6)
    443/tcp (v6) ALLOW Anywhere (v6)
    4443/tcp (v6) ALLOW Anywhere (v6)
    10000:20000/udp (v6) ALLOW Anywhere (v6)

  • /etc/jitsi/videobridge/config on JVB (identic with the content of JMS)

Jitsi Videobridge settings

sets the XMPP domain (default: none)

JVB_HOSTNAME=jms_domain_name

sets the hostname of the XMPP server (default: domain if set, localhost otherwise)

JVB_HOST=

sets the port of the XMPP server (default: 5275)

JVB_PORT=5347

sets the shared secret used to authenticate to the XMPP server

JVB_SECRET=jms_secret

extra options to pass to the JVB daemon

JVB_OPTS="–apis=,"

adds java system props that are passed to jvb (default are for home and logging config file)

JAVA_SYS_PROPS="-Dnet.java.sip.communicator.SC_HOME_DIR_LOCATION=/etc/jitsi -Dnet.java.sip.communicator.SC_HOME_DIR_NAME=videobridge -Dnet.java.sip.communicator.SC_LOG_DIR_LOCATION=/var/log/jitsi -Djava.util.logging.config.file=/etc/jitsi/videobridge/logging.properties"

  • /etc/jitsi/videobridge/sip-communicator.properties on JMS:
    org.ice4j.ice.harvest.DISABLE_AWS_HARVESTER=true
    org.ice4j.ice.harvest.STUN_MAPPING_HARVESTER_ADDRESSES=meet-jit-si-turnrelay.jitsi.net:443
    org.jitsi.videobridge.ENABLE_STATISTICS=true
    org.jitsi.videobridge.STATISTICS_TRANSPORT=muc
    org.jitsi.videobridge.xmpp.user.shard.HOSTNAME=localhost
    org.jitsi.videobridge.xmpp.user.shard.DOMAIN=auth.JMS_domain
    org.jitsi.videobridge.xmpp.user.shard.USERNAME=jvb
    org.jitsi.videobridge.xmpp.user.shard.PASSWORD=same value with JMS
    org.jitsi.videobridge.xmpp.user.shard.MUC_JIDS=JvbBrewery@internal.JMS_domain
    org.jitsi.videobridge.xmpp.user.shard.MUC_NICKNAME=b271dad9-3f46-47e9-bd58-e3b1d1b38681
    org.jitsi.videobridge.DISABLE_TCP_HARVESTER=true
    org.jitsi.videobridge.xmpp.user.shard.DISABLE_CERTIFICATE_VERIFICATION=true

and this is the log history on the JVB:

2020-04-22 23:00:45.300 WARNING: [22] [hostname=localhost id=shard] MucClient.lambda$getConnectAndLoginCallable$7#643: [MucClient id=shard hostname=localhost] error connecting
org.jivesoftware.smack.SmackException$ConnectionException: The following addresses failed: ‘localhost:5222’ failed because: localhost/127.0.0.1 exception: java.net.ConnectException: Connection refused (Connection refused)
at org.jivesoftware.smack.SmackException$ConnectionException.from(SmackException.java:278)
at org.jivesoftware.smack.tcp.XMPPTCPConnection.connectUsingConfiguration(XMPPTCPConnection.java:619)
at org.jivesoftware.smack.tcp.XMPPTCPConnection.connectInternal(XMPPTCPConnection.java:902)
at org.jivesoftware.smack.AbstractXMPPConnection.connect(AbstractXMPPConnection.java:383)
at org.jitsi.xmpp.mucclient.MucClient.lambda$getConnectAndLoginCallable$7(MucClient.java:638)
at org.jitsi.retry.RetryStrategy$TaskRunner.run(RetryStrategy.java:193)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
2020-04-22 23:00:49.829 INFO: [19] Videobridge.createConference#319: create_conf, id=adc1a726b825334b gid=null logging=false
2020-04-22 23:00:49.839 INFO: [19] AbstractHealthCheckService.run#171: Performed a successful health check in PT0.01S. Sticky failure: false

Is there any step i’ve missed in the configuration of both server (JVB and JMS). Could you please give some advice?

Thanks