zibi
Posts: 8
Joined: Sun May 17, 2020 10:37 am

HOWTO: Run TeamSpeak 3 server on Raspberry Pi 4

Mon May 25, 2020 9:39 pm

Greetings,

I've been hosting a ts3 server for me and my friends previously on my old RPi 3B+ using Exagear, and after getting my hands on RPi 4 (4 Gb), I decided it's time to move the server on the new machine. However, as Exagear has been discontinued, it is no longer a valid option to emulate 32 bit-systems (or any other) to run ts3 server. I also wanted to step away from unnecessary proprietary software on this setup. I couldn't find any solid tutorial for setting up the server for RPi 4, so I decided it's time to write my very first HOWTO. Please feel free to correct me, as I am writing this mostly out of memory :D

After some research, I found out that one can run programs meant for i386 architecture with qemu-user-static through chroot. I followed a guide written by Danct12 (https://danct12.github.io/x86-chroot-on-ARM/), but after installing needed packages and setting up the i368 chroot-environment, I couldn't run my server due to a bus error, caused by qemu. After a while of some more research, I found that qemu-user-static package is currently broken for raspbian, so only way to get it running was to compile it myself. Just to be sure everything worked, I also compiled the whole qemu (someone could correct me, if it was necessary or not).


Step 1. Install needed packages for the project


For git cloning and compiling:

Code: Select all

sudo apt install git libpixman-1-0 libpixman-1-dev bison flex

For chrooting:

Code: Select all

sudo apt install debootstrap qemu-user-static schroot binfmt-support
Note! The qemu-user-static is installed here in order to get the qemu-debootstrap installed - static executables will be replaced with the newly compiled ones.


Step 2. Compile qemu and qemu-user-static


Clone qemu from git:

Code: Select all

git clone git://git.qemu.org/qemu.git

Build & install qemu (This will take a long time on rpi4, and as stated before, might not be neccessary if the problem was only with qemu-user-static!):

Code: Select all

cd qemu
mkdir build; cd build
../configure
make

Finally, to install qemu to correct directories, run with sudo:

Code: Select all

sudo make install

Compiling of qemu-user-static is mainly adapted from Logan's Note (http://logan.tw/posts/2018/02/18/build- ... urce-code/)


Go back to cloned qemu-folder and compile qemu-user-static:

Code: Select all

cd qemu
mkdir build_static; cd build_static
../configure \
    --prefix=$(cd ../..; pwd)/qemu-user-static \
    --static \
    --disable-system \
    --enable-linux-user

The prefix part will install the build files to qemu-user-static directory on same level as your qemu-folder (in my case in the home folder).

Build and install:

Code: Select all

make -j4
make install

Go to the installation folder and add '-static' to the executables:

Code: Select all

cd ../../qemu-user-static/bin
for i in *; do mv $i $i-static; done

Copy the executables to correct folder:

Code: Select all

sudo cp * /usr/bin/


Step 3. Setup the i386 chroot


Make a new directory, where the guest i386 system will be installed:

Code: Select all

mkdir /srv/chroot/stretch_x86

Create the i386 user space in the newly created folder (I used Debian Stretch, but any other would probably work as well):

Code: Select all

sudo qemu-debootstrap --arch=i386 stretch /srv/chroot/stretch_x86

Create a schroot configuration file for easier access:

Code: Select all

sudo nano /etc/schroot/chroot.d/stretchx86

Code: Select all

[stretch-x86]
description=Debian Stretch (32 bit)
directory=/srv/chroot/stretch_x86
root-users=$(whoami)
users=$(whoami)
type=directory

Test the new userspace with schroot, which takes care of mounting for you (you should stay in current folder, as your current user):

Code: Select all

schroot -c stretch-x86

See if you are working in 32-bit environment (should return "i686"):

Code: Select all

arch

For some reason, when I tried running "apt update" or installing new packages, I got an error message "Method https has died unexpectedly!". To fix this, I edited apt sources and took of the "s" from the "https" (I know, a real hackerman :D):

Code: Select all

nano /etc/apt/sources.list

Code: Select all

#deb https://deb.debian.org/debian stretch main
deb http://deb.debian.org/debian stretch main


Step 4. Setup and install TeamSpeak3 Server


Before installing ts3server, a small change must be made in schroot config, in order to avoid an accounting error when starting the ts3server (resulting in crash). Exit the schroot with "exit". If you are not sure that you are back to host user space, run "arch" again. It should print "armv7l" if you are using raspbian.

Edit the schroot default fstab-file by uncommenting the second last line, allowing schroot user to read and write to /dev/shm (needed by teamspeak server):

Code: Select all

sudo nano /etc/schroot/default/fstab

Code: Select all

# fstab: static file system information for chroots.
# Note that the mount point will be prefixed by the chroot path
# (CHROOT_PATH)
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
/proc           /proc           none    rw,bind         0       0
/sys            /sys            none    rw,bind         0       0
/dev            /dev            none    rw,bind         0       0
/dev/pts        /dev/pts        none    rw,bind         0       0
/home           /home           none    rw,bind         0       0
/tmp            /tmp            none    rw,bind         0       0

# It may be desirable to have access to /run, especially if you wish
# to run additional services in the chroot.  However, note that this
# may potentially cause undesirable behaviour on upgrades, such as
# killing services on the host.
#/run           /run            none    rw,bind         0       0
#/run/lock      /run/lock       none    rw,bind         0       0
/dev/shm       /dev/shm        none    rw,bind         0       0
#/run/shm       /run/shm        none    rw,bind         0       0

Now we are ready to download and run ts3server! Schroot back to the guest user space, install bzip2 and download ts3server (32 bit linux version in my case, latest version at time of writing):

Code: Select all

apt install bzip2 
wget https://files.teamspeak-services.com/releases/server/3.12.1/teamspeak3-server_linux_x86-3.12.1.tar.bz2
tar -xjf teamspeak3-server_linux_x86-3.12.1.tar.bz2

Now cd to the teamspeak folder and start the server! Of note, on start the CPU usage went up for ~ minute or so, but got back to normal very soon. This far haven't experienced any spikes during test usage. To keep the server running in background, read the man page of schroot about beginning a session and running commands in it. From now on, for the configuration, any decent guide written for linux should be applicable.


Hopefully this guide will be helpful for many of you (and doesn't have many errors, as it's getting quite late :lol: )


Cheers and sorry for a long post! Here's an Unicode-potato:

Code: Select all

                                  ▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░                    
                              ▓▓▓▓████████████████▓▓▓▓▒▒              
                          ▓▓▓▓████░░░░░░░░░░░░░░░░██████▓▓            
                        ▓▓████░░░░░░░░░░░░░░░░░░░░░░░░░░████          
                      ▓▓██░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░██        
                    ▓▓██░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░██      
                  ▓▓██░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░██      
                ▓▓██░░░░░░▓▓██░░  ░░░░░░░░░░░░░░░░░░░░▓▓██░░  ░░██    
              ▓▓██░░░░░░░░██████░░░░░░░░░░░░░░░░░░░░░░██████░░░░░░██  
              ▓▓██░░░░░░░░██████▓▓░░░░░░██░░░░██░░░░░░██████▓▓░░░░██  
            ▓▓██▒▒░░░░░░░░▓▓████▓▓░░░░░░████████░░░░░░▓▓████▓▓░░░░░░██
          ▓▓██░░░░░░░░░░░░░░░░░░░░░░░░░░██░░░░██░░░░░░░░░░░░░░░░░░░░██
          ▓▓██░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░██
          ▓▓██░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░██
        ░░▓▓▒▒░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░██
        ▓▓██░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░██
        ▓▓██░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░██
        ▓▓██░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░██
      ▓▓██░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░██
      ▓▓██░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░██
      ▓▓██░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░██  
      ▓▓██░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░██  
    ▓▓██░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░██  
    ▓▓██░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░██  
    ▓▓██░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░██  
    ▓▓██░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░██  
    ▓▓██░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░██    
  ▓▓██░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░██    
  ▓▓██░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░██    
  ▓▓██░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░██    
  ▓▓██░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░██    
  ▓▓██░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░██  
  ▓▓██░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░██  
  ▓▓██░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░██  
    ▓▓██░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░██  
    ▓▓██░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░██  
    ▓▓██░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░██  
    ░░▓▓▓▓░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░██  
      ▓▓██░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░██░░  
        ▓▓██░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░██    
          ▓▓██░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░██      
          ▓▓██░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░██        
            ▓▓████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░██          
              ▓▓▓▓████████░░░░░░░░░░░░░░░░░░░░░░░░████████░░          
              ░░░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░            

landar
Posts: 3
Joined: Tue May 05, 2020 8:25 pm

Re: HOWTO: Run TeamSpeak 3 server on Raspberry Pi 4

Fri May 29, 2020 2:26 am

Hello, I am kind of a noob at linux. Will this work for both debian and ubuntu? any chance you could link a image download? Ive never done anything like this before.

zibi
Posts: 8
Joined: Sun May 17, 2020 10:37 am

Re: HOWTO: Run TeamSpeak 3 server on Raspberry Pi 4

Tue Jun 02, 2020 4:43 pm

Hey!

In case you meant debian and ubuntu on ARM architecture (since we are on rpi forum), ts works on both of them. The guide here is meant for Raspbian Buster, which is debian. If I recall correctly, you don't even need to compile the qemu on ubuntu server 20 (64 bit) (just make the installs with apt). I've tested with latest debian buster and ubuntu server 20 LTS (64bit) on my raspberry pi 4, and got the server running well. Unfortunately, I don't have an image and I'm already far in customizing my setup...

zjalexandre
Posts: 3
Joined: Sun Jun 07, 2020 2:55 pm

Re: HOWTO: Run TeamSpeak 3 server on Raspberry Pi 4

Sun Jun 07, 2020 2:59 pm

Hello! I'm trying to run the teamspeak3 server on my Raspberry Pi 4 4GB and I did everything you did and when running the server, it turns on but then hangs up and gives this message: " qemu: uncaught target signal 6 (Aborted) - core dumped"
I'm working with ubuntu server 20.04.

What should I do?

zibi
Posts: 8
Joined: Sun May 17, 2020 10:37 am

Re: HOWTO: Run TeamSpeak 3 server on Raspberry Pi 4

Thu Jun 18, 2020 9:43 am

zjalexandre wrote:
Sun Jun 07, 2020 2:59 pm
Hello! I'm trying to run the teamspeak3 server on my Raspberry Pi 4 4GB and I did everything you did and when running the server, it turns on but then hangs up and gives this message: " qemu: uncaught target signal 6 (Aborted) - core dumped"
I'm working with ubuntu server 20.04.

What should I do?
Hey and sorry for late reply!

That's weird, since that's pretty much similar error to the bus error I mentioned, when using the non-self-compiled binaries of qemu... Are you using 32 or 64 bit version of Ubuntu server? I got it running successfully without startup-error on 64 bit Ubuntu server 20.04. And you tried compiling both qemu and qemu-user-static on your raspberry, which is running the Ubuntu distro you mentioned?

I'm currently on vacation, but I can do a fresh install of Ubuntu next week to test it out again too :)

Cheers!

MordredOCE
Posts: 3
Joined: Mon Jun 22, 2020 7:28 am

Re: HOWTO: Run TeamSpeak 3 server on Raspberry Pi 4

Mon Jun 22, 2020 7:31 am

zibi wrote:
Thu Jun 18, 2020 9:43 am
zjalexandre wrote:
Sun Jun 07, 2020 2:59 pm
Hello! I'm trying to run the teamspeak3 server on my Raspberry Pi 4 4GB and I did everything you did and when running the server, it turns on but then hangs up and gives this message: " qemu: uncaught target signal 6 (Aborted) - core dumped"
I'm working with ubuntu server 20.04.

What should I do?
Hey and sorry for late reply!

That's weird, since that's pretty much similar error to the bus error I mentioned, when using the non-self-compiled binaries of qemu... Are you using 32 or 64 bit version of Ubuntu server? I got it running successfully without startup-error on 64 bit Ubuntu server 20.04. And you tried compiling both qemu and qemu-user-static on your raspberry, which is running the Ubuntu distro you mentioned?

I'm currently on vacation, but I can do a fresh install of Ubuntu next week to test it out again too :)

Cheers!
Hey zibi, thank you so much for going through all of that!

I was wondering if you had any chance of investigating the uncaught target signal error? I just ran into it myself...

zibi
Posts: 8
Joined: Sun May 17, 2020 10:37 am

Re: HOWTO: Run TeamSpeak 3 server on Raspberry Pi 4

Mon Jun 22, 2020 10:09 pm

zibi wrote:
zjalexandre wrote:
Sun Jun 07, 2020 2:59 pm
Hello! I'm trying to run the teamspeak3 server on my Raspberry Pi 4 4GB and I did everything you did and when running the server, it turns on but then hangs up and gives this message: " qemu: uncaught target signal 6 (Aborted) - core dumped"
I'm working with ubuntu server 20.04.

What should I do?
Hey and sorry for late reply!

That's weird, since that's pretty much similar error to the bus error I mentioned, when using the non-self-compiled binaries of qemu... Are you using 32 or 64 bit version of Ubuntu server? I got it running successfully without startup-error on 64 bit Ubuntu server 20.04. And you tried compiling both qemu and qemu-user-static on your raspberry, which is running the Ubuntu distro you mentioned?

I'm currently on vacation, but I can do a fresh install of Ubuntu next week to test it out again too :)

Cheers!


Hey again!

Today I did a fresh install of 64 bit Ubuntu Server 20.04 LTS on my RPi4 (4Gb). It seems there is no need for compiling anything on Ubuntu, just install needed packages with

Code: Select all

sudo apt install debootstrap qemu-user-static schroot binfmt-support

and run the qemu-debootstrap to install the guest system. This time, however, due to working on 64 bit Ubuntu (instead of 32 bit Rasbian, for which I wrote the guide originally) I installed a 64 bit version of Stretch by running

Code: Select all

sudo qemu-debootstrap --arch=amd64 stretch /srv/chroot/stretch_64
instead of 32 bit version (i386) mentioned in guide (which then again works well with rasbian). Teamspeak is running well as I'm writing this post, without errors, and I could connect to it from external network too.

If you were using 32 bit version of Ubuntu Server, try switching to 64 (as the arm processor in pi4 is 64 bit) and using 64 bit Stretch as guest system. Hope this helps! :)


