Jibri build error

I have installed both Jitsi and Jibri on two seperate AWS EC2 servers from the quick install guide. I can record and live stream. But the issue arised once I built Jibri from the source code and replaced the jar file in jibri folder. I needed 1920x1080 instead of the default 1280x720. The live stream shows - Live Stream unavailable error. If I replace it with the original jar file, there is no more issue. Live stream starts fine.

The procedure I followed:

• Create a new EC2 server with Ubuntu 18.04.
• Clone the Jibri code from Github.
• Edit the line: https://github.com/jitsi/jibri/blob/7d5be64990fd010e8ea2fe39ebc182b35c54e282/src/main/kotlin/org/jitsi/jibri/capture/ffmpeg/FfmpegCapturer.kt#L41 3
• Go to the Jibri source root dir (where pom.xml is located) and run mvn clean package.
• A jar file called jibri-8.0-SNAPSHOT-jar-with-dependencies.jar is created in target directory.
• Rename this jar file as jibri.rar and replace this jar in /opt/jitsi/jibri on the server where Jibri is installed.
• Edit (comment 720 and uncomment 1080) the xorg file located in /etc/jitsi/jibri - https://github.com/jitsi/jibri/blob/master/resources/debian-package/etc/jitsi/jibri/xorg-video-dummy.conf#L125
• Restart Jibri

Both Jitsi and Jibri servers are running on EC2 c5n.9xlarge, Ubuntu 18.04.

I have tested it several times, built the code several times, restarted all services on both Jitsi and Jibri. There was no error during building the jar file. It took around 16 to 17 mins to build.

Please find the the log files for both -

  1. recording started with original jar file (-original_jar)
  2. with the new jar file (crash_log)

Jibri Log

I get an error when trying to unzip the logs.

No. I just downloaded and extracted it.

Please download from this link -

https://www.dropbox.com/s/i9011pwqpc374wi/jibri_log.zip?dl=0

What Java version are you using? You need to use java 8.

Yes, I am using Java 8 on Jibri server. As I said, I can start live stream with the original jar file, but not with the built jar file.

I couldn’t have started live stream even with the original jar file if it was a different java version like Java 11.

I have noticed these 3 lines from the ffmpeg log file -

2020-02-24 18:18:53.151 INFO: [83] ffmpeg.call() ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM bsnoop
2020-02-24 18:18:53.152 INFO: [83] ffmpeg.call() [alsa @ 0x55e9e6c532e0] cannot open audio device plug:bsnoop (No such file or directory)
2020-02-24 18:18:53.152 INFO: [83] ffmpeg.call() plug:bsnoop: Input/output error

This is from the log.0

