How can I add extra jvb in docker meet

Hello all, I tried same with docker swarm and I’m able to scale it to 3 replicas and it worked. But I’m having some issue when scaling prosody and jicofo. Scaling isn’t working on both. I scaled both of them to 2 replicas but If i killed previous running prosody or jifoco container then it stopped the meeting. If anyone knows any work around then please do share.

Thanks

Why are you trying to scale prosody and jicofo ? you can deploy multiple videobridge and connect them to the same prosody/jicofo server

Because I thought that if something went wrong with current prosody and jicofo instances and they can switch to other replicated instance but it seems that it is not possible. Also If a single instance get killed then swarm will take care by itself. So, just replicating JVB is better approach.

I have couple of queries:

  1. If I want to use my own domain then Do I have to make some changes to the config files or just changing the .env file variables is fine.

  2. How can I change the Jisti logo(logo during video call) by custom logo.

you can connect a video bridge to multiple prosody instances, you will need to modify your jvb sip config file

org.jitsi.videobridge.xmpp.user.shard.HOSTNAME={{ .Env.XMPP_SERVER_1 }}
org.jitsi.videobridge.xmpp.user.shard.DOMAIN={{ .Env.XMPP_AUTH_DOMAIN }}
org.jitsi.videobridge.xmpp.user.shard.USERNAME={{ .Env.JVB_AUTH_USER }}
org.jitsi.videobridge.xmpp.user.shard.PASSWORD={{ .Env.JVB_AUTH_PASSWORD }}
org.jitsi.videobridge.xmpp.user.shard.MUC_JIDS={{ .Env.JVB_BREWERY_MUC }}@{{ .Env.XMPP_INTERNAL_MUC_DOMAIN }}
#org.jitsi.videobridge.xmpp.user.shard.MUC_NICKNAME={{ .Env.HOSTNAME }}
org.jitsi.videobridge.xmpp.user.shard.MUC_NICKNAME={{ .Env.JVB_AUTH_USER }}
org.jitsi.videobridge.xmpp.user.shard.DISABLE_CERTIFICATE_VERIFICATION=true

org.jitsi.videobridge.xmpp.user.shard1.HOSTNAME={{ .Env.XMPP_SERVER_2 }}
org.jitsi.videobridge.xmpp.user.shard1.DOMAIN={{ .Env.XMPP_AUTH_DOMAIN }}
org.jitsi.videobridge.xmpp.user.shard1.USERNAME={{ .Env.JVB_AUTH_USER }}
org.jitsi.videobridge.xmpp.user.shard1.PASSWORD={{ .Env.JVB_AUTH_PASSWORD }}
org.jitsi.videobridge.xmpp.user.shard1.MUC_JIDS={{ .Env.JVB_BREWERY_MUC }}@{{ .Env.XMPP_INTERNAL_MUC_DOMAIN }}
#org.jitsi.videobridge.xmpp.user.shard1.MUC_NICKNAME={{ .Env.HOSTNAME }}
org.jitsi.videobridge.xmpp.user.shard1.MUC_NICKNAME={{ .Env.JVB_AUTH_USER }}
org.jitsi.videobridge.xmpp.user.shard1.DISABLE_CERTIFICATE_VERIFICATION=true

I am sure you could re-write it in a way that it is a “for loop”. thats my next step.

1 Like

Hey - I managed it finaly to add an extra server with videobridge2 to my “Quick Install”. Does it do a load balance even in one big room with more than 20 users or is the second jvb only for more rooms?

I don’t find any informations about this :-/

Regards and stay healthy!

2 Likes

can you share how you did that, I have docker environment,

Thank u for the tutorial, i want to deploy an extra JVB in the same server, and I have try to add jvb2 in docker-compose.yml and modify the JVB_AUTH_USER with JVB2, but im got an error that the JVB_PORT is already in use, do you know how to solve this problem ?

thank u

use another port like 10001

1 Like

@creativeguitar Have to tried replicas thing for scaling jvb?