MordredOCE wrote:
zibi wrote:
Thu Jun 18, 2020 9:43 am
zjalexandre wrote:
Sun Jun 07, 2020 2:59 pm
Hello! I'm trying to run the teamspeak3 server on my Raspberry Pi 4 4GB and I did everything you did and when running the server, it turns on but then hangs up and gives this message: " qemu: uncaught target signal 6 (Aborted) - core dumped"
I'm working with ubuntu server 20.04.

What should I do?

Hey and sorry for late reply!

That's weird, since that's pretty much similar error to the bus error I mentioned, when using the non-self-compiled binaries of qemu... Are you using 32 or 64 bit version of Ubuntu server? I got it running successfully without startup-error on 64 bit Ubuntu server 20.04. And you tried compiling both qemu and qemu-user-static on your raspberry, which is running the Ubuntu distro you mentioned?

I'm currently on vacation, but I can do a fresh install of Ubuntu next week to test it out again too :)

Cheers!
Hey zibi, thank you so much for going through all of that!

I was wondering if you had any chance of investigating the uncaught target signal error? I just ran into it myself...

Hey MordredOCE, the error seems to be also related to qemu, either bus error or the seqmentation fault-error. On newest rasbian 32 bit I got around it by compiling qemu according to my first post, or on Ubuntu by using 64 bit version of both host and guest systems. Which OS are you using?


