Jibri multiple seperate machines connecting to the one jitsi instance - generates a XMPP conflict error

What kind of things would you need to change in order to have another instance of a Jibri server?
i know there is the docker image, which I’ve tried looking through to see what it keeps unique and the same, but still seem to get trouble.

I have:

  • Created two new users on jitsi with:
sudo prosodyctl register jibri2 jitsi.domainname.org.au long-password-goes-here
sudo prosodyctl register recorder2 recorder.jitsi.domainname.org.au long-password-here
  • Given each Jibri instance it’s own unique id in the jibri { } .conf block , so id=“firstone”
  • Changed the jibri.conf on each server to point to the different login names for the control-login and call-login.

What I find is that I can have one of the two servers up, and have them do recording.

If I have both up though, I get an XMPP error saying the RecorderAnnouncer has a conflict, that looks like this.

2021-09-29 05:50:15.982 INFO: [1] org.jitsi.jibri.api.xmpp.XmppApi.log() The trustAllXmppCerts config is enabled for this domain, all XMPP server provided certificates will be accepted
2021-09-29 05:50:16.030 INFO: [1] org.jitsi.jibri.Main.log() Using port 2222 for HTTP API
2021-09-29 05:50:16.032 WARNING: [27] org.jitsi.xmpp.mucclient.MucClient.log() Disabling certificate verification!
2021-09-29 05:50:16.375 INFO: [27] org.jitsi.xmpp.mucclient.MucClient.log() Connected.
2021-09-29 05:50:16.375 INFO: [27] org.jitsi.xmpp.mucclient.MucClient.log() Logging in.
2021-09-29 05:50:16.513 SEVERE: [27] org.jivesoftware.smack.AbstractXMPPConnection.callConnectionAuthenticatedListener() Exception in authenticated listener
java.lang.RuntimeException: org.jivesoftware.smack.XMPPException$XMPPErrorException: XMPP error reply received from jibribrewery@internal.auth.jitsi.domain-name.org.au/RecorderAnnouncer: XMPPError: conflict - cancel

I suspect it may be to do with a conflict in the XMPP port being 5222, but that wouldn’t seem right. I’m not sure why what the RecorderAnnouncer is seeing a conflict for, unless we can only have one server/user waiting in the recording.domain-name.jitsi.org.au name?

You only need to give each Jibri a unique ID, everything else is the same. You don’t need multiple Jibri users to connect to them.

That’s good to know about the ID only needing to be unique. When I changed the account information (recorder2 and jibri2 back to the original one), I’ve found that the second recording server does not seem to register itself as idle to Jitsi.

While doing a recording on server one, I tried logging server two:

2021-09-30 02:08:52.667 INFO: [1] org.jitsi.jibri.Main.log() Using port 3333 for internal HTTP API
2021-09-30 02:08:52.693 FINE: [18] org.jitsi.jibri.webhooks.v1.WebhookClient.log() Updating 0 subscribers of status
2021-09-30 02:08:53.272 INFO: [1] org.jitsi.jibri.api.xmpp.XmppApi.log() Jibri reports its status is now JibriStatus(busyStatus=IDLE, health=OverallHealth(healthStatus=HEALTHY, details={})), publishing presence to connections
2021-09-30 02:08:53.290 INFO: [1] org.jitsi.jibri.api.xmpp.XmppApi.log() Connecting to xmpp environment on jitsi.bpsdassist.org.au with config XmppEnvironmentConfig(name=prod environment, xmppServerHosts=[jitsi.bpsdassist.org.au], xmppDomain=jitsi.bpsdassist.org.au, baseUrl=null, controlLogin=XmppCredentials(domain=jitsi.bpsdassist.org.au, port=null, username=jibri, password=*****), controlMuc=XmppMuc(domain=internal.auth.jitsi.bpsdassist.org.au, roomName=JibriBrewery, nickname=RecorderAnnouncer), sipControlMuc=null, callLogin=XmppCredentials(domain=recorder.jitsi.bpsdassist.org.au, port=null, username=recorder, password=*****), stripFromRoomDomain=conference., usageTimeoutMins=60, trustAllXmppCerts=true)
2021-09-30 02:08:53.294 INFO: [1] org.jitsi.jibri.api.xmpp.XmppApi.log() The trustAllXmppCerts config is enabled for this domain, all XMPP server provided certificates will be accepted
2021-09-30 02:08:53.344 INFO: [1] org.jitsi.jibri.Main.log() Using port 2222 for HTTP API
2021-09-30 02:08:53.357 WARNING: [27] org.jitsi.xmpp.mucclient.MucClient.log() Disabling certificate verification!
2021-09-30 02:08:53.712 INFO: [27] org.jitsi.xmpp.mucclient.MucClient.log() Connected.
2021-09-30 02:08:53.713 INFO: [27] org.jitsi.xmpp.mucclient.MucClient.log() Logging in.
2021-09-30 02:08:53.858 INFO: [27] org.jitsi.xmpp.mucclient.MucClient.log() Joined MUC: jibribrewery@internal.auth.jitsi.bpsdassist.org.au
2021-09-30 02:09:52.659 FINE: [18] org.jitsi.jibri.webhooks.v1.WebhookClient.log() Updating 0 subscribers of status
2021-09-30 02:10:52.659 FINE: [18] org.jitsi.jibri.webhooks.v1.WebhookClient.log() Updating 0 subscribers of status

It’s saying that it’s sitting there idle in theory.

Looking at the jicofo.log on the jitsi box, it is telling me that it can’t find the second server.

Jicofo 2021-09-30 02:07:35.560 INFO: [20] [room=testingrecorderone@conference.jitsi.domain-name.org.au] ChatRoomRoleAndPresence.memberPresenceChanged#129: Chat room event PresenceUpdated member=ChatMember[testingrecorderone@conference.jitsi.domain-name.org.au/3058b1b6, jid: lptz0fyv_en62ugk@guest.jitsi.domain-name.org.au/cQ8fI7qI]@1110652613

Jicofo 2021-09-30 02:12:11.207 SEVERE: [14] JibriSession.startInternal#324: Unable to find an available Jibri, can't start
Jicofo 2021-09-30 02:12:11.207 INFO: [14] [room=daberi@conference.jitsi.bpsdassist.org.au] JibriRecorder.handleStartRequest#174: Failed to start a Jibri session, all Jibris were busy
Jicofo 2021-09-30 02:09:08.374 SEVERE: [100] JibriSession.startInternal#324: Unable to find an available Jibri, can't start
Jicofo 2021-09-30 02:09:08.375 INFO: [100] [room=daberi@conference.jitsi.bpsdassist.org.au] JibriRecorder.handleStartRequest#174: Failed to start a Jibri session, all Jibris were busy
Jicofo 2021-09-30 02:12:11.207 SEVERE: [14] JibriSession.startInternal#324: Unable to find an available Jibri, can't start
Jicofo 2021-09-30 02:12:11.207 INFO: [14] [room=daberi@conference.jitsi.bpsdassist.org.au] JibriRecorder.handleStartRequest#174: Failed to start a Jibri session, all Jibris were busy

Is there an api call to see how many recorders are available? In testing what I found was the first recording server to come online is the one that will take the request, but the second one never gets recognised.

  • Recording server 1 offline, 2 up - 2 Takes the recording request and works
  • Recording server 2 offline, 1 up - 1 Takes the recording request and works
    I also tried bringing them up in the order of 2 then 1. The second server would take a recording, then after stopping the recording, stopping that server. Then when I start recording, Server 1 will take the request and record! Very odd.

If at any point I try to request two at the same time though, I get the front end message saying no servers available, and the jicofo message saying that it can’t find an available jibri.

What I needed to change, was the nickname, inside control-muc. This needs to be unique.

The ID at the start of your .conf block isn’t being used at all at the moment.

So of this full block

      environments = [
              {
                name = "prod environment"
                xmpp-server-hosts = ["jitsi.domain-name.org.au"]
                xmpp-domain = "jitsi.domain-name.org.au"

                control-muc {
                    domain = "internal.auth.jitsi.domain-name.org.au"
                    room-name = "JibriBrewery"
                    nickname = "RecorderAnnouncer2"
                }

                control-login {
                    domain = "jitsi.domain-name.org.au"
                    username = "jibri"
                    password = "long-password-here"
                }

                call-login {
                    domain = "recorder.jitsi.domain-name.org.au"
                    username = "recorder"
                    password = "long-password"
                }

                strip-from-room-domain = "conference."
                usage-timeout = 1 hour
                trust-all-xmpp-certs = true
            }]

The only bit that matters for a new recorder is this bit:

                nickname = "RecorderAnnouncer2"

That’s actually what I meant (nickname) not the id field at the top of your jibri.conf. As seen, that field is basically null.