I tried it with docker-swarm. I replicated jvb to 2(containers), running on different machines then I tried killing one of the jvb container during a meeting and everything went fine. But I’m not sure if it also doing the load balancing thing.

  1. Is creating a two jvb’s also ensures that the load(users) of a single conference is equally distributed to both the jvb’s?

  2. If yes then Is there any logs that i can check to determine whether replicating jvb to 2 also does load balancing thing.

hello, i have done create extra videobridge in same machine, the jvb2 already connected and encrypted (i saw at logs of prosody). here logs of prosody

Blockquote
c2s5594e94bf450 info Client connected
c2s5594e94bf450 info Stream encrypted (TLSv1.2 with ECDHE-RSA-AES256-GCM-SHA384)
c2s5594e94d02c0 info Client connected
c2s5594e94d02c0 info Stream encrypted (TLSv1.2 with ECDHE-RSA-AES256-GCM-SHA384)
c2s5594e94d02c0 info Authenticated as jvb@auth.my.domain

and here logs in jvb2

Blockquote
[services.d] starting services
[services.d] done.
May 11, 2020 5:32:56 AM org.jitsi.utils.logging2.LoggerImpl log
INFO: Loaded NewConfig with origin: merge of system properties,system properties,reference.conf @ jar:file:/usr/share/jitsi-videobridge/jitsi-videobridge.jar!/reference.conf: 1,reference.conf @ jar:file:/usr/share/jitsi-videobridge/lib/jitsi-media-transform-1.0-155-gb6af7e9.jar!/reference.conf: 1
May 11, 2020 5:32:56 AM org.jitsi.utils.logging2.LoggerImpl log
INFO: Attempting to load legacy config file at path /, config, sip-communicator.properties
May 11, 2020 5:32:56 AM org.jitsi.utils.logging2.LoggerImpl log
INFO: Attempting to load legacy config file at path /, config, sip-communicator.properties
May 11, 2020 5:32:56 AM org.jitsi.utils.logging2.LoggerImpl log
INFO: Reloading.
May 11, 2020 5:32:56 AM org.jitsi.utils.logging2.LoggerImpl log
INFO: Loaded NewConfig with origin: merge of system properties,system properties,reference.conf @ jar:file:/usr/share/jitsi-videobridge/jitsi-videobridge.jar!/reference.conf: 1,reference.conf @ jar:file:/usr/share/jitsi-videobridge/lib/jitsi-media-transform-1.0-155-gb6af7e9.jar!/reference.conf: 1
May 11, 2020 5:32:56 AM org.jitsi.utils.logging2.LoggerImpl log
INFO: Attempting to load legacy config file at path /, config, sip-communicator.properties
May 11, 2020 5:32:56 AM org.jitsi.utils.logging2.LoggerImpl log
INFO: Attempting to load legacy config file at path /, config, sip-communicator.properties
May 11, 2020 5:32:56 AM org.jitsi.utils.logging2.LoggerImpl log
INFO: Registered the LegacyConfigurationServiceShim in OSGi.
May 11, 2020 5:32:56 AM org.jitsi.utils.logging.LoggerImpl log
INFO: VersionService registered: JVB 2.1.197-g38256192
May 11, 2020 5:32:56 AM org.jitsi.utils.logging.LoggerImpl log
INFO: Not starting the Jetty service for org.jitsi.videobridge.rest.RESTBundleActivator(port=8080)
May 11, 2020 5:32:56 AM org.jitsi.utils.logging.LoggerImpl log
INFO: Not starting the Jetty service for org.jitsi.videobridge.websocket.WebSocketBundleActivator(port=-1)
May 11, 2020 5:32:57 AM org.jitsi.utils.logging2.LoggerImpl log
WARNING: Running with open files limit 1048576 (hard 1048576), thread limit null (hard null). These values are too low and they will limit the number of participants that the bridge can serve simultaneously.
May 11, 2020 5:32:57 AM org.jitsi.utils.logging2.LoggerImpl log
INFO: Starting with 60 second interval.
May 11, 2020 5:32:57 AM org.jitsi.utils.logging2.LoggerImpl log
WARNING: No authorized source regexp configured. Will accept requests from any source.
May 11, 2020 5:32:57 AM org.jitsi.utils.logging2.LoggerImpl log
INFO: Reloading.
May 11, 2020 5:32:57 AM org.jitsi.utils.logging2.LoggerImpl log
INFO: Loaded NewConfig with origin: merge of system properties,system properties,reference.conf @ jar:file:/usr/share/jitsi-videobridge/jitsi-videobridge.jar!/reference.conf: 1,reference.conf @ jar:file:/usr/share/jitsi-videobridge/lib/jitsi-media-transform-1.0-155-gb6af7e9.jar!/reference.conf: 1
May 11, 2020 5:32:57 AM org.jitsi.utils.logging2.LoggerImpl log
INFO: Attempting to load legacy config file at path /, config, sip-communicator.properties
May 11, 2020 5:32:57 AM org.jitsi.utils.logging2.LoggerImpl log
INFO: Attempting to load legacy config file at path /, config, sip-communicator.properties
May 11, 2020 5:32:57 AM org.jitsi.utils.logging2.LoggerImpl log
INFO: Started with interval=10000, timeout=PT30S, maxDuration=PT3S, stickyFailures=false.
May 11, 2020 5:32:57 AM org.jitsi.utils.logging2.LoggerImpl log
INFO: Octo relay is disabled
May 11, 2020 5:32:57 AM org.jitsi.utils.logging2.LoggerImpl log
WARNING: Disabling certificate verification!
May 11, 2020 5:32:57 AM org.jitsi.utils.logging2.LoggerImpl log
WARNING: [MucClient id=shard hostname=my.domain] error connecting
org.jivesoftware.smack.XMPPException$StreamErrorException: host-unknown You can read more about the meaning of this stream error at http://xmpp.org/rfcs/rfc6120.html#streams-error-conditions
stream:errorThis server does not serve auth.my.domain</stream:error>
at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.parsePackets(XMPPTCPConnection.java:1059)
at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.access$300(XMPPTCPConnection.java:1000)
at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader$1.run(XMPPTCPConnection.java:1016)
at java.lang.Thread.run(Thread.java:748)
May 11, 2020 5:32:57 AM org.jivesoftware.smack.AbstractXMPPConnection callConnectionClosedOnErrorListener
WARNING: Connection XMPPTCPConnection[not-authenticated] (0) closed with error
org.jivesoftware.smack.XMPPException$StreamErrorException: host-unknown You can read more about the meaning of this stream error at http://xmpp.org/rfcs/rfc6120.html#streams-error-conditions
stream:errorThis server does not serve auth.my.domain</stream:error>
at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.parsePackets(XMPPTCPConnection.java:1064)
at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.access$300(XMPPTCPConnection.java:1000)
at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader$1.run(XMPPTCPConnection.java:1016)
at java.lang.Thread.run(Thread.java:748)
May 11, 2020 5:32:57 AM org.jitsi.utils.logging2.LoggerImpl log
WARNING: Closed on error:
org.jivesoftware.smack.XMPPException$StreamErrorException: host-unknown You can read more about the meaning of this stream error at http://xmpp.org/rfcs/rfc6120.html#streams-error-conditions
stream:errorThis server does not serve auth.my.domain</stream:error>
at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.parsePackets(XMPPTCPConnection.java:1064)
at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.access$300(XMPPTCPConnection.java:1000)
at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader$1.run(XMPPTCPConnection.java:1016)
at java.lang.Thread.run(Thread.java:748)
May 11, 2020 5:32:58 AM org.ice4j.ice.harvest.StunMappingCandidateHarvester discover
INFO: Discovered public address 202.46.129.77:34449/udp from STUN server 74.125.200.127:19302/udp using local address 172.23.0.4:0/udp
May 11, 2020 5:32:58 AM org.ice4j.ice.harvest.StunMappingCandidateHarvester discover
INFO: Discovered public address 103.94.190.19:57289/udp from STUN server 173.194.202.127:19302/udp using local address 172.23.0.4:0/udp
May 11, 2020 5:32:58 AM org.ice4j.ice.harvest.StunMappingCandidateHarvester discover
INFO: Discovered public address 202.46.129.190:46444/udp from STUN server 173.194.199.127:19302/udp using local address 172.23.0.4:0/udp
May 11, 2020 5:32:58 AM org.ice4j.ice.harvest.MappingCandidateHarvesters initialize
INFO: Using org.ice4j.ice.harvest.StunMappingCandidateHarvester, face=/172.23.0.4, mask=/202.46.129.77
May 11, 2020 5:32:58 AM org.ice4j.ice.harvest.MappingCandidateHarvesters initialize
INFO: Using org.ice4j.ice.harvest.StunMappingCandidateHarvester, face=/172.23.0.4, mask=/103.94.190.19
May 11, 2020 5:32:58 AM org.ice4j.ice.harvest.MappingCandidateHarvesters initialize
INFO: Using org.ice4j.ice.harvest.StunMappingCandidateHarvester, face=/172.23.0.4, mask=/202.46.129.190
May 11, 2020 5:32:58 AM org.ice4j.ice.harvest.MappingCandidateHarvesters initialize
INFO: Initialized mapping harvesters (delay=1058ms). stunDiscoveryFailed=false
May 11, 2020 5:33:02 AM org.jitsi.utils.logging2.LoggerImpl log
WARNING: [MucClient id=shard hostname=my.domain] error connecting
org.jivesoftware.smack.XMPPException$StreamErrorException: host-unknown You can read more about the meaning of this stream error at http://xmpp.org/rfcs/rfc6120.html#streams-error-conditions
stream:errorThis server does not serve auth.my.domain</stream:error>
at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.parsePackets(XMPPTCPConnection.java:1059)
at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.access$300(XMPPTCPConnection.java:1000)
at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader$1.run(XMPPTCPConnection.java:1016)
at java.lang.Thread.run(Thread.java:748)
May 11, 2020 5:33:02 AM org.jivesoftware.smack.AbstractXMPPConnection callConnectionClosedOnErrorListener
WARNING: Connection XMPPTCPConnection[not-authenticated] (0) closed with error
org.jivesoftware.smack.XMPPException$StreamErrorException: host-unknown You can read more about the meaning of this stream error at http://xmpp.org/rfcs/rfc6120.html#streams-error-conditions
stream:errorThis server does not serve auth.my.domain</stream:error>
at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.parsePackets(XMPPTCPConnection.java:1064)
at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.access$300(XMPPTCPConnection.java:1000)
at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader$1.run(XMPPTCPConnection.java:1016)
at java.lang.Thread.run(Thread.java:748)

