Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running jitsi-meet on ARM devices Amazon, Ampere, Odroid, Marvell ThunderX, Raspberry Pi 4, Tinkerboard running Raspbian, Armbian, Debian or Ubuntu #6449

Closed
crouchingtigerhiddenadam opened this issue Apr 28, 2020 · 16 comments
Labels
invalid Issue is deemed to not apply / be feasible

Comments

@crouchingtigerhiddenadam
Copy link
Contributor

crouchingtigerhiddenadam commented Apr 28, 2020

Installing Jitsi Meet on ARM Based Systems 12/05/2020

Contents:

  1. Important Notes
  2. Instructions for ARM (aarch64)
  3. Instructions for ARM (armhf) inc. Raspberry Pi 4
  4. Advanced Scenarios

1. Important Notes

1.1. Running Raspberry Pi 4 with the 64-bit Kernel

If you are using raspbian-nspawn-64 then open the 64 bit shell using:

sudo ds64-shell

Then follow the ARM (aarch64) instructions instead of the ARM (armhf) instructions.

2. Instructions for ARM (aarch64)

2.1. Install OpenJDK 8 (aarch64)

wget http://security.debian.org/debian-security/pool/updates/main/o/openjdk-8/openjdk-8-jre_8u242-b08-1~deb9u1_arm64.deb
wget http://security.debian.org/debian-security/pool/updates/main/o/openjdk-8/openjdk-8-jre-headless_8u242-b08-1~deb9u1_arm64.deb
wget http://security.debian.org/debian-security/pool/updates/main/o/openjdk-8/openjdk-8-jdk_8u242-b08-1~deb9u1_arm64.deb
wget http://security.debian.org/debian-security/pool/updates/main/o/openjdk-8/openjdk-8-jdk-headless_8u242-b08-1~deb9u1_arm64.deb

sudo apt install \
 ./openjdk-8-jre_8u242-b08-1~deb9u1_arm64.deb \
 ./openjdk-8-jre-headless_8u242-b08-1~deb9u1_arm64.deb \
 ./openjdk-8-jdk_8u242-b08-1~deb9u1_arm64.deb \
 ./openjdk-8-jdk-headless_8u242-b08-1~deb9u1_arm64.deb

2.2. Configure OpenJDK 8 (aarch64)

Set the java version to use:

sudo update-alternatives --config java

Select /usr/lib/jvm/java-8-openjdk-arm64/jre/bin/java from the menu.

2.3. Install Jitsi Meet (aarch64)

Using this method you will have to keep Jitsi Meet up-to-date yourself.

wget https://download.jitsi.org/stable/jicofo_1.0-566-1_all.deb
wget https://download.jitsi.org/stable/jitsi-meet-prosody_1.0.4074-1_all.deb
wget https://download.jitsi.org/stable/jitsi-meet-web_1.0.4074-1_all.deb
wget https://download.jitsi.org/stable/jitsi-meet-web-config_1.0.4074-1_all.deb
wget https://download.jitsi.org/stable/jitsi-videobridge2_2.1-197-g38256192-1_all.deb

sudo apt -y install \
  ./jicofo_1.0-566-1_all.deb \
  ./jitsi-meet-prosody_1.0.4074-1_all.deb \
  ./jitsi-meet-web_1.0.4074-1_all.deb \
  ./jitsi-meet-web-config_1.0.4074-1_all.deb \
  ./jitsi-videobridge2_2.1-197-g38256192-1_all.deb

2.4. Stop Services (aarch64)

sudo systemctl stop prosody jitsi-videobridge2 jicofo

2.5. Recompile jniwrapper-native-1.0-SNAPSHOT (aarch64)

export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-arm64
sudo apt update
sudo apt install automake autoconf build-essential libtool git maven m4
git clone https://github.com/sctplab/usrsctp.git
git clone https://github.com/jitsi/jitsi-sctp
mv ./usrsctp ./jitsi-sctp/usrsctp/
cd ./jitsi-sctp
mvn package -DbuildSctp -DbuildNativeWrapper -DdeployNewJnilib -DskipTests
cp ./jniwrapper/native/target/libjnisctp-linux-aarch64.so \
 ./jniwrapper/native/src/main/resources/lib/linux/libjnisctp.so
mvn package
sudo cp ./jniwrapper/native/target/jniwrapper-native-1.0-SNAPSHOT.jar \
 /usr/share/jitsi-videobridge/lib/jniwrapper-native-1.0-SNAPSHOT.jar

2.6. Clear the Log Files and Restart Services (aarch64)

sudo rm /var/log/prosody/prosody.log
sudo rm /var/log/jitsi/jicofo.log
sudo rm /var/log/jitsi/jvb.log
sudo systemctl start prosody jitsi-videobridge2 jicofo

3. Instructions for ARM (armhf) inc. Raspberry Pi 4

3.1. Install OpenJDK 8 (armhf)

