TUTORIAL - How to Install the NEW JIBRI

Missing this?

VirtualHost "recorder.jitsi.domain.com"
    modules_enabled = {
        "ping";
    }
    authentication = "internal_plain"

You should only have one prosody configuration (on your Jitsi server). Looks like you added the config block for Jibri in a lua file on your Prosody server.

VirtualHost "recorder.jitsi.domain.com"
    modules_enabled = {
        "ping";
        "limits_exception";
    }
    --authentication = "internal_hashed"
    authentication = "internal_plain"
    smacks_max_hibernated_sessions = 100

That should go in your Jitsi Prosody config.

Also, in your jibri.conf:

"–ignore-certificate-errors"

Should be:

"--ignore-certificate-errors"

Thank You for quick reply! :slight_smile:

As per your suggestion, I’ve merged recorder block into my jitsi domain prosody configuration and corrected the typo in jibri.conf. Jibri system has 4 cores and 16GB RAM.

Unfortunately, same problem remains. Unable to start recording and when clicked on “Start recording” jibri log starts flooding with:

CallPage$visit$$inlined$measureTimedValue$lambda$1.apply#58: Not joined yet: Cannot read properties of undefined (reading 'isJoined')

and then ending up with:

2021-12-20 10:27:10.628 SEVERE: [54] CallPage.visit#65: Timed out waiting for call page to load
2021-12-20 10:27:10.630 INFO: [54] [session_id=vctsuusciveiflip] JibriSelenium.onSeleniumStateChange#213: Transitioning from state Starting up to Error: FailedToJoinCall SESSION Failed to join the call
2021-12-20 10:27:10.631 INFO: [54] [session_id=vctsuusciveiflip] StatefulJibriService.onServiceStateChange#39: File recording service transitioning from state Starting up to Error: FailedToJoinCall SESSION Failed to join the call
2021-12-20 10:27:10.632 INFO: [54] XmppApi$createServiceStatusHandler$1.invoke#243: Current service had an error Error: FailedToJoinCall SESSION Failed to join the call, sending error iq <iq xmlns='jabber:client' to='jibribrewery@internal.auth.jitsi.domain.com/focus' id='8SKPK-16' type='set'><jibri xmlns='http://jitsi.org/protocol/jibri' status='off' failure_reason='error' should_retry='true'/></iq>
2021-12-20 10:27:10.633 FINE: [54] JibriStatsDClient.incrementCounter#38: Incrementing statsd counter: stop:recording
2021-12-20 10:27:10.633 INFO: [54] JibriManager.stopService#260: Stopping the current service
2021-12-20 10:27:10.633 INFO: [54] [session_id=vctsuusciveiflip] FileRecordingJibriService.stop#181: Stopping capturer
2021-12-20 10:27:10.634 INFO: [54] [session_id=vctsuusciveiflip] JibriSubprocess.stop#75: Stopping ffmpeg process
2021-12-20 10:27:10.634 INFO: [54] [session_id=vctsuusciveiflip] JibriSubprocess.stop#89: ffmpeg exited with value null
2021-12-20 10:27:10.634 INFO: [54] [session_id=vctsuusciveiflip] FileRecordingJibriService.stop#183: Quitting selenium
2021-12-20 10:27:10.635 INFO: [54] [session_id=vctsuusciveiflip] FileRecordingJibriService.stop#190: No media was recorded, deleting directory and skipping metadata file & finalize
2021-12-20 10:27:10.635 INFO: [54] [session_id=vctsuusciveiflip] JibriSelenium.leaveCallAndQuitBrowser#334: Leaving call and quitting browser
2021-12-20 10:27:10.635 INFO: [54] [session_id=vctsuusciveiflip] JibriSelenium.leaveCallAndQuitBrowser#337: Recurring call status checks cancelled
2021-12-20 10:27:10.649 INFO: [54] [session_id=vctsuusciveiflip] JibriSelenium.leaveCallAndQuitBrowser#343: Got 10 log entries for type browser
2021-12-20 10:27:10.705 INFO: [54] [session_id=vctsuusciveiflip] JibriSelenium.leaveCallAndQuitBrowser#343: Got 1008 log entries for type driver
2021-12-20 10:27:10.876 INFO: [54] [session_id=vctsuusciveiflip] JibriSelenium.leaveCallAndQuitBrowser#343: Got 0 log entries for type client
2021-12-20 10:27:10.876 INFO: [54] [session_id=vctsuusciveiflip] JibriSelenium.leaveCallAndQuitBrowser#352: Leaving web call
2021-12-20 10:27:10.915 INFO: [54] [session_id=vctsuusciveiflip] JibriSelenium.leaveCallAndQuitBrowser#359: Quitting chrome driver
2021-12-20 10:27:10.991 INFO: [54] [session_id=vctsuusciveiflip] JibriSelenium.leaveCallAndQuitBrowser#361: Chrome driver quit
2021-12-20 10:27:10.992 INFO: [54] JibriStatusManager$$special$$inlined$observable$1.afterChange#72: Busy status has changed: BUSY -> IDLE
2021-12-20 10:27:10.992 FINE: [54] WebhookClient$updateStatus$1.invokeSuspend#107: Updating 0 subscribers of status
2021-12-20 10:27:10.993 INFO: [54] XmppApi.updatePresence#144: Jibri reports its status is now JibriStatus(busyStatus=IDLE, health=OverallHealth(healthStatus=HEALTHY, details={})), publishing presence to connections