Cheers!

MordredOCE
Posts: 3
Joined: Mon Jun 22, 2020 7:28 am

Re: HOWTO: Run TeamSpeak 3 server on Raspberry Pi 4

Tue Jun 23, 2020 11:28 am

zibi wrote:
Mon Jun 22, 2020 10:09 pm
Hey again!

Today I did a fresh install of 64 bit Ubuntu Server 20.04 LTS on my RPi4 (4Gb). It seems there is no need for compiling anything on Ubuntu, just install needed packages with

Code: Select all

sudo apt install debootstrap qemu-user-static schroot binfmt-support

and run the qemu-debootstrap to install the guest system. This time, however, due to working on 64 bit Ubuntu (instead of 32 bit Rasbian, for which I wrote the guide originally) I installed a 64 bit version of Stretch by running

Code: Select all

sudo qemu-debootstrap --arch=amd64 stretch /srv/chroot/stretch_64
instead of 32 bit version (i386) mentioned in guide (which then again works well with rasbian). Teamspeak is running well as I'm writing this post, without errors, and I could connect to it from external network too.

If you were using 32 bit version of Ubuntu Server, try switching to 64 (as the arm processor in pi4 is 64 bit) and using 64 bit Stretch as guest system. Hope this helps! :)


MordredOCE wrote:
zibi wrote:
Thu Jun 18, 2020 9:43 am



