JItsi + Jibri on Docker - Recording has stopped

Hello!

I’ve successfuly installed Jitsi on docker as per manual here:

I had checked the snd_aloop and setup the rest of the images. All looks and works great. I also created 2 domain records: one for wus.host.org to my IP address and another one for *.wus.host.org for anything else jitsi-related. Both records pointing at the same IP address.

Firewall is not blocking anything in here (at least not per logs, I can’t see anything being blocked).

Here is my full .env file (with passwords obscured):

Full .env file:
https://justpaste.it/38zmg

The conferencing itself works as a charm. But when I’m trying to hit a record button I’m immediatelly getting “Recording has stopped”. Below is a log from Docker. You can see that Jibri has problems connecting to the conference.

jibri_1    | 2021-12-06 23:21:24.879 SEVERE: [54] org.jitsi.jibri.selenium.JibriSelenium.log() An error occurred while joining the call
jibri_1    | org.openqa.selenium.WebDriverException: unknown error: net::ERR_CONNECTION_REFUSED

Unfortunatelly I can’t tell from the logs where is it trying to connect so I can’t further debug this.

Full docker log file:
https://justpaste.it/5llcv

Log file part with the error is here:

jibri_1    | 2021-12-06 23:21:24.513 FINE: [41] org.jitsi.jibri.config.log() ConfigSourceSupplier: Trying to retrieve key 'jibri.recording.finalize-script' from source 'config' as type kotlin.String
jibri_1    | 2021-12-06 23:21:24.514 FINE: [41] org.jitsi.jibri.config.log() ConfigSourceSupplier: Successfully retrieved key 'jibri.recording.finalize-script' from source 'config' as type kotlin.String
jibri_1    | 2021-12-06 23:21:24.515 FINE: [41] org.jitsi.jibri.config.log() FallbackSupplier: value found via ConfigSourceSupplier: key: 'jibri.recording.finalize-script', type: 'kotlin.String', source: 'config'
jibri_1    | 2021-12-06 23:21:24.516 INFO: [41] org.jitsi.jibri.service.impl.FileRecordingJibriService.log() Writing recording to /config/recordings/mdkudhjpkbyonxrp, finalize script path /config/finalize.sh
jibri_1    | 2021-12-06 23:21:24.522 FINE: [41] org.jitsi.jibri.statsd.JibriStatsDClient.log() Incrementing statsd counter: start:recording
jibri_1    | 2021-12-06 23:21:24.523 INFO: [41] org.jitsi.jibri.status.JibriStatusManager.log() Busy status has changed: IDLE -> BUSY
jibri_1    | 2021-12-06 23:21:24.524 FINE: [41] org.jitsi.jibri.webhooks.v1.WebhookClient.log() Updating 0 subscribers of status
jibri_1    | 2021-12-06 23:21:24.525 INFO: [41] org.jitsi.jibri.api.xmpp.XmppApi.log() Jibri reports its status is now JibriStatus(busyStatus=BUSY, health=OverallHealth(healthStatus=HEALTHY, details={})), publishing presence to connections
jibri_1    | 2021-12-06 23:21:24.526 FINE: [41] org.jitsi.xmpp.mucclient.MucClientManager.log() Setting a presence extension: org.jitsi.xmpp.extensions.jibri.JibriStatusPacketExt@1785d32a
jibri_1    | 2021-12-06 23:21:24.526 FINE: [41] org.jitsi.xmpp.mucclient.MucClientManager.log() Replacing presence extension: org.jitsi.xmpp.extensions.jibri.JibriStatusPacketExt@174e1b69
jibri_1    | 2021-12-06 23:21:24.530 INFO: [41] org.jitsi.jibri.api.xmpp.XmppApi.log() Sending 'pending' response to start IQ
jibri_1    | 2021-12-06 23:21:24.534 FINE: [39] org.jitsi.xmpp.extensions.DefaultPacketExtensionProvider.parse() Could not add a provider for element busy-status from namespace http://jitsi.org/protocol/jibri
jibri_1    | 2021-12-06 23:21:24.535 FINE: [39] org.jitsi.xmpp.extensions.DefaultPacketExtensionProvider.parse() Could not add a provider for element health-status from namespace http://jitsi.org/protocol/health
jibri_1    | 2021-12-06 23:21:24.545 INFO: [54] org.jitsi.jibri.selenium.pageobjects.HomePage.log() Visiting url https://wus.host.org
jicofo_1   | Dec 06, 2021 11:21:24 PM org.jitsi.utils.logging2.LoggerImpl log
jicofo_1   | INFO: Updating status from JIBRI: <iq xmlns='jabber:client' to='focus@auth.wus.host.org/focus' from='jibribrewery@internal.auth.wus.host.org/jibri-411488482' id='4R7BY-31' type='result'><jibri xmlns='http://jitsi.org/protocol/jibri' status='pending'/></iq> for interestingclothingsclarifyhysterically@muc.wus.host.org
jicofo_1   | Dec 06, 2021 11:21:24 PM org.jitsi.utils.logging2.LoggerImpl log
jicofo_1   | INFO: Got Jibri status update: Jibri jibribrewery@internal.auth.wus.host.org/jibri-411488482 has status pending and failure reason null, current Jibri jid is jibribrewery@internal.auth.wus.host.org/jibri-411488482
jicofo_1   | Dec 06, 2021 11:21:24 PM org.jitsi.utils.logging2.LoggerImpl log
jicofo_1   | INFO: Started Jibri session
jibri_1    | 2021-12-06 23:21:24.879 SEVERE: [54] org.jitsi.jibri.selenium.JibriSelenium.log() An error occurred while joining the call
jibri_1    | org.openqa.selenium.WebDriverException: unknown error: net::ERR_CONNECTION_REFUSED
jibri_1    |   (Session info: chrome=94.0.4606.61)
jibri_1    |   (Driver info: chromedriver=94.0.4606.61 (418b78f5838ed0b1c69bb4e51ea0252171854915-refs/branch-heads/4606@{#1204}),platform=Linux 4.19.0-18-amd64 x86_64) (WARNING: The server did not provide any stacktrace information)
jibri_1    | Command duration or timeout: 0 milliseconds
jibri_1    | Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
jibri_1    | System info: host: '3ed9770a3173', ip: '172.19.0.6', os.name: 'Linux', os.arch: 'amd64', os.version: '4.19.0-18-amd64', java.version: '11.0.12'
jibri_1    | Driver info: org.openqa.selenium.chrome.ChromeDriver
jibri_1    | Capabilities {acceptInsecureCerts: false, acceptSslCerts: false, applicationCacheEnabled: false, browserConnectionEnabled: false, browserName: chrome, chrome: {chromedriverVersion: 94.0.4606.61 (418b78f5838ed..., userDataDir: /tmp/.com.google.Chrome.zu988n}, cssSelectorsEnabled: true, databaseEnabled: false, goog:chromeOptions: {debuggerAddress: localhost:43371}, handlesAlerts: true, hasTouchScreen: false, javascriptEnabled: true, locationContextEnabled: true, mobileEmulationEnabled: false, nativeEvents: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: LINUX, platformName: LINUX, proxy: Proxy(), rotatable: false, setWindowRect: true, strictFileInteractability: false, takesHeapSnapshot: true, takesScreenshot: true, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unexpectedAlertBehaviour: ignore, unhandledPromptBehavior: ignore, version: 94.0.4606.61, webStorageEnabled: true, webauthn:extension:credBlob: true, webauthn:extension:largeBlob: true, webauthn:virtualAuthenticators: true}
jibri_1    | Session ID: a9332f7048fadf352fa443527e093de4
jibri_1    | 	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
jibri_1    | 	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
jibri_1    | 	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
jibri_1    | 	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
jibri_1    | 	at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:214)
jibri_1    | 	at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:166)
jibri_1    | 	at org.openqa.selenium.remote.http.JsonHttpResponseCodec.reconstructValue(JsonHttpResponseCodec.java:40)
jibri_1    | 	at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:80)
jibri_1    | 	at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:44)
jibri_1    | 	at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:158)
jibri_1    | 	at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:83)
jibri_1    | 	at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:543)
jibri_1    | 	at org.openqa.selenium.remote.RemoteWebDriver.get(RemoteWebDriver.java:271)
jibri_1    | 	at org.jitsi.jibri.selenium.pageobjects.AbstractPageObject.visit(AbstractPageObject.kt:35)
jibri_1    | 	at org.jitsi.jibri.selenium.JibriSelenium$joinCall$1.run(JibriSelenium.kt:291)
jibri_1    | 	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
jibri_1    | 	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
jibri_1    | 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
jibri_1    | 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
jibri_1    | 	at java.base/java.lang.Thread.run(Thread.java:829)
jibri_1    | 2021-12-06 23:21:24.881 INFO: [54] org.jitsi.jibri.selenium.JibriSelenium.log() Transitioning from state Starting up to Error: FailedToJoinCall SESSION Failed to join the call
jibri_1    | 2021-12-06 23:21:24.882 INFO: [54] org.jitsi.jibri.service.impl.FileRecordingJibriService.log() File recording service transitioning from state Starting up to Error: FailedToJoinCall SESSION Failed to join the call
jibri_1    | 2021-12-06 23:21:24.884 INFO: [54] org.jitsi.jibri.api.xmpp.XmppApi.log() Current service had an error Error: FailedToJoinCall SESSION Failed to join the call, sending error iq <iq to='jibribrewery@internal.auth.wus.host.org/focus' id='jRnm2-26' type='set'><jibri xmlns='http://jitsi.org/protocol/jibri' status='off' failure_reason='error' should_retry='true'/></iq>