wget http://security.debian.org/debian-security/pool/updates/main/o/openjdk-8/openjdk-8-jre_8u242-b08-1~deb9u1_armhf.deb
wget http://security.debian.org/debian-security/pool/updates/main/o/openjdk-8/openjdk-8-jre-headless_8u242-b08-1~deb9u1_armhf.deb
wget http://security.debian.org/debian-security/pool/updates/main/o/openjdk-8/openjdk-8-jdk_8u242-b08-1~deb9u1_armhf.deb
wget http://security.debian.org/debian-security/pool/updates/main/o/openjdk-8/openjdk-8-jdk-headless_8u242-b08-1~deb9u1_armhf.deb

sudo apt install \
 ./openjdk-8-jre_8u242-b08-1~deb9u1_armhf.deb \
 ./openjdk-8-jre-headless_8u242-b08-1~deb9u1_armhf.deb \
 ./openjdk-8-jdk_8u242-b08-1~deb9u1_armhf.deb \
 ./openjdk-8-jdk-headless_8u242-b08-1~deb9u1_armhf.deb

3.2. Configure OpenJDK 8 (armhf)

Set the java version to use:

sudo update-alternatives --config java

Select /usr/lib/jvm/java-8-openjdk-armhf/jre/bin/java from the menu.

3.3. Install Jitsi Meet (armhf)

Using this method you will have to keep Jitsi Meet up-to-date yourself.

wget https://download.jitsi.org/stable/jicofo_1.0-566-1_all.deb
wget https://download.jitsi.org/stable/jitsi-meet-prosody_1.0.4074-1_all.deb
wget https://download.jitsi.org/stable/jitsi-meet-web_1.0.4074-1_all.deb
wget https://download.jitsi.org/stable/jitsi-meet-web-config_1.0.4074-1_all.deb
wget https://download.jitsi.org/stable/jitsi-videobridge2_2.1-197-g38256192-1_all.deb

sudo apt -y install \
  ./jicofo_1.0-566-1_all.deb \
  ./jitsi-meet-prosody_1.0.4074-1_all.deb \
  ./jitsi-meet-web_1.0.4074-1_all.deb \
  ./jitsi-meet-web-config_1.0.4074-1_all.deb \
  ./jitsi-videobridge2_2.1-197-g38256192-1_all.deb

3.4. Stop Services (armhf)

sudo systemctl stop prosody jitsi-videobridge2 jicofo

3.5. Recompile jniwrapper-native-1.0-SNAPSHOT (armhf)

export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-armhf
sudo apt update
sudo apt install automake autoconf build-essential libtool git maven m4
git clone https://github.com/sctplab/usrsctp.git
git clone https://github.com/jitsi/jitsi-sctp
mv ./usrsctp ./jitsi-sctp/usrsctp/
cd ./jitsi-sctp
mvn package -DbuildSctp -DbuildNativeWrapper -DdeployNewJnilib -DskipTests
cp ./jniwrapper/native/target/libjnisctp-linux-arm.so \
 ./jniwrapper/native/src/main/resources/lib/linux/libjnisctp.so
mvn package
sudo cp ./jniwrapper/native/target/jniwrapper-native-1.0-SNAPSHOT.jar \
 /usr/share/jitsi-videobridge/lib/jniwrapper-native-1.0-SNAPSHOT.jar

3.6. Adjust the Memory Limits on Jitsi VideoBridge2 (armhf)

Open /etc/jitsi/videobridge/config:

sudo nano /etc/jitsi/videobridge/config

and add line:

VIDEOBRIDGE_MAX_MEMORY=1024m

Save by pressing ctrl+x, ctrl+y and enter when prompted.

3.7. Experimental: Adjust the Memory Limits on Jicofo (armhf)

Open jicofo.sh:

sudo nano /usr/share/jicofo/jicofo.sh

and change:

exec java -Xmx3072m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp $LOGGING_CONFIG_PARAM $JAVA_SYS_PROPS -cp $cp $mainClass $@

to:

exec java -Xmx1024m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp $LOGGING_CONFIG_PARAM $JAVA_SYS_PROPS -cp $cp $mainClass $@

Save by pressing ctrl+x, ctrl+y and enter when prompted.

3.8. Clear the Log Files and Restart Services (armhf)

sudo rm /var/log/prosody/prosody.log
sudo rm /var/log/jitsi/jicofo.log
sudo rm /var/log/jitsi/jvb.log
sudo systemctl start prosody jitsi-videobridge2 jicofo

4. Advanced Scenarios

4.1. Installing Behind a NAT Router

You will need to forward ports 80/TCP, 443/TCP and 10000/UDP. Creating a Let's Encrypt certificate and setting up Jitsi VideoBridge2 is covered in the Quick Guide.

@crouchingtigerhiddenadam
Copy link
Contributor Author

crouchingtigerhiddenadam commented Apr 29, 2020

@hbasora
Copy link

hbasora commented Apr 30, 2020

I can't change hostname, it's just asking for secret when installing prosody, any help?

@hbasora
Copy link

