How can I add extra jvb in docker meet

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

you have to change in .env

XMPP_SERVER=theServerNameWhereProsodyDockerIsHostedAt.com

Hi @creativeguitar,

Thanks for your advice, i’ve already changed the value in .env file to the following:

XMPP_SERVER=mydomain.org

and the value in ~/.jitsi-meet-cfg/jvb/sip-communicator.properties file to the following:

org.jitsi.videobridge.xmpp.user.shard.HOSTNAME=mydomain.org

and i can see in the main server log that jvb is connected:

prosody_1 | c2s55a3605a38e0 info Client connected
prosody_1 | c2s55a3605a38e0 info Stream encrypted (TLSv1.2 with ECDHE-RSA-AES256-GCM-SHA384)

But the jvb log still shows some warning:

jvb_1 | Jul 08, 2020 9:40:40 AM org.jitsi.utils.logging2.LoggerImpl log
jvb_1 | INFO: Logging in.
jvb_1 | Jul 08, 2020 9:40:40 AM org.jitsi.utils.logging.LoggerImpl log
jvb_1 | SEVERE: org.jivesoftware.smack.sasl.SASLErrorException: SASLError using SCRAM-SHA-1: not-authorized
jvb_1 | org.jivesoftware.smack.sasl.SASLErrorException: SASLError using SCRAM-SHA-1: not-authorized

Is there any steps that i’ve missed?

it looks like an auth issue.

Show me where you have the username and password in sip-communicator.properties
org.jitsi.videobridge.xmpp.user.shard.USERNAME=
org.jitsi.videobridge.xmpp.user.shard.PASSWORD=

and the matching username name and password of the JVB in the prosody file etc/cont-init.d/10-config

Hi @creativeguitar,
Here is the username and password located at JVB server (.jitsi-meet-cfg/jvb/sip-communicator.properties):

org.jitsi.videobridge.xmpp.user.shard.USERNAME=jvb2
org.jitsi.videobridge.xmpp.user.shard.PASSWORD=988357736677d4743b09e39d61866558

I’ve already set the same value for the password with the value in JVB_AUTH_PASSWORD from Jitsi meet main server (.env file).

And here is the content of file etc/cont-init.d/10-config in Jitsi meet main server:

#!/usr/bin/with-contenv bash

if [[ ! -f /etc/saslauthd.conf ]]; then
tpl /defaults/saslauthd.conf > /etc/saslauthd.conf
mkdir -pm777 /var/run/saslauthd
adduser prosody sasl
echo >> /etc/ldap/ldap.conf "TLS_REQCERT allow"
fi

PROSODY_CFG="/config/prosody.cfg.lua"

if [[ ! -d /config/data ]]; then
mkdir -pm 750 /config/data
fi

if [[ "$(stat -c %U /config)" != "prosody" ]]; then
chown -R prosody /config
fi

if [[ "$(stat -c %U /prosody-plugins)" != "prosody" ]]; then
chown -R prosody /prosody-plugins
fi

if [[ "$(stat -c %U /prosody-plugins-custom)" != "prosody" ]]; then
chown -R prosody /prosody-plugins-custom
fi

if [[ ! -f $PROSODY_CFG ]]; then
cp -r /defaults/* /config
tpl /defaults/prosody.cfg.lua > $PROSODY_CFG
tpl /defaults/conf.d/jitsi-meet.cfg.lua > /config/conf.d/jitsi-meet.cfg.lua

if [[ -z $JICOFO_COMPONENT_SECRET || -z $JICOFO_AUTH_PASSWORD ]]; then
    echo 'FATAL ERROR: Jicofo component secret and auth password must be set'
    exit 1
fi

prosodyctl --config $PROSODY_CFG register $JICOFO_AUTH_USER $XMPP_AUTH_DOMAIN $JICOFO_AUTH_PASSWORD
prosodyctl --config $PROSODY_CFG register JVB2 $XMPP_AUTH_DOMAIN $JVB_AUTH_PASSWORD

if [[ -z $JVB_AUTH_PASSWORD ]]; then
    echo 'FATAL ERROR: JVB auth password must be set'
    exit 1
fi

OLD_JVB_AUTH_PASSWORD=passw0rd
if [[ "$JVB_AUTH_PASSWORD" == "$OLD_JVB_AUTH_PASSWORD" ]]; then
    echo 'FATAL ERROR: JVB auth password must be changed, check the README'
    exit 1
fi

prosodyctl --config $PROSODY_CFG register $JVB_AUTH_USER $XMPP_AUTH_DOMAIN $JVB_AUTH_PASSWORD

if [[ ! -z $JIBRI_XMPP_USER ]] && [[ ! -z $JIBRI_XMPP_PASSWORD ]]; then
    OLD_JIBRI_XMPP_PASSWORD=passw0rd
    if [[ "$JIBRI_XMPP_PASSWORD" == "$OLD_JIBRI_XMPP_PASSWORD" ]]; then
        echo 'FATAL ERROR: Jibri auth password must be changed, check the README'
        exit 1
    fi
    prosodyctl --config $PROSODY_CFG register $JIBRI_XMPP_USER $XMPP_AUTH_DOMAIN $JIBRI_XMPP_PASSWORD
fi

if [[ ! -z $JIBRI_RECORDER_USER ]] && [[ ! -z $JIBRI_RECORDER_PASSWORD ]]; then
    OLD_JIBRI_RECORDER_PASSWORD=passw0rd
    if [[ "$JIBRI_RECORDER_PASSWORD" == "$OLD_JIBRI_RECORDER_PASSWORD" ]]; then
        echo 'FATAL ERROR: Jibri recorder password must be changed, check the README'
        exit 1
    fi
    prosodyctl --config $PROSODY_CFG register $JIBRI_RECORDER_USER $XMPP_RECORDER_DOMAIN $JIBRI_RECORDER_PASSWORD
fi

if [[ ! -z $JIGASI_XMPP_USER ]] && [[ ! -z $JIGASI_XMPP_PASSWORD ]]; then
    OLD_JIGASI_XMPP_PASSWORD=passw0rd
    if [[ "$JIGASI_XMPP_PASSWORD" == "$OLD_JIGASI_XMPP_PASSWORD" ]]; then
        echo 'FATAL ERROR: Jigasi auth password must be changed, check the README'
        exit 1
    fi
    prosodyctl --config $PROSODY_CFG register $JIGASI_XMPP_USER $XMPP_AUTH_DOMAIN $JIGASI_XMPP_PASSWORD
fi
fi

mkdir -p /config/certs

if [[ ! -f /config/certs/$XMPP_DOMAIN.crt ]]; then
# echo for using all default values
echo | prosodyctl --config $PROSODY_CFG cert generate $XMPP_DOMAIN
fi

if [[ ! -f /config/certs/$XMPP_AUTH_DOMAIN.crt ]]; then
# echo for using all default values
echo | prosodyctl --config $PROSODY_CFG cert generate $XMPP_AUTH_DOMAIN
fi

# certs will be created in /config/data
mv /config/data/*.{crt,key} /config/certs/ || true
rm -f /config/data/*.cnf

I don’t know where should I put the username and password in the the prosody file etc/cont-init.d/10-config.

Thanks for your advice

Hi @creativeguitar,

I finally succeeded to add the jvb server.
It should be jvb in this setting at jvb server:

org.jitsi.videobridge.xmpp.user.shard.USERNAME=jvb

Thanks for your help

if you wanted to use jvb2 this is the line that you need

prosodyctl --config $PROSODY_CFG register JVB2 $XMPP_AUTH_DOMAIN $JVB_AUTH_PASSWORD

and it looks like its already there. somehow your file is not getting use when you deploy the docker container

Hello,

I’ve an issue with setup Jitsi-meet with two video bridge in docker.

1, Created a jitsi-docker setup by following https://jitsi.github.io/handbook/docs/devops-guide/devops-guide-docker in my local server.

Using my server IP 192.168.3.41:8443 I can browse the jitsi-meet.

2, Then, I tried to add another JVB on the same server, say jvb2 by copying jitsi video bridge part from docker-compose and copied .env file from the main jitsi-meet and changed the JVB2 port 10000 to 10001, 4443 to 4444.

The docker compose for JVB2 is,

version: ‘3’
services:
JVB2:
image: jitsi/jvb:latest
restart: {RESTART_POLICY} ports: - ‘{JVB_PORT}:{JVB_PORT}/udp’ - ‘{JVB_TCP_PORT}:{JVB_TCP_PORT}’ 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
    networks:
    meet.jitsi:
    networks:
    meet.jitsi:

For adding jvb2, In my primary prosody, I added the line

prosodyctl --config $PROSODY_CFG register JVB2 $XMPP_AUTH_DOMAIN $JVB_AUTH_PASSWORD

Also, I copied .env file from my main jitsi derver to second jvb’s folder.

When I trying to up the second jvb(jvb2) I’m getting the following error,

JVB2_1 | Jul 19, 2020 4:16:08 PM org.jitsi.utils.logging2.LoggerImpl log
JVB2_1 | INFO: create_conf, id=2a2453cf7e5d9ca9 gid=null logging=false
JVB2_1 | Jul 19, 2020 4:16:08 PM org.jitsi.utils.logging2.LoggerImpl log
JVB2_1 | INFO: TaskPools detected 4 processors, creating the CPU pool with that many threads
JVB2_1 | Jul 19, 2020 4:16:08 PM org.ice4j.ice.harvest.AbstractUdpListener
JVB2_1 | INFO: Initialized AbstractUdpListener with address 172.18.0.2:10000/udp. Receive buffer size 212992 (asked for 10485760)
JVB2_1 | Jul 19, 2020 4:16:08 PM org.ice4j.ice.harvest.SinglePortUdpHarvester
JVB2_1 | INFO: Initialized SinglePortUdpHarvester with address 172.18.0.2:10000/udp
JVB2_1 | Jul 19, 2020 4:16:08 PM org.jitsi.utils.logging2.LoggerImpl log
JVB2_1 | WARNING: [MucClient id=shard hostname=xmpp.meet.jitsi] error connecting
JVB2_1 | org.jivesoftware.smack.SmackException$ConnectionException: The following addresses failed: ‘xmpp.meet.jitsi:5222’ failed because: java.net.UnknownHostException: xmpp.meet.jitsi: Name or service not known
JVB2_1 | at org.jivesoftware.smack.SmackException$ConnectionException.from(SmackException.java:278)
JVB2_1 | at org.jivesoftware.smack.tcp.XMPPTCPConnection.connectUsingConfiguration(XMPPTCPConnection.java:619)
JVB2_1 | at org.jivesoftware.smack.tcp.XMPPTCPConnection.connectInternal(XMPPTCPConnection.java:902)
JVB2_1 | at org.jivesoftware.smack.AbstractXMPPConnection.connect(AbstractXMPPConnection.java:383)
JVB2_1 | at org.jitsi.xmpp.mucclient.MucClient.lambda$getConnectAndLoginCallable$7(MucClient.java:638)
JVB2_1 | at org.jitsi.retry.RetryStrategy$TaskRunner.run(RetryStrategy.java:193)
JVB2_1 | at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
JVB2_1 | at java.util.concurrent.FutureTask.run(FutureTask.java:266)
JVB2_1 | at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
JVB2_1 | at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
JVB2_1 | at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
JVB2_1 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
JVB2_1 | at java.lang.Thread.run(Thread.java:748)

Can you please help

I did it in a very easy way.

Here are the steps:

  1. Edit orginal jitsi-meet docker-compose.yml file and change:

version: ‘3’ to version: ‘3.5’

and in network definition add a name to it like this:

networks:
meet.jitsi:
name: custom_jitsi_network

  1. Start up jitsi-meet on docker using the docker-compose.yml file as always.
  2. Create a new directory jvb2 and copy two files inside, docker-compose.yml and .env file.
  3. Move yourselft into that jvb2 directory.
  4. Edit .env file and change these three variables:

JVB_PORT=10000 to JVB_PORT=10001
JVB_TCP_PORT=4443 to JVB_TCP_PORT=4444
JVB_TCP_MAPPED_PORT=4443 to JVB_TCP_MAPPED_PORT=4444

  1. Save .env file and close it.
  2. Edit docker-compose.yml like this:

version: ‘3.5’

services:
# Video bridge
jvb2:
image: jitsi/jvb:stable-4627-1
restart: {RESTART_POLICY} ports: - '{JVB_PORT}:{JVB_PORT}/udp' - '{JVB_TCP_MAPPED_PORT}:{JVB_TCP_PORT}' 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
networks:
meet.jitsi:

networks:
meet.jitsi:
external:
name: custom_jitsi_network

As you can see, it is the same content as the original file but with only jvb2 service and it connects to the same network as external. Save and close the file.
8. Start up jvb2 executing docker-compose up -d and voila.

As you can see there is no need to create another JVB_AUTH_USER and edit prosody config file.

Greetings!

2 Likes

The problem you have is jvb2 service lives on his own network so it cannot see the others services that exist on the OTHER network.

What you have to do is give a name to the network on the first docker-compose.yml at the end of the file and update version to 3.5. On the second docker-compose.yml for jvb2 you must add at the network
external:
name:

and update version to 3.5

I will explain better in the main thread so everyone can see.
Greetings!!

Thank you @Daniel_Morales it works :slight_smile:

1 Like

Hi @Daniel_Morales,

I’ve already try to follow your suggestion above:

  1. Update version to 3.5

  2. add a name in network definition

and when i start the docker with docker compose, it shown the following error:

ERROR: The Compose file ‘./docker-compose.yml’ is invalid because:
networks.meet.jitsi value Additional properties are not allowed (‘name’ was unexpected)

could you please give suggestion to resolve this error?

Thanks

@damencho @saghul @Daniel_Morales,

If I add a second video bridge on a completely different or on the same machine, can I accommodate ~150 users in every single meeting that takes place ?

Is adding more jvb’s the ultimate solution to accomodating more users (above the existing capacity. i.e 60 ) ?

Maybe you must update docker-compose binary on your machine.

Yes,

Problem solved when I update the docker-compose binary. Thanks for your reply.

One more question, do you have experience for enabling octo on the same machine? I already have succeeded to implement in docker environment but with different machine and now i’m struggling to implement octo in the same machine.

Any advice would be appreciated.

Thanks

@Daniel_Morales,

One more question please, how do you test that the configuration above are working well? I’ve seen the videobridge is connected to the main server, but I don’t see the traffic goes to 2nd jvb.

I’m checking the statistic of both video bridge using colibri.

Thanks

I use the JICOFO_BRIDGE_SELECTION_STRATEGY=SplitBridgeSelectionStrategy to split participant in round robin jvb

Hi @goacid,

I also use this with octo, but it works when i deploy extra jvb in different server. I still have problem in implementing extra jvb on the same server.

Do you implement split bridge selection strategy at the same server?
Thanks

I tried it using docker-compose but it didn’t work for me too. Hence deployed extra jvb on different server.