Failed to upload changes to JVB

Hi there,
I am running into this problem after I updated the jitsi-videobridge.jar under usr/share/jitsi-videobridge

What I did:
1.Cloned the JVB repo
2. added a few lines of logger for testing purposes
3. mvn clean package
4. cp jitsi-videobridge/jvb/target/jitsi-videobridge-2.1-SNAPSHOT.jar /usr/share/jitsi-videobridge/jitsi-videobridge.jar
5. sudo systemctl restart jitsi-videobridge2

and I am seeing this error and it shows no videobridge available in chrome console.

 jitsi-videobridge2.service - Jitsi Videobridge
   Loaded: loaded (/lib/systemd/system/jitsi-videobridge2.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Wed 2020-08-05 06:41:58 UTC; 6s ago
  Process: 6653 ExecStart=/bin/bash -c exec /usr/share/jitsi-videobridge/jvb.sh ${JVB_OPTS} < /dev/null >> ${LOGFILE} 2>&1 (code=exited, status=1/FAILURE)
  Process: 6654 ExecStartPost=/bin/bash -c echo $MAINPID > /var/run/jitsi-videobridge/jitsi-videobridge.pid (code=exited, status=0/SUCCESS)
 Main PID: 6653 (code=exited, status=1/FAILURE)

Aug 05 06:41:58 jitsi-local-deployment systemd[1]: Starting Jitsi Videobridge...
Aug 05 06:41:58 jitsi-local-deployment systemd[1]: Started Jitsi Videobridge.
Aug 05 06:41:58 jitsi-local-deployment systemd[1]: jitsi-videobridge2.service: Main process exited, code=exited, status=1/FAILURE
Aug 05 06:41:58 jitsi-local-deployment systemd[1]: jitsi-videobridge2.service: Failed with result 'exit-code'.
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
Error: Unable to initialize main class org.jitsi.videobridge.Main
Caused by: java.lang.NoClassDefFoundError: org/jitsi/metaconfig/MetaconfigLogger
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
Error: Unable to initialize main class org.jitsi.videobridge.Main
Caused by: java.lang.NoClassDefFoundError: org/jitsi/metaconfig/MetaconfigLogger

Did i do something wrong/ miss something?

Thanks!

I didn’t try to change the videobridge code before but I want to ask something. Do you get any error if you recreate the jar file without changing any code?

And is this Java 8?

Hi,
Thanks for replying. No, I am using openJDK-11. Does it have to be Java 8?

I just added two lines of logger.info()… so I don’t think this changes is causing the issue…

Best.

I tried it one time and jvb started fine with openjdk 11

famous last words :slight_smile:

1 Like

Hi there,
Thanks for replying.
I have tried building from an untouched repo, still it didn’t work.

What is the command of building the jvb repo?
I just run “mvn clean package” pr “mvn clean install” but I didn’t see any dependecy folder being created under the target folder. I think I used the wrong command, maybe there is something I need to build before running “mvn clean package” ? Any thoughts on that?

Also openJDK-11 seems more fit to my situation because I got other bizarre errors when using openJDK-8.

Thanks for the help!

It looks like you’re uploading your jvb jar to a machine with an older version and some of the dependency libs are missing.

You’ll need to either build a fat jar here and upload that, or make sure you upload the other dependencies. You can build a fat jar by passing -P buildFatJar to mvn, e.g.: mvn clean package -p buildFarJar. It will create jitsi-videobridge-2.1-SNAPSHOT-jar-with-dependencies.jar.

And for best results use java 8.

Hi there,
buildFatJar works! Now JVB is back online for me. That’s a really good point, I didn’t have the lastest JVB installed on my server so It was missing some dependencies. Should have checked that earlier.

Thanks for the help!