2020-02-24 18:18:53.039 INFO: [78] org.jitsi.jibri.selenium.JibriSelenium.onSeleniumStateChange() Transitioning from state Starting up to Running
2020-02-24 18:18:53.040 INFO: [78] org.jitsi.jibri.service.impl.StreamingJibriService.invoke() Selenium joined the call, starting capturer
2020-02-24 18:18:53.058 INFO: [78] org.jitsi.jibri.util.JibriSubprocess.ffmpeg.launch() Starting ffmpeg with command ffmpeg -y -v info -f x11grab -draw_mouse 0 -r 30 -s 1920x1080 -thread_queue_size 4096 -i :0.0+0,0 -f alsa -thread_queue_size 4096 -i plug:bsnoop -acodec aac -strict -2 -ar 44100 -c:v libx264 -preset veryfast -maxrate 2976k -bufsize 5952k -pix_fmt yuv420p -r 30 -crf 25 -g 60 -tune zerolatency -f flv rtmp://a.rtmp.youtube.com/live2/r41v-udu0-4y22-7yyj ([ffmpeg, -y, -v, info, -f, x11grab, -draw_mouse, 0, -r, 30, -s, 1920x1080, -thread_queue_size, 4096, -i, :0.0+0,0, -f, alsa, -thread_queue_size, 4096, -i, plug:bsnoop, -acodec, aac, -strict, -2, -ar, 44100, -c:v, libx264, -preset, veryfast, -maxrate, 2976k, -bufsize, 5952k, -pix_fmt, yuv420p, -r, 30, -crf, 25, -g, 60, -tune, zerolatency, -f, flv, rtmp://a.rtmp.youtube.com/live2/r41v-udu0-4y22-7yyj])
2020-02-24 18:18:58.063 FINE: [79] org.jitsi.jibri.util.ProcessStatePublisher.ffmpeg.invoke() Process ffmpeg hasn’t written in 2 seconds, publishing periodic update
2020-02-24 18:18:58.064 INFO: [82] org.jitsi.jibri.capture.ffmpeg.FfmpegCapturer.onFfmpegProcessUpdate() Ffmpeg quit abruptly. Last output line: plug:bsnoop: Input/output error
2020-02-24 18:18:58.065 INFO: [82] org.jitsi.jibri.capture.ffmpeg.FfmpegCapturer.onFfmpegStateMachineStateChange() Ffmpeg capturer transitioning from state Starting up to Error: FfmpegFailedToStart SYSTEM Ffmpeg failed to start
2020-02-24 18:18:58.065 INFO: [82] org.jitsi.jibri.service.impl.StreamingJibriService.onServiceStateChange() Streaming service transitioning from state Starting up to Error: FfmpegFailedToStart SYSTEM Ffmpeg failed to start
2020-02-24 18:18:58.065 INFO: [82] org.jitsi.jibri.api.xmpp.XmppApi.invoke() Current service had an error Error: FfmpegFailedToStart SYSTEM Ffmpeg failed to start, sending error iq
2020-02-24 18:18:58.066 FINE: [82] org.jitsi.jibri.statsd.JibriStatsDClient.incrementCounter() Incrementing statsd counter: error:live_stream
2020-02-24 18:18:58.066 INFO: [82] org.jitsi.jibri.status.JibriStatusManager.log() Received component health update: JibriManager has status UNHEALTHY (detail: )
2020-02-24 18:18:58.067 INFO: [82] org.jitsi.jibri.status.JibriStatusManager.log() Health status has changed: HEALTHY -> UNHEALTHY
2020-02-24 18:18:58.067 INFO: [82] org.jitsi.jibri.api.xmpp.XmppApi.updatePresence() Jibri reports its status is now JibriStatus(busyStatus=BUSY, health=OverallHealth(healthStatus=UNHEALTHY, details={JibriManager=ComponentHealthDetails(healthStatus=UNHEALTHY, detail=)})), publishing presence to connections
2020-02-24 18:18:58.067 INFO: [82] org.jitsi.xmpp.mucclient.MucClientManager.log() Setting a presence extension: org.jitsi.xmpp.extensions.jibri.JibriStatusPacketExt@37df057
2020-02-24 18:18:58.068 FINE: [82] org.jitsi.jibri.statsd.JibriStatsDClient.incrementCounter() Incrementing statsd counter: stop:live_stream
2020-02-24 18:18:58.068 INFO: [82] org.jitsi.jibri.JibriManager.stopService() Stopping the current service
2020-02-24 18:18:58.068 INFO: [82] org.jitsi.jibri.service.impl.StreamingJibriService.stop() Stopping capturer
2020-02-24 18:18:58.068 INFO: [82] org.jitsi.jibri.util.JibriSubprocess.ffmpeg.stop() Stopping ffmpeg process
2020-02-24 18:18:58.069 INFO: [82] org.jitsi.jibri.util.JibriSubprocess.ffmpeg.stop() ffmpeg exited with value 1
2020-02-24 18:18:58.069 INFO: [82] org.jitsi.jibri.service.impl.StreamingJibriService.stop() Stopped capturer
2020-02-24 18:18:58.069 INFO: [82] org.jitsi.jibri.service.impl.StreamingJibriService.stop() Quitting selenium
2020-02-24 18:18:58.069 INFO: [82] org.jitsi.jibri.selenium.JibriSelenium.leaveCallAndQuitBrowser() Leaving call and quitting browser
2020-02-24 18:18:58.070 INFO: [82] org.jitsi.jibri.selenium.JibriSelenium.leaveCallAndQuitBrowser() Recurring call status checks cancelled
2020-02-24 18:18:58.090 INFO: [82] org.jitsi.jibri.selenium.JibriSelenium.leaveCallAndQuitBrowser() Got 22 log entries for type browser
2020-02-24 18:18:58.179 INFO: [82] org.jitsi.jibri.selenium.JibriSelenium.leaveCallAndQuitBrowser() Got 743 log entries for type driver
2020-02-24 18:18:58.252 INFO: [82] org.jitsi.jibri.selenium.JibriSelenium.leaveCallAndQuitBrowser() Got 0 log entries for type client
2020-02-24 18:18:58.252 INFO: [82] org.jitsi.jibri.selenium.JibriSelenium.leaveCallAndQuitBrowser() Leaving web call
2020-02-24 18:18:58.353 INFO: [82] org.jitsi.jibri.selenium.JibriSelenium.leaveCallAndQuitBrowser() Quitting chrome driver
2020-02-24 18:18:58.422 INFO: [82] org.jitsi.jibri.selenium.JibriSelenium.leaveCallAndQuitBrowser() Chrome driver quit
2020-02-24 18:18:58.422 INFO: [82] org.jitsi.jibri.service.impl.StreamingJibriService.stop() Quit selenium
2020-02-24 18:18:58.422 INFO: [82] org.jitsi.jibri.status.JibriStatusManager.log() Busy status has changed: BUSY -> IDLE
2020-02-24 18:18:58.422 INFO: [82] org.jitsi.jibri.api.xmpp.XmppApi.updatePresence() Jibri reports its status is now JibriStatus(busyStatus=IDLE, health=OverallHealth(healthStatus=UNHEALTHY, details={JibriManager=ComponentHealthDetails(healthStatus=UNHEALTHY, detail=)})), publishing presence to connections
2020-02-24 18:18:58.422 INFO: [82] org.jitsi.xmpp.mucclient.MucClientManager.log() Setting a presence extension: org.jitsi.xmpp.extensions.jibri.JibriStatusPacketExt@5a8dcf65