Hey and sorry for late reply!

That's weird, since that's pretty much similar error to the bus error I mentioned, when using the non-self-compiled binaries of qemu... Are you using 32 or 64 bit version of Ubuntu server? I got it running successfully without startup-error on 64 bit Ubuntu server 20.04. And you tried compiling both qemu and qemu-user-static on your raspberry, which is running the Ubuntu distro you mentioned?

I'm currently on vacation, but I can do a fresh install of Ubuntu next week to test it out again too :)

Cheers!
Hey zibi, thank you so much for going through all of that!

I was wondering if you had any chance of investigating the uncaught target signal error? I just ran into it myself...

Hey MordredOCE, the error seems to be also related to qemu, either bus error or the seqmentation fault-error. On newest rasbian 32 bit I got around it by compiling qemu according to my first post, or on Ubuntu by using 64 bit version of both host and guest systems. Which OS are you using?


Cheers!
Yo, it worked perfectly! Now that I think about it, trying to run differing architectures 3 times would create issues! :lol:

It's working great, thank you so much!

zibi
Posts: 8
Joined: Sun May 17, 2020 10:37 am

Re: HOWTO: Run TeamSpeak 3 server on Raspberry Pi 4

Tue Jun 23, 2020 12:09 pm

Awesome! Glad you got it to work! :) Out of curiosity, on which host-guest OS combination did you get it working?