Unable to understand the timeout here!!! Any more ideas?

Thanks in advance. Genuinely appreciate the time, effort and care everyone provides here.

What kind of authentication do you have set up?
And did you restart all services after making the changes?

Haven’t set any authentication. And rebooted all the servers after changes.

Found the issue!

When prejoinConfig is enabled in jitsi.domain.com-config.js, jibri is unable to join meeting and start recording. Interestingly, when enabling the old property prejoinPageEnabled, it works as intended.

After testing this, I also found similar post here: Al configurar "prejoinConfig", Jibri no funciona (no graba, no streaming)

Hope it helps if someone is stuck in similar situation. Maybe @bbaldino could look into it.

Kind Regards

1 Like

My colleagues are welcome.

I got a Jitsy issue after installing Jibri following this tutorial.

Jicofo 2021-12-30 11:29:46.197 SEVERE: [49] [xmpp_connection=client] XmppProviderImpl.doConnect#225: Failed to connect/login: The following addresses failed: ‘RFC 6120 A/AAAA Endpoint + [localhost:5222] (localhost/127.0.0.1:5222)’ failed because: java.net.ConnectException: Connection refused, ‘RFC 6120 A/AAAA Endpoint + [localhost:5222] (localhost/[0:0:0:0:0:0:0:1]:5222)’ failed because: java.net.ConnectException: Connection refused
org.jivesoftware.smack.SmackException$EndpointConnectionException: The following addresses failed: ‘RFC 6120 A/AAAA Endpoint + [localhost:5222] (localhost/127.0.0.1:5222)’ failed because: java.net.ConnectException: Connection refused, ‘RFC 6120 A/AAAA Endpoint + [localhost:5222] (localhost/[0:0:0:0:0:0:0:1]:5222)’ failed because: java.net.ConnectException: Connection refused

root@meet:/var/log/jitsi# netstat -l | grep 5222
root@meet:/var/log/jitsi#

I did not fulfill paragraph 18.
since Jitsy server and Jibry on the same server

UPD:

root@meet:/var/log/jitsi# cat jicofo.log | head -20
Jicofo 2021-12-30 10:40:10.924 INFO: [1] Main.main#49: Starting Jicofo.
Jicofo 2021-12-30 10:40:11.258 INFO: [1] JitsiConfig.<clinit>#47: Initialized newConfig: merge of /etc/jitsi/jicofo/jicofo.conf: 1,system properties,reference.conf @ jar:file:/usr/share/jicofo/jicofo.jar!/reference.conf: 1
Jicofo 2021-12-30 10:40:11.260 INFO: [1] ReadOnlyConfigurationService.reloadConfiguration#51: loading config file at path /etc/jitsi/jicofo/sip-communicator.properties
Jicofo 2021-12-30 10:40:11.264 INFO: [1] JitsiConfig.<clinit>#68: Initialized legacyConfig: sip communicator props (no description provided)
Jicofo 2021-12-30 10:40:11.264 INFO: [1] JitsiConfig$Companion.reloadNewConfig#94: Reloading the Typesafe config source (previously reloaded 0 times).
Jicofo 2021-12-30 10:40:12.195 WARNING: [1] FocusManager.start#115: Jicofo ID is not set correctly set (value=0). Configure a valid value [1-65535] by setting org.jitsi.jicofo.SHORT_ID in sip-communicator.properties or jicofo.octo.id in jicofo.conf. Future versions will require this for Octo.
Jicofo 2021-12-30 10:40:12.236 INFO: [1] JicofoServices.createAuthenticationAuthority#200: Authentication service disabled.
Jicofo 2021-12-30 10:40:12.586 INFO: [1] XmppServices.<init>#50: No dedicated Service XMPP connection configured, re-using the client XMPP connection.
Jicofo 2021-12-30 10:40:12.592 INFO: [1] XmppServices.<init>#65: No Jigasi detector configured.
Jicofo 2021-12-30 10:40:12.617 SEVERE: [19] [xmpp_connection=client] XmppProviderImpl.doConnect#225: Failed to connect/login: The following addresses failed: 'RFC 6120 A/AAAA Endpoint + [localhost:5222] (localhost/127.0.0.1:5222)' failed because: java.net.ConnectException: Connection refused, 'RFC 6120 A/AAAA Endpoint + [localhost:5222] (localhost/[0:0:0:0:0:0:0:1]:5222)' failed because: java.net.ConnectException: Connection refused