The logs in dropbox show tons of exceptions before that, e.g.:

Which I’ve always seen as related to running with the wrong java version.

Are the logs you pasted from that same file?

That ffmpeg issue is related to asoundrc stuff…are you running Jibri as the Jibri user?

It’s Java 8. Otherwise Jibri won’t have started even with original jar file. I have checked the Java version. It’s 8. I have changed the Java version to 8 after Jibri quick installation.

Yes, from same file.

How do I know that? How can I check from the terminal of Jibri server?

I haven’t changed any permission, ownership of file / folder in Jibri server.

I just replaced the built (new) jar file in opt/jitsi/jibri. The jar file was around 40mb.

If I replace the new jar file again with the original jar, the live steaming is starting fine.

How are you starting Jibri in each case? service jibri start?

Also, do you see the same hk2 reification failed error with the stock jar?

I have installed Jibri as root user. I am doing all stuff right from installation as a root user.- restarting jibri service, editing files, etc.

As I said there is no error with live stream with stock jar.

No. there is no such error with stock jar. In case of stock jar, log.0 is not created.

I just can’t understand what is the issue with new(built) jar. I just changed the resolution and built it. The build was successful. Then replaced in it in Jibri and edited the xorg file.

It’s at the top of the log file

Which jibri did you install initially, stable or unstable? There was update in the asoundrc file and audio devices.

Thanks @bbaldino and @damencho

Issue resolved using unstable build.

I used quick install guide. I was using stable build.

Same issue here: Jibri (stable) try to record JVB2 istance (stable) but fail with:

2020-04-10 12:49:18.579 INFO: [93] ffmpeg.call() ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM bsnoop
2020-04-10 12:49:18.579 INFO: [93] ffmpeg.call() [alsa @ 0x17a5f20] cannot open audio device plug:bsnoop (No such file or directory)
2020-04-10 12:49:18.579 INFO: [93] ffmpeg.call() plug:bsnoop: Input/output error

Resolved with installing Jibri from unstable branch, thank you

1 Like