Cheers!

MordredOCE
Posts: 3
Joined: Mon Jun 22, 2020 7:28 am

Re: HOWTO: Run TeamSpeak 3 server on Raspberry Pi 4

Tue Jun 23, 2020 12:11 pm

zibi wrote:
Tue Jun 23, 2020 12:09 pm
Awesome! Glad you got it to work! :) Out of curiosity, on which host-guest OS combination did you get it working?

Cheers!

I'm running the RPI specific distro of Ubuntu 20.04 on the machine, and 64-bit Stretch via QEMU. No compilations necessary, just like you said!

zjalexandre
Posts: 3
Joined: Sun Jun 07, 2020 2:55 pm

Re: HOWTO: Run TeamSpeak 3 server on Raspberry Pi 4

Mon Jun 29, 2020 11:24 am

zibi wrote:
Mon Jun 22, 2020 10:09 pm
zibi wrote:
zjalexandre wrote:
Sun Jun 07, 2020 2:59 pm
Hello! I'm trying to run the teamspeak3 server on my Raspberry Pi 4 4GB and I did everything you did and when running the server, it turns on but then hangs up and gives this message: " qemu: uncaught target signal 6 (Aborted) - core dumped"
I'm working with ubuntu server 20.04.

What should I do?
Hey and sorry for late reply!

That's weird, since that's pretty much similar error to the bus error I mentioned, when using the non-self-compiled binaries of qemu... Are you using 32 or 64 bit version of Ubuntu server? I got it running successfully without startup-error on 64 bit Ubuntu server 20.04. And you tried compiling both qemu and qemu-user-static on your raspberry, which is running the Ubuntu distro you mentioned?

I'm currently on vacation, but I can do a fresh install of Ubuntu next week to test it out again too :)

Cheers!


Hey again!

Today I did a fresh install of 64 bit Ubuntu Server 20.04 LTS on my RPi4 (4Gb). It seems there is no need for compiling anything on Ubuntu, just install needed packages with

Code: Select all

sudo apt install debootstrap qemu-user-static schroot binfmt-support

and run the qemu-debootstrap to install the guest system. This time, however, due to working on 64 bit Ubuntu (instead of 32 bit Rasbian, for which I wrote the guide originally) I installed a 64 bit version of Stretch by running

Code: Select all

sudo qemu-debootstrap --arch=amd64 stretch /srv/chroot/stretch_64
instead of 32 bit version (i386) mentioned in guide (which then again works well with rasbian). Teamspeak is running well as I'm writing this post, without errors, and I could connect to it from external network too.

If you were using 32 bit version of Ubuntu Server, try switching to 64 (as the arm processor in pi4 is 64 bit) and using 64 bit Stretch as guest system. Hope this helps! :)


MordredOCE wrote:
zibi wrote:
Thu Jun 18, 2020 9:43 am



Hey and sorry for late reply!

That's weird, since that's pretty much similar error to the bus error I mentioned, when using the non-self-compiled binaries of qemu... Are you using 32 or 64 bit version of Ubuntu server? I got it running successfully without startup-error on 64 bit Ubuntu server 20.04. And you tried compiling both qemu and qemu-user-static on your raspberry, which is running the Ubuntu distro you mentioned?

I'm currently on vacation, but I can do a fresh install of Ubuntu next week to test it out again too :)

Cheers!
Hey zibi, thank you so much for going through all of that!

I was wondering if you had any chance of investigating the uncaught target signal error? I just ran into it myself...

Hey MordredOCE, the error seems to be also related to qemu, either bus error or the seqmentation fault-error. On newest rasbian 32 bit I got around it by compiling qemu according to my first post, or on Ubuntu by using 64 bit version of both host and guest systems. Which OS are you using?


Cheers!
Hello again. I want to thank you for the help you have made available to me. It was very useful and I managed to solve my problem: D. I reinstalled uubuntu but this time 32 bits and it worked. I have just one more question: how do I script the server to start at boot?

zibi
Posts: 8
Joined: Sun May 17, 2020 10:37 am

Re: HOWTO: Run TeamSpeak 3 server on Raspberry Pi 4

Tue Jun 30, 2020 4:03 pm

zjalexandre wrote:
Mon Jun 29, 2020 11:24 am
zibi wrote:
Mon Jun 22, 2020 10:09 pm
zibi wrote:

Hey and sorry for late reply!

That's weird, since that's pretty much similar error to the bus error I mentioned, when using the non-self-compiled binaries of qemu... Are you using 32 or 64 bit version of Ubuntu server? I got it running successfully without startup-error on 64 bit Ubuntu server 20.04. And you tried compiling both qemu and qemu-user-static on your raspberry, which is running the Ubuntu distro you mentioned?

I'm currently on vacation, but I can do a fresh install of Ubuntu next week to test it out again too :)

Cheers!


Hey again!

Today I did a fresh install of 64 bit Ubuntu Server 20.04 LTS on my RPi4 (4Gb). It seems there is no need for compiling anything on Ubuntu, just install needed packages with

Code: Select all

sudo apt install debootstrap qemu-user-static schroot binfmt-support

and run the qemu-debootstrap to install the guest system. This time, however, due to working on 64 bit Ubuntu (instead of 32 bit Rasbian, for which I wrote the guide originally) I installed a 64 bit version of Stretch by running

Code: Select all

sudo qemu-debootstrap --arch=amd64 stretch /srv/chroot/stretch_64
instead of 32 bit version (i386) mentioned in guide (which then again works well with rasbian). Teamspeak is running well as I'm writing this post, without errors, and I could connect to it from external network too.

If you were using 32 bit version of Ubuntu Server, try switching to 64 (as the arm processor in pi4 is 64 bit) and using 64 bit Stretch as guest system. Hope this helps! :)


MordredOCE wrote:

Hey zibi, thank you so much for going through all of that!

I was wondering if you had any chance of investigating the uncaught target signal error? I just ran into it myself...

Hey MordredOCE, the error seems to be also related to qemu, either bus error or the seqmentation fault-error. On newest rasbian 32 bit I got around it by compiling qemu according to my first post, or on Ubuntu by using 64 bit version of both host and guest systems. Which OS are you using?


Cheers!
Hello again. I want to thank you for the help you have made available to me. It was very useful and I managed to solve my problem: D. I reinstalled uubuntu but this time 32 bits and it worked. I have just one more question: how do I script the server to start at boot?