what is the output for

netstat -tanp | grep 5222

root@meet:/var/log/jitsi# netstat -tanp | grep 5222
root@meet:/var/log/jitsi#

sip-communicator.properties:

org.jitsi.jicofo.jibri.BREWERY=JibriBrewery@internal.auth.meet.pip.ru
org.jitsi.jicofo.jibri.PENDING_TIMEOUT=90
было в дефолтом значении

/var/log/jitsi/jibri/log.0.txt

> 2021-12-30 12:37:47.493 INFO: [1] MainKt.handleCommandLineArgs#185: Jibri run with args [--config, /etc/jitsi/jibri/config.json]                                      
> 2021-12-30 12:37:47.598 INFO: [1] MainKt.setupLegacyConfig#210: Checking legacy config file /etc/jitsi/jibri/config.json                                              
> 2021-12-30 12:37:47.598 INFO: [1] MainKt.setupLegacyConfig#213: Legacy config file /etc/jitsi/jibri/config.json doesn't exist                                         
> 2021-12-30 12:37:48.040 INFO: [1] MainKt.main#55: Jibri starting up with id                                                                                           
> 2021-12-30 12:37:48.542 INFO: [1] JwtInfo$Companion.fromConfig#154: got jwtConfig: {}                                                                                 
>                                                                                                                                                                       
> 2021-12-30 12:37:48.542 INFO: [1] JwtInfo$Companion.fromConfig#164: Unable to create JwtInfo: com.typesafe.config.ConfigException$Missing: /etc/jitsi/jibri/jibri.conf
> 2021-12-30 12:37:48.766 INFO: [1] MainKt.main#125: Using port 3333 for internal HTTP API                                                                              
> 2021-12-30 12:37:48.778 FINE: [18] WebhookClient$updateStatus$1.invokeSuspend#107: Updating 0 subscribers of status                                                   
> 2021-12-30 12:37:49.190 INFO: [1] XmppApi.updatePresence#144: Jibri reports its status is now JibriStatus(busyStatus=IDLE, health=OverallHealth(healthStatus=HEALTHY, 
> 2021-12-30 12:37:49.202 INFO: [1] XmppApi.start#97: Connecting to xmpp environment on meet.pip.ru with config XmppEnvironmentConfig(name=prod environment, xmppServerH
> 2021-12-30 12:37:49.204 INFO: [1] XmppApi.start#109: The trustAllXmppCerts config is enabled for this domain, all XMPP server provided certificates will be accepted  
> 2021-12-30 12:37:49.239 INFO: [29] [hostname=meet.pip.ru id=meet.pip.ru] MucClient.initializeConnectAndJoin#272: Initializing a new MucClient for [ org.jitsi.xmpp.muc
> 2021-12-30 12:37:49.240 INFO: [1] MainKt.main#151: Using port 2222 for HTTP API                                                                                       
> 2021-12-30 12:37:49.264 WARNING: [29] MucClient.createXMPPTCPConnectionConfiguration#114: Disabling certificate verification!                                         
> 2021-12-30 12:37:49.301 INFO: [29] [hostname=meet.pip.ru id=meet.pip.ru] MucClient.initializeConnectAndJoin#331: Dispatching a thread to connect and login.           
> 2021-12-30 12:37:49.313 WARNING: [29] [hostname=meet.pip.ru id=meet.pip.ru] MucClient.lambda$getConnectAndLoginCallable$8#622: [MucClient id=meet.pip.ru hostname=meet
> org.jivesoftware.smack.SmackException$EndpointConnectionException: The following addresses failed: 'RFC 6120 A/AAAA Endpoint + [meet.pip.ru:5222] (meet.pip.ru/93.171.
>         at org.jivesoftware.smack.SmackException$EndpointConnectionException.from(SmackException.java:334)                                                            
>         at org.jivesoftware.smack.tcp.XMPPTCPConnection.connectUsingConfiguration(XMPPTCPConnection.java:663)                                                         
>         at org.jivesoftware.smack.tcp.XMPPTCPConnection.connectInternal(XMPPTCPConnection.java:846)                                                                   
>         at org.jivesoftware.smack.AbstractXMPPConnection.connect(AbstractXMPPConnection.java:529)                                                                     
>         at org.jitsi.xmpp.mucclient.MucClient.lambda$getConnectAndLoginCallable$8(MucClient.java:617)                                                                 
>         at org.jitsi.retry.RetryStrategy$TaskRunner.run(RetryStrategy.java:167)                                                                                       
>         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)

