Recording failed to start (Jibri)


#1

Thank you in advance.


#2

The error looks like it’s due to an issue with some of the xmpp strings. I think it may be that the roomJid domain doesn’t contain the xmpp domain configured in Jibri’s config file?


#3

This post was flagged by the community and is temporarily hidden.


#4

Hello again @bbaldino

Could you please tell me what’s the “xmpp strings”? Do you think my domainname “conference.ngairways.com” is incorrect strings? And what is “roomJid” ?

Thank you in advance.


#5

The exception is coming from here which is this line:

val subdomain = domain.subSequence(0, domain.indexOf(xmppDomain)).trim('.')

I think domain.indexOf(xmppDomain) is returning -1, which is causing the exception in subSequence. domain comes from the roomJid and xmppDomain is the configured xmpp domain in your config.json (which in your case is "xmpp_domain": "**conference.ngairways.com**" (I assume the asterisks aren’t actually in the config file, right?). I can’t tell what your roomJid is though. It might be logged elsewhere in the logs if you want to attach them all.


#6

Hello @bbaldino

Actually, I dont’ put asterisks in config file. The below log from jibri server is appeared when I try to start recording from jitsi-meet server (I can hear speaker said “Recording has started”) but fail to start the recording function.

Thank you in advance.

2018-08-14 10:09:40.419 INFO: [26] org.jitsi.jibri.api.xmpp.XmppApi.handleStartJibriIq() Received start request
2018-08-14 10:09:40.419 INFO: [26] org.jitsi.jibri.api.xmpp.XmppApi.handleStartJibriIq() Sending ‘pending’ response to start IQ
2018-08-14 10:09:40.419 INFO: [39] org.jitsi.jibri.api.xmpp.XmppApi.run() Starting service
2018-08-14 10:09:40.420 SEVERE: [39] org.jitsi.jibri.api.xmpp.XmppApi.run() Error in startService task: java.lang.StringIndexOutOfBoundsException: String index out of range: -1 with stack:
java.lang.String.substring(String.java:1967)
java.lang.String.subSequence(String.java:2003)
org.jitsi.jibri.util.XmppUtilsKt.getCallUrlInfoFromJid(XmppUtils.kt:38)
org.jitsi.jibri.api.xmpp.XmppApi.handleStartService(XmppApi.kt:268)
org.jitsi.jibri.api.xmpp.XmppApi.access$handleStartService(XmppApi.kt:64)
org.jitsi.jibri.api.xmpp.XmppApi$handleStartJibriIq$1.run(XmppApi.kt:196)
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
java.util.concurrent.FutureTask.run(FutureTask.java:266)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
java.lang.Thread.run(Thread.java:748)

2018-08-14 10:09:40.420 INFO: [39] org.jitsi.jibri.api.xmpp.XmppApi.run() Sending start service response iq:


#7

@bbaldino This is my actual /etc/jitsi/jibri/config.json on jibri server. FYI.

root@ubuntu:~# cat /etc/jitsi/jibri/config.json
{
// NOTE: this is a SAMPLE config file, it will need to be configured with
// values from your environment

// Where recording files should be temporarily stored
"recording_directory":"/srv/recordings",
// The path to the script which will be run on completed recordings
"finalize_recording_script_path": "/path/to/finalize_recording.sh",
"xmpp_environments": [
    {
        // A friendly name for this environment which can be used
        //  for logging, stats, etc.
        "name": "prod environment",
        // The hosts of the XMPP servers to connect to as part of
        //  this environment
        "xmpp_server_hosts": [
            "conference.ngairways.com"
        ],
        // The xmpp domain we'll connect to on the XMPP server
        "xmpp_domain": "conference.ngairways.com",
        // Jibri will login to the xmpp server as a privileged user
        "control_login": {
            // The domain to use for logging in
            "domain": "auth.conference.ngairways.com",
            // The credentials for logging in
            "username": "jibri",
            "password": "jibriauthpass"
        },
        // Using the control_login information above, Jibri will join
        //  a control muc as a means of announcing its availability
        //  to provide services for a given environment
        "control_muc": {
            "domain": "internal.auth.conference.ngairways.com",
            "room_name": "JibriBrewery",
            "nickname": "jibri-nickname"
        },
        // All participants in a call join a muc so they can exchange
        //  information.  Jibri can be instructed to join a special muc
        //  with credentials to give it special abilities (e.g. not being
        //  displayed to other users like a normal participant)
        "call_login": {
            "domain": "recorder.conference.ngairways.com",
            "username": "recorder",
            "password": "jibrirecorderpass"
        },
        // When jibri gets a request to start a service for a room, the room
        //  jid will look like:
        //  roomName@optional.prefixes.subdomain.xmpp_domain
        // We'll build the url for the call by transforming that into:
        //  https://xmpp_domain/subdomain/roomName
        // So if there are any prefixes in the jid (like jitsi meet, which
        //  has its participants join a muc at conference.xmpp_domain) then
        //  list that prefix here so it can be stripped out to generate
        //  the call url correctly
        "room_jid_domain_string_to_strip_from_start": "conference.",
        // The amount of time, in minutes, a service is allowed to continue.
        //  Once a service has been running for this long, it will be
        //  stopped (cleanly).  A value of 0 means an indefinite amount
        //  of time is allowed
        "usage_timeout": "0"
    }
]

}


#8

Can you post your prosody config?


#9

Hello @bbaldino

The dashbroad blocked my post now. I will try later. Or coule you please provide me your email?

Thank you.


#10

Hello @bbaldino

I cannot post anymore about config file. Seem your dashboard blocked my post and because it take my comment as spam. Could you please give me the instruction?

Thank you in advance.


#11

Hello @bbaldino

root@conference:~# cat /etc/prosody/conf.d/xxxxxxxxxxx.cfg.lua
– Plugins path gets uncommented during jitsi-meet-tokens package install - that’s where token plugin is located
–plugin_paths = { “/usr/share/jitsi-meet/prosody-plugins/” }

VirtualHost “xxxxxxxxxxx”
– enabled = false – Remove this line to enable this host
authentication = “anonymous”
– Properties below are modified by jitsi-meet-tokens package config
– and authentication above is switched to “token”
–app_id=“example_app_id”
–app_secret=“example_app_secret”
– Assign this host a certificate for TLS, otherwise it would use the one
– set in the global section (if any).
– Note that old-style SSL on port 5223 only supports one certificate, and will always
– use the global one.
ssl = {
key = “/etc/prosody/certs/xxxxxxxxxxx.key”;
certificate = “/etc/prosody/certs/xxxxxxxxxxx.crt”;
}
– we need bosh
modules_enabled = {
“bosh”;
“pubsub”;
“ping”; – Enable mod_ping
}

    c2s_require_encryption = false

Component “conference.xxxxxxxxxxx” “muc”
storage = “null”
–modules_enabled = { “token_verification” }
admins = { “focus@auth.xxxxxxxxxxx” }

Component “jitsi-videobridge.xxxxxxxxxxx”
component_secret = “31L047iL”

VirtualHost “auth.xxxxxxxxxxx”
ssl = {
key = “/etc/prosody/certs/auth.xxxxxxxxxxx.key”;
certificate = “/etc/prosody/certs/auth.xxxxxxxxxxx.crt”;
}
authentication = “internal_plain”

Component “focus.xxxxxxxxxxx”
component_secret = “ryPaMfDD”

– jibri
Component “internal.auth.xxxxxxxxxxx” “muc”
modules_enabled = {
“ping”;
}
storage = “null”
muc_room_cache_size = 1000

VirtualHost “recorder.xxxxxxxxxxx”
modules_enabled = {
“ping”;
}
authentication = “internal_plain”


#12

The roomJid will come from this part, but you have the domain obscured. Can you paste the entire Component “conference.xxxxxxxxxxx” “muc” line?


#13

Hello @bbaldino

My xxxxxxxx is the same with “xmpp_server_hosts”. I cannot post it here because your dashboard blocked my domainname. However, I’ve tried to change domainname by reinstall on another machine but it doesn’t work as well. Again, Basic Jitsi-meet function always work properly but only recording function.

Thank you.