How to build and deploy jitsi-videobridge on Ubuntu 20.04 - Newbie question

Hello Dears,

I’ve been trying to build ‘jitsi-videobridge’ project for couple of days already but unfortunately with no result.
First let me list the specifications of the platform I’m working on:

lsb_release -a

No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.4 LTS
Release: 20.04
Codename: focal

java -version

java version “18.0.2.1” 2022-08-18
Java™ SE Runtime Environment (build 18.0.2.1+1-1)
Java HotSpot™ 64-Bit Server VM (build 18.0.2.1+1-1, mixed mode, sharing)

mvn -version

Apache Maven 3.8.6 (84538c9988a25aec085021c365c560670ad80f63)
Maven home: /opt/maven
Java version: 18.0.2.1, vendor: Oracle Corporation, runtime: /usr/lib/jvm/jdk-18
Default locale: en_US, platform encoding: UTF-8
OS name: “linux”, version: “5.4.0-65-generic”, arch: “amd64”, family: “unix”

kotlinc -version

info: kotlinc-jvm 1.7.0 (JRE 18.0.2.1+1-1)

For some reason kotlinc -version takes more than 10 seconds to return the output.

So I cloned the project GitHub - jitsi/jitsi-videobridge: Jitsi Videobridge is a WebRTC compatible video router or SFU that lets build highly scalable video conferencing infrastructure (i.e., up to hundreds of conferences per server).
Entered to [LOCAL_REP]/jitsi-videobridge/jvb
Ran [mvn compile exec:exec -Dexec.executable=java -Dexec.args=“-cp %classpath org.jitsi.videobridge.MainKt -Djava.library.path=$JVB_HOME/lib/native/linux-64 -Djava.util.logging.config.file=$JVB_HOME/lib/logging.properties -Dnet.java.sip.communicator.SC_HOME_DIR_NAME=.jitsi-videobridge --apis=,”]
First it failed because of some missing dependencies in the artifacts jitsi-media-transform and rtp so I checked in the git rep and changed their version to 1.0-SNAPSHOT. It worked.
Then I tried the same command again and got these errors:
WARN: Attempt to load key ‘java.correct.class.type.by.place.resolve.scope’ for not yet loaded registry
[ERROR] /opt/jitsi/jitsi-videobridge/jvb/src/main/kotlin/org/jitsi/videobridge/Endpoint.kt: (21, 22) Unresolved reference: Features
[ERROR] /opt/jitsi/jitsi-videobridge/jvb/src/main/kotlin/org/jitsi/videobridge/Endpoint.kt: (22, 22) Unresolved reference: MediaSourceDesc
[ERROR] /opt/jitsi/jitsi-videobridge/jvb/src/main/kotlin/org/jitsi/videobridge/Endpoint.kt: (26, 22) Unresolved reference: TransceiverEventHandler
[ERROR] /opt/jitsi/jitsi-videobridge/jvb/src/main/kotlin/org/jitsi/videobridge/Endpoint.kt: (29, 26) Unresolved reference: ParsedVideoPacket
[ERROR] /opt/jitsi/jitsi-videobridge/jvb/src/main/kotlin/org/jitsi/videobridge/Endpoint.kt: (37, 27) Unresolved reference: Bandwidth
[ERROR] /opt/jitsi/jitsi-videobridge/jvb/src/main/kotlin/org/jitsi/videobridge/Endpoint.kt: (38, 27) Unresolved reference: LocalSsrcAssociation

There are lot more errors like these all complaining about "Unresolved reference: "

Other maven targets like package and install also return same errors. The only target that executes ok is mvn clean.

The same project builds and runs well on the Windows 10 box with IntelliJ IDEA 2022.1. Java and Maven versions on my Windows box are the same as in Ubuntu box.

Appreciate the help you can provide with this building/executing “issue”.

Use java 11

1 Like

Hello,

Thank you for the reply but unfortunately it didn’t work. Same error:
[IJ]-1-ARTIFACT_RESOLVED-[IJ]-path=/root/.m2/repository/org/codehaus/plexus/plexus-compiler-javac/2.7/plexus-compiler-javac-2.7.jar-[IJ]-artifactCoord=org.codehaus.plexus:plexus-compiler-javac:jar:2.7-[IJ]-error=
WARN: Attempt to load key ‘java.correct.class.type.by.place.resolve.scope’ for not yet loaded registry
[ERROR] /opt/jitsi/jitsi-videobridge/jvb/src/main/kotlin/org/jitsi/videobridge/Endpoint.kt: (21, 22) Unresolved reference: Features
[ERROR] /opt/jitsi/jitsi-videobridge/jvb/src/main/kotlin/org/jitsi/videobridge/Endpoint.kt: (22, 22) Unresolved reference: MediaSourceDesc
[ERROR] /opt/jitsi/jitsi-videobridge/jvb/src/main/kotlin/org/jitsi/videobridge/Endpoint.kt: (26, 22) Unresolved reference: TransceiverEventHandler
[ERROR] /opt/jitsi/jitsi-videobridge/jvb/src/main/kotlin/org/jitsi/videobridge/Endpoint.kt: (29, 26) Unresolved reference: ParsedVideoPacket

If it helps - 2 last lines before the error take a lot of time to complete, like 10 seconds or more.

java -version

openjdk version “11.0.16” 2022-07-19
OpenJDK Runtime Environment (build 11.0.16+8-post-Ubuntu-0ubuntu120.04)
OpenJDK 64-Bit Server VM (build 11.0.16+8-post-Ubuntu-0ubuntu120.04, mixed mode, sharing)
root@localhost:/opt/jitsi/jitsi-videobridge/jvb#

javac -version

javac 11.0.16

Best Regards.

I ran mvn goal with -X option and got this
[ERROR] → [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.jetbrains.kotlin:kotlin-maven-plugin:1.6.21:compile (compile) on project jitsi-videobridge: Compilation failure
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:375)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:351)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:171)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:163)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:294)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:960)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:566)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: org.jetbrains.kotlin.maven.KotlinCompilationFailureException: Compilation failure
at org.jetbrains.kotlin.maven.MavenPluginLogMessageCollector.throwKotlinCompilerException (MavenPluginLogMessageCollector.java:111)
at org.jetbrains.kotlin.maven.KotlinCompileMojoBase.execute (KotlinCompileMojoBase.java:212)
at org.jetbrains.kotlin.maven.K2JVMCompileMojo.execute (K2JVMCompileMojo.java:222)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:370)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:351)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:171)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:163)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:294)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:960)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:566)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
[ERROR]
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] MojoFailureException - Apache Maven - Apache Software Foundation