do you know how the 2nd jvb (with c2s5594e94bf450) cannot authenticated ? i already register jvb2@mydomain in the prosodyctl –

thank you :blush:

it looks like you are having network issues. Try spinning up the second jvb and see if you can reach (ping) prosody. if not, fix that issue and try again.

i have change the docker-compose.yml with remove the XMPP_DOMAIN at services jvb2 (as default format in environtmen), but im still got this SEVERE…

is it still about network issues ?

it looks like now you are getting an authentication error. how does prosody’s logs look like ?

this is my prosody’s logs
prosody log.txt (8.2 KB)

do you see this block of logs every time you restart your jvb2 ?

c2s5594e8f96b90 info Client connected
c2s5594e8f96b90 info Stream encrypted (TLSv1.2 with ECDHE-RSA-AES256-GCM-SHA384)
c2s5594e8f96b90 info Client disconnected: connection closed

I ask myself the same question, I deployed jitsi on kubernetes with multiple videeobridges instances. After multiple tests, I think the load balancing is done on the conference and not on the number of users.

So the answer is Octo. I asked same question in last jitsi meeting and they said that it’s not gonna load balance same conference. To do the load balancing of same conference, we have to use Octo.

I tried it too in my local environment and as well as in the cloud. I have deployed 2 JVB’s running on separate VM’s and both the VM’s are in same region lets say Singapore but in the JVB logs I’m getting INFO: Octo relay is disabled and in the UI, server count is 1.