Hey!

Glad you got it running! :) I'm currently just starting it manually with following script:

Code: Select all

#!/bin/bash

# Start schroot instance with name "ts3", if not already running:
if ! test -f /var/lib/schroot/session/ts3
then
        schroot -b -c stretch-x86 -n ts3
fi

# Start ts3server:
schroot -r -c ts3 teamspeak/ts3server_startscript.sh start
One way you could do this in startup, is by adding the start commands to /etc/rc.local before the "exit 0":

Code: Select all

# Start schroot instance with name "ts3":
schroot -b -c stretch-x86 -n ts3

# Start ts3-server inside schroot instance:
schroot -r -c ts3 teamspeak/ts3server_startscript.sh start


Of course, you must edit the script I wrote the way it points at the schroot environment you created (the name you put in the config file). The command "schroot -r -c ts3" basically lets you run any commands in the instance named "ts3" you started into background with the first command. For instance, you can check the server status with:

Code: Select all

schroot -r -c ts3 teamspeak/ts3server_startscript.sh status


Hope this helped!

-Cheers!

zjalexandre
Posts: 3
Joined: Sun Jun 07, 2020 2:55 pm

Re: HOWTO: Run TeamSpeak 3 server on Raspberry Pi 4

Wed Jul 01, 2020 1:14 pm

zibi wrote:
Tue Jun 30, 2020 4:03 pm
zjalexandre wrote:
Mon Jun 29, 2020 11:24 am
zibi wrote:
Mon Jun 22, 2020 10:09 pm




Hey again!

Today I did a fresh install of 64 bit Ubuntu Server 20.04 LTS on my RPi4 (4Gb). It seems there is no need for compiling anything on Ubuntu, just install needed packages with

Code: Select all

sudo apt install debootstrap qemu-user-static schroot binfmt-support

and run the qemu-debootstrap to install the guest system. This time, however, due to working on 64 bit Ubuntu (instead of 32 bit Rasbian, for which I wrote the guide originally) I installed a 64 bit version of Stretch by running

Code: Select all

sudo qemu-debootstrap --arch=amd64 stretch /srv/chroot/stretch_64
instead of 32 bit version (i386) mentioned in guide (which then again works well with rasbian). Teamspeak is running well as I'm writing this post, without errors, and I could connect to it from external network too.

If you were using 32 bit version of Ubuntu Server, try switching to 64 (as the arm processor in pi4 is 64 bit) and using 64 bit Stretch as guest system. Hope this helps! :)






Hey MordredOCE, the error seems to be also related to qemu, either bus error or the seqmentation fault-error. On newest rasbian 32 bit I got around it by compiling qemu according to my first post, or on Ubuntu by using 64 bit version of both host and guest systems. Which OS are you using?


Cheers!
Hello again. I want to thank you for the help you have made available to me. It was very useful and I managed to solve my problem: D. I reinstalled uubuntu but this time 32 bits and it worked. I have just one more question: how do I script the server to start at boot?

Hey!

Glad you got it running! :) I'm currently just starting it manually with following script:

Code: Select all

#!/bin/bash

# Start schroot instance with name "ts3", if not already running:
if ! test -f /var/lib/schroot/session/ts3
then
        schroot -b -c stretch-x86 -n ts3
fi

# Start ts3server:
schroot -r -c ts3 teamspeak/ts3server_startscript.sh start
One way you could do this in startup, is by adding the start commands to /etc/rc.local before the "exit 0":

Code: Select all

# Start schroot instance with name "ts3":
schroot -b -c stretch-x86 -n ts3

# Start ts3-server inside schroot instance:
schroot -r -c ts3 teamspeak/ts3server_startscript.sh start


Of course, you must edit the script I wrote the way it points at the schroot environment you created (the name you put in the config file). The command "schroot -r -c ts3" basically lets you run any commands in the instance named "ts3" you started into background with the first command. For instance, you can check the server status with:

Code: Select all

schroot -r -c ts3 teamspeak/ts3server_startscript.sh status


Hope this helped!

-Cheers!

Thank you very much. And where is the script supposed to be placed? At what location?

Return to “Advanced users”