Are you even able to host a meeting at all? You have a failed addresses error. You need to resolve that first, make sure you can host a meeting with 3 participants, then move on to jibri.

Are all required ports open and accessible? Is port 10000/UDP open and properly forwarded, if behind a NAT?

Initially installed Jitsy and made it work and there were 3+ participants in the conference.

Then Jirbi was installed.
And everything stopped working, the connection is broken with one participant. I can’t even see my own video.
Judging by the logs, Jibri uses port 2222 for me?
MainKt.main # 151: Using port 2222 for HTTP API

Yes server for NAT, Nat1in1

This means that prosody is down

Hi everyone. Thanks for the excellent work. I was able to setup Jitsi correctly but can’t record. Below is my configuration file. Please help me … i’m going crazy.

Blockquote
jibri {
// A unique identifier for this Jibri
// TODO: eventually this will be required with no default
id = “”
// Whether or not Jibri should return to idle state after handling
// (successfully or unsuccessfully) a request. A value of ‘true’
// here means that a Jibri will NOT return back to the IDLE state
// and will need to be restarted in order to be used again.
single-use-mode = false
api {
http {
external-api-port = 2222
internal-api-port = 3333
}
xmpp {
// See example_xmpp_envs.conf for an example of what is expected here
environments = [
{
name = “prod environment”
xmpp-server-hosts = [“videoconferenze.consrc.it”]
xmpp-domain = “videoconferenze.consrc.it”

            control-muc {
                domain = "internal.auth.videoconferenze.consrc.it"
                room-name = "JibriBrewery"
                nickname = "jibri-nickname"
            }

            control-login {
                domain = "auth.videoconferenze.consrc.it"
                username = "jibri"
                password = "xxxxx"
            }

            call-login {
                domain = "recorder.videoconferenze.consrc.it"
                username = "recorder"
                password = "xxxxx"
            }

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

}
recording {
recordings-directory = “/srv/recordings”
# TODO: make this an optional param and remove the default
#finalize-script = “/path/to/finalize_recording.sh”
}
streaming {
// A list of regex patterns for allowed RTMP URLs. The RTMP URL used
// when starting a stream must match at least one of the patterns in
// this list.
rtmp-allow-list = [
// By default, all services are allowed
“.*”
]
}
chrome {
// The flags which will be passed to chromium when launching
flags = [
“–use-fake-ui-for-media-stream”,
“–start-maximized”,
“–kiosk”,
“–enabled”,
“–disable-infobars”,
“–autoplay-policy=no-user-gesture-required”
]
}
stats {
enable-stats-d = true
}
webhook {
// A list of subscribers interested in receiving webhook events
subscribers =
}
jwt-info {
// The path to a .pem file which will be used to sign JWT tokens used in webhook
// requests. If not set, no JWT will be added to webhook requests.
# signing-key-path = “/path/to/key.pem”

// The kid to use as part of the JWT
# kid = "key-id"

// The issuer of the JWT
# issuer = "issuer"

// The audience of the JWT
# audience = "audience"

// The TTL of each generated JWT.  Can't be less than 10 minutes.
# ttl = 1 hour

}
call-status-checks {
// If all clients have their audio and video muted and if Jibri does not
// detect any data stream (audio or video) comming in, it will stop
// recording after NO_MEDIA_TIMEOUT expires.
no-media-timeout = 30 seconds

// If all clients have their audio and video muted, Jibri consideres this
// as an empty call and stops the recording after ALL_MUTED_TIMEOUT expires.
all-muted-timeout = 10 minutes

// When detecting if a call is empty, Jibri takes into consideration for how
// long the call has been empty already. If it has been empty for more than
// DEFAULT_CALL_EMPTY_TIMEOUT, it will consider it empty and stop the recording.
default-call-empty-timeout = 30 seconds

}
}

The logs may help. See /var/log/jitsi/jibri/

1 Like

Thank you, @HBC, for this ingeniously simple workaround. Actually, I had been stuck with precisely that problem, but found your post only after coming up with my own workaround: Injecting the following javascript code in my custom plugin.head.html:

<script>
// ...
if (window.location.hash.match('[#&]config.prejoinPageEnabled=false(&|$)')) {
  delete config.prejoinConfig;
}
// ...
</script>

Maybe this also helps someone in case they are relying on the possibility to customize the new prejoinConfig.hideExtraJoinButtons property …

Thanks a lot for the reply. Here is a piece of log. Attached more detailed
log.0.txt (2.0 MB)
log :slightly_smiling_face:

Blockquote 2022-01-05 21:31:17.970 FINE: [18] WebhookClient$updateStatus$1.invokeSuspend#107: Updating 0 subscribers of status
2022-01-05 21:31:46.563 WARNING: [29] [hostname=videoconferenze.consrc.it id=videoconferenze.consrc.it] MucClient.lambda$getConnectAndLoginCallable$8#622: [MucClient id=videoconferenze.consrc.it hostname=videoconferenze.consrc.it] error connecting
org.jivesoftware.smack.SmackException$EndpointConnectionException: The following addresses failed: ‘RFC 6120 A/AAAA Endpoint + [videoconferenze.consrc.it:5222] (videoconferenze.consrc.it/2.228.71.233:5222)’ failed because: java.net.SocketTimeoutException: connect timed out
at org.jivesoftware.smack.SmackException$EndpointConnectionException.from(SmackException.java:334)
at org.jivesoftware.smack.tcp.XMPPTCPConnection.connectUsingConfiguration(XMPPTCPConnection.java:663)
at org.jivesoftware.smack.tcp.XMPPTCPConnection.connectInternal(XMPPTCPConnection.java:846)
at org.jivesoftware.smack.AbstractXMPPConnection.connect(AbstractXMPPConnection.java:529)
at org.jitsi.xmpp.mucclient.MucClient.lambda$getConnectAndLoginCallable$8(MucClient.java:617)
at org.jitsi.retry.RetryStrategy$TaskRunner.run(RetryStrategy.java:167)
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)

Blockquote

Looks like Jibri can’t connect to your Jitsi server. Can you ping the Jitsi server from your Jibri server? Check your firewall, make sure port 5222 is open and accessible to Jibri on the Jitsi server.

1 Like

thanks a lot for you reply. jitsi and jibri are on the same server. Port 5222 is open. I’m not sure about my jicofo.conf. Can you take a look?

jicofo {
authentication: {
enabled: true
type: XMPP
login-url: videoconferenze.consrc.it
}
xmpp: {
client: {
client-proxy: focus.videoconferenze.consrc.it
}
trusted-domains: [ “recorder.videoconferenze.consrc.it” ]
}
bridge: {
brewery-jid: “JvbBrewery@internal.auth.videoconferenze.consrc.it”
}
}

And here is my hosts file:

127.0.0.1 localhost
2.228.71.233 videoconferenze.consrc.it

Your jicofo.conf is missing a jibri block. Try this:

jicofo {
   authentication: {
    enabled: true
    type: XMPP
    login-url: videoconferenze.consrc.it
 }
xmpp: {
   client: {
    client-proxy: focus.videoconferenze.consrc.it
 }
trusted-domains: [ "recorder.videoconferenze.consrc.it" ]
 }
bridge: {
   brewery-jid: "JvbBrewery@internal.auth.videoconferenze.consrc.it"
 }
jibri: {
   brewery-jid: "JibriBrewery@internal.auth.videoconferenze.consrc.it"
   pending-timeout: 90 seconds
 }
}
1 Like