Can someone tell me what am I doing wrong here?

Welcome to the forum.

Can you share your jibri.conf?

Thank you!

I don’t think I can. This is a docker installation and I don’t have a separate jibri file.

I’m starting the system with docker-compose -f docker-compose.yml -f jibri.yml

My jibri.yml file looks like this:


version: '3'

services:
    jibri:
        image: jitsi/jibri:stable-6433
        restart: ${RESTART_POLICY}
        volumes:
            - ${CONFIG}/jibri:/config:Z
            - /dev/shm:/dev/shm
        cap_add:
            - SYS_ADMIN
            - NET_BIND_SERVICE
        devices:
            - /dev/snd:/dev/snd
        environment:
            - CHROMIUM_FLAGS
            - DISPLAY=:0
            - ENABLE_STATS_D
            - JIBRI_FFMPEG_AUDIO_SOURCE
            - JIBRI_FFMPEG_AUDIO_DEVICE
            - JIBRI_HTTP_API_EXTERNAL_PORT
            - JIBRI_HTTP_API_INTERNAL_PORT
            - JIBRI_RECORDING_RESOLUTION
            - JIBRI_USAGE_TIMEOUT
            - JIBRI_XMPP_USER
            - JIBRI_XMPP_PASSWORD
            - JIBRI_BREWERY_MUC
            - JIBRI_RECORDER_USER
            - JIBRI_RECORDER_PASSWORD
            - JIBRI_RECORDING_DIR
            - JIBRI_FINALIZE_RECORDING_SCRIPT_PATH
            - JIBRI_STRIP_DOMAIN_JID
            - JIBRI_LOGS_DIR
            - PUBLIC_URL
            - TZ
            - XMPP_AUTH_DOMAIN
            - XMPP_DOMAIN
            - XMPP_INTERNAL_MUC_DOMAIN
            - XMPP_RECORDER_DOMAIN
            - XMPP_SERVER
            - XMPP_TRUST_ALL_CERTS
        depends_on:
            - jicofo
        networks:
            meet.jitsi:

I’m not familiar with docker, but should this be your domain, perhaps?

Hello Freddie,

No, it’s just a virtual name for a network where all Jitsi components connected. Nothing depends on this name. It must be consistent between all the configs.

All the values you should be interested in are in the .env file here Jitsi/jibri config file - JustPaste.it . I belive all variable from jibri.conf are in that file.

Ok… definitely not familiar with docker… lol.

But going by your description of the issue, it appears the recorder is not even making it into the meeting. This could be due to one of several reasons:

  1. Mismatched account password (jibri, recorder)
  2. Firewall (port 5222/tcp not open)
  3. Jibri log directory non-existent
  4. Jibri save directory non-existent or not writable by Jibri
  5. Unresolvable JMS server address

Check all those things, it’s likely your problem lies with one of them.

Ok, so I found a problem.

I logged into jibri docker container and tried to do curl https://wus.host.com/ it failed. Than, looking into this, I found that inside docker network wus.host.com points to prosody server, but jibri is trying to access the web server.

So if I would change the /etc/hosts on jibri and add wus.host.com 172.19.0.2 (Internal IP address of a web docker container) the recording would start working.

Now I’m trying to understand what and where I screwed up and how to fix it. Cuz this would not work in the production environment.