TUTORIAL: Jibri Overview, Troubleshooting Tips & Tricks - Solve your Jibri Problems, Quickly!

It seems that most people find Jibri implementation to be the most challenging of the suite of solutions. I am by no measure an expert on this, but I’ve done several installs of Jibri, purged it a number of times and reinstalled, so I thought I should share some of what I’ve gained with anyone who may find it useful. I’ll try to explain this in layman terms, so the information is not overwhelming. This is a long read, but it will save you a lot of time and a lot of headache trying to figure out what’s wrong or waiting for help in the forum. If you like, you can just jump to the Troubleshooting and Tips section.

QUICK OVERVIEW:

1. What is Jibri?
Jibri is the recording and streaming instrument for Jitsi Meet conferences. Its capabilities include:

  1. Record a Jitsi meeting, capturing both audio and video
  2. Livestream a Jitsi meeting (through any RTMP)
  3. Do a local (audio) recording of a Jitsi meeting

2. How does it work?
Understanding how Jibri works will help you to know what to look for when you run into problems with it.

Jibri operates just like any other participant in a meeting. It enters the meeting as a hidden user (not sending audio or video of its own) and it records the meeting (screencasting), pretty much the same way as you would use a screen recorder to record events on your screen. In fact, you can confirm the presence of Jibri if you activate “Local Recording” and then look in the speaker stats - you will see a ‘name’ (mix of characters) that shows an extra participant in your meeting. For instance, in the example below, the Participant with the name “8ae9f547” is Jibri.

Screen Shot 2020-08-31 at 12.46.39 AM

Jibri does screencasting by joining the meeting just like any other participant, spinning its own ‘monitor’ (which you don’t see), and then recording the meeting from its own screen ('monitor). This is important to note, because, amongst other things, it means that just like one participant can have problems in a meeting while everyone else is fine, Jibri can also have problems, yet a Jitsi Meet conference will run successfully and other participants will not be affected.

One important thing to note: Jibri can only record one meeting at a time. This means you need an instance of Jibri for every meeting you need to record.

TROUBLESHOOTING

Now, this is the main purpose of this tutorial and probably the reason why you clicked this link. There are two messages you’re likely to get when your recording does not start as expected:

  1. All recorders are currently busy - This happens when all available Jibris are being used. Remember, Jibri can only record one meeting at a time, so if your available pool of Jibris is used up (in use), you will not be able to record until one becomes available. And that’s when you get this message.
  2. Recording unavailable - This is an error message. It is the generic message you get when something is actually wrong with Jibri - usually telling you Jibri is not properly installed or configured. It’s important to note that you will get this same error message on your screen when Jibri doesn’t work for any reason other than that the available recorders are busy. So the error message itself is not very specific. However, the timing of the error message could be very instructive.

Jibri errors (“Recording Unavailable”)

Screen Shot 2020-11-21 at 5.46.30 PM
There are a few things that could go wrong, but as complicated as Jibri seems, the beautiful thing is, there are just a handful of places where those things could go wrong. This makes troubleshooting relatively not as painful.

TIPS

Recording fails immediately

Remember that Jibri is a meeting participant as well, right? So that means, the first problem Jibri could have could be with getting into the meeting room. In fact, one BIG clue that suggests this is the cause of your Jibri problem is that when you click the “Start recording” command, you INSTANTLY get that error message. If recording fails immediately, check the following:

Jibri.conf

  • Take a careful look at your Jibri.conf file (/etc/jitsi/jibri/jibri.conf). This is your main configuration file for Jibri and the area where most mistakes happen. This file will pretty much be empty when you first install Jibri, so you have to populate it. If it’s not populated, Jibri will fail instantly.
  • Use the sample/reference file to populateyour jibri.conf. Make sure you complete the xmpp section using the example from example_xmpp.
  • In the xmpp section, make sure you enter the names and passwords you chose when creating the relevant accounts for Jibri in Prosody (“jibri” and “recorder”) accurately. Verify and re-verify that you actually entered the usernames and passwords correctly! To verify:

Check the registered recorder name and password

grep password /var/lib/prosody/recorder*/accounts/recorder.dat
sed -n ‘/call.login/, /}/p’ /etc/jitsi/jibri/config.json | grep password
sed -n ‘/call.login/, /}/p’ /etc/jitsi/jibri/jibri.conf | grep password

Check the registered jibri username and password

grep password /var/lib/prosody/auth*/accounts/jibri.dat
sed -n ‘/control.login/, /}/p’ /etc/jitsi/jibri/config.json | grep password
sed -n ‘/control.login/, /}/p’ /etc/jitsi/jibri/jibri.conf | grep password

  • If you previously created a config.json file (previous version of Jibri), don’t just copy and paste the contents of that file into your jibri.conf; you need to extract the actual values as the field names are slightly - but significantly - different. [Note that config.json is being deprecated, so it’s best to move your configurations to jibri.conf, if you haven’t done so already. Once you do, delete the config.json file].