Can you please share the steps? I’m following this link: https://github.com/jitsi/jitsi-videobridge/blob/master/doc/octo.md

In my case it is not showing Server count:2 .

Hi @creativeguitar,

I’ve already tried to follow your guide above to add extra jvb for docker meet on a different server, with the following steps:

  1. Modify the docker-compose.yml file to only deploy the JVB and not the whole stack. Here is the content of docker-compose.yml file:

version: ‘3’

services:
# Video bridge
jvb:
image: jitsi/jvb:latest
restart: {RESTART_POLICY} ports: - '{JVB_PORT}:{JVB_PORT}/udp' - '{JVB_TCP_PORT}:{JVB_TCP_PORT}' - '4096:4096/udp' volumes: - {CONFIG}/jvb:/config:Z
environment:
- DOCKER_HOST_ADDRESS
- XMPP_AUTH_DOMAIN
- XMPP_INTERNAL_MUC_DOMAIN
- XMPP_SERVER
- JVB_AUTH_USER
- JVB_AUTH_PASSWORD
- JVB_BREWERY_MUC
- JVB_PORT
- JVB_TCP_HARVESTER_DISABLED
- JVB_TCP_PORT
- JVB_STUN_SERVERS
- JVB_ENABLE_APIS
- TZ
# depends_on:
# - prosody
networks:
meet.jitsi:

# Custom network so all services can communicate using a FQDN
   networks:
        meet.jitsi:
  1. Change the variable name in the .env file JVB_AUTH_USER=JVB2. Here is the modification of .env file that i’ve made in jvb-docker:
  • Change the JVB_AUTH_PASSWORD (following the value in docker-jitsi-meet main server)

  • Change the HTTP_PORT=80 and HTTPS_PORT=443 (following the value in docker-jitsi-meet main server)

  • change the PUBLIC_URL=https://mydomain.org (following the value in docker-jitsi-meet main server)

  • Change the variable name in the .env file:

JVB_AUTH_USER=jvb2
  1. Edit prosody/rootfs/etc/cont-init.d/10-config and add the following line to register 2nd jvb to prosody:
prosodyctl --config $PROSODY_CFG register JVB2 $XMPP_AUTH_DOMAIN $JVB_AUTH_PASSWORD
  1. Change docker-compose.yml in the main server as well to build locally
# XMPP server
prosody:
    image: jitsi/prosody:latest
    restart: ${RESTART_POLICY}
    expose:
        - '5222'
        - '5347'
        - '5280'
    ports:
        - '5222:5222'
        - '5347:5347'
        - '5280:5280'
    volumes:
        - ${CONFIG}/prosody/config:/config:Z
        - ${CONFIG}/prosody/prosody-plugins-custom:/prosody-plugins-custom:Z

But the jvb failed to connect to main server, here is the log at docker-jvb server:

jvb_1 | Jul 07, 2020 4:13:44 PM org.jitsi.utils.logging2.LoggerImpl log
jvb_1 | WARNING: [MucClient id=shard hostname=xmpp.meet.jitsi] error connecting
jvb_1 | org.jivesoftware.smack.SmackException$ConnectionException: The following addresses failed: ‘xmpp.meet.jitsi:5222’ failed because: java.net.UnknownHostException: xmpp.meet.jitsi
jvb_1 | at org.jivesoftware.smack.SmackException$ConnectionException.from(SmackException.java:278)
jvb_1 | at org.jivesoftware.smack.tcp.XMPPTCPConnection.connectUsingConfiguration(XMPPTCPConnection.java:619)
jvb_1 | at org.jivesoftware.smack.tcp.XMPPTCPConnection.connectInternal(XMPPTCPConnection.java:902)
jvb_1 | at org.jivesoftware.smack.AbstractXMPPConnection.connect(AbstractXMPPConnection.java:383)
jvb_1 | at org.jitsi.xmpp.mucclient.MucClient.lambda$getConnectAndLoginCallable$7(MucClient.java:638)
jvb_1 | at org.jitsi.retry.RetryStrategy$TaskRunner.run(RetryStrategy.java:193)
jvb_1 | at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
jvb_1 | at java.util.concurrent.FutureTask.run(FutureTask.java:266)
jvb_1 | at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
jvb_1 | at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
jvb_1 | at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
jvb_1 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
jvb_1 | at java.lang.Thread.run(Thread.java:748)

Is there any additional settings that i need to add in both server (docker-jitsi-meet and docker-jvb)?

Thanks