hbasora commented Apr 30, 2020

sudo cat /var/log/prosody/prosody.log
Apr 29 22:06:58 mod_component info Disconnecting component, stream:error is: stream:errorfocus.localhost does not match any configured external components</stream:error>

sudo cat /var/log/jitsi/jicofo.log

This server does not serve auth.localhost

sudo cat /var/log/jitsi/jvb.log
2020-04-29 22:06:22.788 INFORMACIÓN: [22] [hostname=localhost id=shard] MucClient.lambda$getConnectAndLoginCallable$7#648: Logging in.

localhost should be conferencias.mensuravirtual.com

@crouchingtigerhiddenadam
Copy link
Contributor Author

@hbasora have you tried https://community.jitsi.org and posting your question there? If you post here I probably wont see it, I'm spending more time in the community pages. Support questions are better placed there.

@krithin
Copy link

krithin commented May 2, 2020

For what it's worth I adapted these instructions for Ubuntu Server 20.04 here: https://gist.github.com/krithin/e50a6001c8435e46cb85f5c6c78e2d66

@hbasora
Copy link

hbasora commented May 3, 2020

For what it's worth I adapted these instructions for Ubuntu Server 20.04 here: https://gist.github.com/krithin/e50a6001c8435e46cb85f5c6c78e2d66

Thank you, that worked, I was using Debian Buster...., now I'll try to implement Jwt hehe

@tgeimer
Copy link

tgeimer commented May 7, 2020

For what it's worth I adapted these instructions for Ubuntu Server 20.04 here: https://gist.github.com/krithin/e50a6001c8435e46cb85f5c6c78e2d66

Hi, following krithin's instructions I was able to successfully install jitsi-meet on my pi 4 (4GB RAM). Thank you for your efforts, guys and keep up the good work! :-)

@luixxiul luixxiul added the invalid Issue is deemed to not apply / be feasible label May 24, 2020
@mrjohnson22
Copy link

Did the videobridge recently change how it loads the SCTP library? Ever since jitsi-videobridge2 2.1-273-g072dd44b-1, it complains about a mismatched architecture even after I follow all of the provided steps, which worked great for me before:

java.lang.UnsatisfiedLinkError: /tmp/nativeutils71750745336281/libjnisctp.so: /tmp/nativeutils71750745336281/libjnisctp.so: wrong ELF class: ELFCLASS64 (Possible cause: architecture word width mismatch)

Stranger still, I tried removing /usr/share/jitsi-videobridge/lib/jniwrapper-native-1.0-SNAPSHOT.jar to see what would happen, and the same error occurred, instead of something like a "file not found" error.

Thankfully, using websockets instead of SCTP is a viable alternative. But I'd still like to figure out what's going on.

Also, has the post on community.jitsi.org been moved/removed? Trying to view it gives me an error of "Oops! That page doesn’t exist or is private."

Thanks for this great guide!

@mrjohnson22
Copy link

Ah, the difference is that the latest version of the Debian 10 jitsi-videobridge2 package installs jniwrapper-native-1.0-2-ga3ad2e6.jar instead of jniwrapper-native-1.0-SNAPSHOT.jar. When copying the generated JAR file in Step 2.5 / 3.5, giving the copied file a name of jniwrapper-native-1.0-2-ga3ad2e6.jar will work.

@cristianapas
Copy link

Hi

Based on this guide, I did an installation on a Renegade SBC using armbian 20.08 and I commented that I use the official adoptopenjdk and jitsi repositories to simplify the installation. Regarding the jniwrapper modify the step in this way to replace the current version:
sudo cp ./jniwrapper/native/target/jniwrapper-native-1.0-SNAPSHOT.jar \
$(ls /usr/share/jitsi-videobridge/lib/jniwrapper-native-*)

@cristianapas
Copy link

Hello, here is a guide that I created, based mostly on the information in this post, using repositories and apt to install the packages:
https://github.com/cristianapas/jitsi-on-arm64

@licaon-kter
Copy link
Contributor

Did you have issues with OpenJDK11 and that's the reason to go back to 8? I've always used 11 and didn't see any issues on Debian Buster arm64.

@jpr5
Copy link

jpr5 commented Jul 2, 2021

FWIW, here's instructions for building/running JITSI on AWS ARM64 instances (Graviton2).

Simpler than all the others referenced here.

Cheers.

@licaon-kter
Copy link
Contributor

@jpr5 running on Pi RAM is an issue for building jitsi-meet (the front) as node ooms on 1Gb. Running, memory is fine, but CPU will get loaded a lot more.

@bigjdunham
Copy link

bigjdunham commented Mar 2, 2022

Anyone have good instructions on how to build Jitsi for ARM in Docker? I'm having trouble building the Prosody, Jigasi, and Jibri images.

@Staynex
Copy link

Staynex commented Apr 2, 2022

Generally Docker Images for ARM64 would be nice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid Issue is deemed to not apply / be feasible
Projects
None yet
Development

No branches or pull requests