Jibri log folder

This is an unusual one, but it’s worth noting. I’ve only seen it happen when I uninstalled and then re-installed Jibri, but who knows? Anyway, if you’ve confirmed that everything is fine with your jibri.conf, go to “/var/log/jitsi” and confirm that you have a directory named “jibri” there. If you don’t, create one and make sure Jibri can write to it (just make jibri the owner). If this directory is missing or if it’s present but Jibri does not have permissions to access it, Jibri will fail instantly. Also. make sure that jibri is part of all the necessary groups:

usermod -aG adm,audio,video,plugdev jibri

Recording fails after a few seconds

This differs significantly from an instant error message. In this case, you get a pop-up message advising that Jibri is “preparing to record the meeting”

Screen Shot 2020-11-21 at 5.50.26 PM

But then a few seconds or several seconds later, that pop-up is replaced by the error pop-up.

Screen Shot 2020-11-21 at 5.46.30 PM

In this case, it often suggests that Jibri may have been able to enter the meeting, but it wasn’t configured properly, so it’s unable to start recording. In instances like this, it’s not even unusual to have a folder created in the recording directory, but the folder will only contain a metadata.json without an actual mp4 file. When this happens, check the following:

Jibri.conf

  • Yes, again, jibri.conf. If you in fact populated your jibri.conf file, but have the wrong values or made a mistake, this could be the reason. What happens is that the configuration is being read (hence the pause) and when it’s discovered that the credentials are wrong, then the error message gets kicked out. Again, do all the checks listed above under Jibri.conf and correct any errors discovered.

Sip Communicator Properties (Jicofo)

  • Check your Jicofo configurations for jibri to make sure you’ve entered them correctly:

sudo nano /etc/jitsi/jicofo/sip-communicator.properties

  • Confirm that you’ve added the following lines:

org.jitsi.jicofo.jibri.BREWERY=JibriBrewery@internal.auth.my.domain.com
org.jitsi.jicofo.jibri.PENDING_TIMEOUT=90

  • BE SURE TO CHANGE “my.domain.com” TO YOUR JITSI SUBDOMAIN NAME!!!

cfg.lua file (Prosody)

  • Check your prosody (lua) configuration

nano /etc/prosody/conf.avail/my.domain.com.cfg.lua

Make sure you’ve added this block at the end of the file:

Screen Shot 2020-11-22 at 4.40.41 AM

  • Again, be sure to remember to edit it to reflect your Jitsi subdomain.

Recording is successful but mp4 is corrupt (cannot be opened)

This is usually due to a java version error. Jibri requires Java 8 to work properly.

  • Check to make sure you’ve installed Java 8 on your system.

java -version

  • If you have another (more current) version of Java installed, that’s what will be listed when you check your java version.
  • To check for multiple versions of java on your system:

update-alternatives --config java

  • This should list all the versions. Make sure you see the following line as one of the options:

/usr/lib/jvm/adoptopenjdk-8-hotspot-amd64/bin/java

  • Now, make sure you set it as the correct java home environment variable. Open launch.sh

nano /opt/jitsi/jibri/launch.sh

replace “java” with the full path “/usr/lib/jvm/adoptopenjdk-8-hotspot-amd64/bin/java”

Finally, ALWAYS restart Jibri when you make any configuration change. This is more often the cause of errors than one would believe.

CONCLUSION
Hopefully one of these tips has helped you to solve your Jibri problem. Please, feel free to add anything else you may have discovered that could prove helpful to others. I will try to add more information as I run across them.

1 Like

Some other possible issues:

  • the resource deficiencies
    at least 4 cores / 4 GB RAM for a seperate Jibri server
    at least 8 cores / 8 GB RAM if JMS and Jibri are on the same server

  • the missing snd_aloop module
    Some cloud kernel has no snd_aloop support. It’s needed to switch to the standard Linux kernel in this case.

  • self-signed TLS certificate for JMS
    Add --ignore-certificate-errors to the Chrome flags if this is the case

    chrome {
        flags = [
            "--use-fake-ui-for-media-stream",
            "--start-maximized",
            "--kiosk",
            "--enabled",
            "--disable-infobars",
            "--autoplay-policy=no-user-gesture-required",
            "--ignore-certificate-errors"
        ]
    }
  • Unaccessable TCP/5222
    If jibri is on a seperate server, TCP/5222 must be open on JMS

  • Unresolvable JMS address
    jibri must resolv the JMS host address correctly

  • Nonexistant recording folder
    The recording folder must exist

  • Nonwritable recording folder
    The recording folder must be writable for the jibri user

  • Already installed desktop environment
    Jibri has its own desktop environment. If there is already installed one, this may cause some problems.

  • Not working JVB
    Don’t start installing Jibri before a fully working JMS. Don’t forget to test it with 3 participants.

  • Docker installation
    God help you

1 Like

:joy: :joy: :joy: :joy: :joy: :joy: :joy: