[GH-ISSUE #2260] Teamspeak3 server installation issues with MariaDB #1719

Closed
opened 2026-02-27 02:58:42 +03:00 by kerem · 4 comments
Owner

Originally created by @visdmin on GitHub (Apr 6, 2019).
Original GitHub issue: https://github.com/GameServerManagers/LinuxGSM/issues/2260

User Story

If trying to install the TeamSpeak3 server, and use MariaDB as database installation will be successfully completed, but user will not be able to start the server using the MariaDB configured, because generated database connection configuration has syntax error due typo in the installation script, and user is not able to input database socket path in the installation process.

Installation process does not ask user for path to MariaDB socket, which makes the server unable to connect to the database ( at least in my system ), but teamspeak3 server will start successfully. If you fix the ts3db_mariadb.ini after installation and start your server, you will not be able to use the MariaDB.

Configuration file ( ts3db_mariadb.ini ) generated by the installation process in install_ts3db.sh has issues because typo in the script and i think that user should be able to input the path to the MariaDB socket.

First echo is probably not intentional, and will get written in to the ts3db_mariadb.ini - line 35

{
        echo "updating config."
        echo "[config]"
        echo "host='${mariahostname}'"
        echo "port='${mariaport}'"
        echo "username='${mariausername}'"
        echo "password='${mariapassword}'"
        echo "database='${mariadbname}'"
        echo "socket="
} >> "${servercfgdir}/ts3db_mariadb.ini"

Basic info

  • Distro: [Centos 7]
  • Game: [TeamSpeak3]
  • Command: [install]

Further Information

Issue n.1 typo in install_ts3db.sh - line 35

Issue n.2 install_ts3db.sh script does not ask user for database socket path.

Issue n.3 install_ts3db.sh libmariadb.so.2 is not copied from serverfiles/redist/ -> serverfiles/ if the file is not found in serverfiles/, even the libmariadb.so.2 is always included in teamspeak3 server files under redist/.

To Reproduce

Steps to reproduce the behaviour:

  1. preconfigure your mariadb dabatase ( Create user and create database for ts3server ).
  2. start installation ( ./ts3server install )
  3. Do you want to use MariaDB/MySQL instead of sqlite? (DB must be pre-configured) [y/N] y
  4. Installation will fail because libmariadb.so.2 is not found in serverfiles/
  5. cp serverfiles/redist/libmariadb.so.2 serverfiles/
  6. start installation ( ./ts3server install )
  7. Do you want to use MariaDB/MySQL instead of sqlite? (DB must be pre-configured) [y/N] y
  8. Input your database connection information.
Configuring TeamSpeak 3 Server for MariaDB/MySQL
=================================
Enter MariaDB hostname: localhost
Enter MariaDB port: 3306
Enter MariaDB username: **********
Enter MariaDB password: **********************************
Enter MariaDB database name: TestDB
=================================
Information! Accepting TeamSpeak license:
 * /home/teamspeak3-server/temp/serverfiles/LICENSE

Getting privilege key
=================================
IMPORANT! Save these details for later.
Starting the TeamSpeak 3 server
TeamSpeak 3 server started, for details please view the log file

------------------------------------------------------------------
                      I M P O R T A N T
------------------------------------------------------------------
               Server Query Admin Account created
         loginname= "serveradmin", password= "**********"
------------------------------------------------------------------


------------------------------------------------------------------
                      I M P O R T A N T
------------------------------------------------------------------
      ServerAdmin privilege key created, please use it to gain
      serveradmin rights for your virtualserver. please
      also check the doc/privilegekey_guide.txt for details.

       token=*******************************************
------------------------------------------------------------------

Stopping the TeamSpeak 3 server.done
    fetching fix.sh...OK

Applying Post-Install Fixes
=================================
Information! No fixes required.
    fetching install_complete.sh...OK
=================================
Install Complete!

To start server type:
./ts3server start

    fetching core_exit.sh...OK

  1. ts3db_mariadb.ini will be generated and looks like this ->
updating config.
[config]
host='localhost'
port='3306'
username='************************'
password='************************'
database='TestDB'
socket=
  1. TeamSpeak3 server will be started and connection to the MariaDB fails due incorrect syntax or because socket incorrectly defined, anyways connection fails, and ts3 server fallbacks to the sqlite database and creates one.

  2. Fix the ts3db_mariadb.ini and add your path to the socket.

[config]
host='localhost'
port='3306'
username='ts3server'
password='9?3tWSbKkWjt&Y5mX49E%a=5B?e+'
database='teamspeak3'
socket='/var/lib/mysql/mysql.sock'
  1. start the server once again ./ts3server start ( Server starts and is now using the MariaDB database correctly. )

Expected behaviour

User should be able to input the path to the database socket in installation process, so server would work right after installation process with need to find the database connection configuration file and fixing it.

Typo in install_ts3db.sh line - 35 should be fixed so that user does not have to find it and fix it after the installation, and server would function as expected right from the start.

Installation script should try to cp the libmariadb.so.2 file from redist/ and place it in to the correct place if user is trying to configure the ts3 server to use MariaDB while installing.
This can be annoying for the new users, and requires the user to do some googleing to find out what to do.

I have already made required fixes to the install_ts3db.sh and the changes have been pushed to my fork https://github.com/Vis25/LinuxGSM

I will be creating pull request to fix this issue.

Best regards,
visdmin
06.04.2019

Originally created by @visdmin on GitHub (Apr 6, 2019). Original GitHub issue: https://github.com/GameServerManagers/LinuxGSM/issues/2260 ## User Story If trying to install the TeamSpeak3 server, and use MariaDB as database installation will be successfully completed, but user will not be able to start the server using the MariaDB configured, because generated database connection configuration has syntax error due typo in the installation script, and user is not able to input database socket path in the installation process. Installation process does not ask user for path to MariaDB socket, which makes the server unable to connect to the database ( at least in my system ), but teamspeak3 server will start successfully. If you fix the ts3db_mariadb.ini after installation and start your server, you will not be able to use the MariaDB. Configuration file ( ts3db_mariadb.ini ) generated by the installation process in [install_ts3db.sh](https://github.com/GameServerManagers/LinuxGSM/blob/master/lgsm/functions/install_ts3db.sh) has issues because typo in the script and i think that user should be able to input the path to the MariaDB socket. First echo is probably not intentional, and will get written in to the ts3db_mariadb.ini - line 35 ``` { echo "updating config." echo "[config]" echo "host='${mariahostname}'" echo "port='${mariaport}'" echo "username='${mariausername}'" echo "password='${mariapassword}'" echo "database='${mariadbname}'" echo "socket=" } >> "${servercfgdir}/ts3db_mariadb.ini" ``` ## Basic info * Distro: [Centos 7] * Game: [TeamSpeak3] * Command: [install] ## Further Information Issue n.1 typo in [ install_ts3db.sh ](https://github.com/GameServerManagers/LinuxGSM/blob/master/lgsm/functions/install_ts3db.sh) - line 35 Issue n.2 [ install_ts3db.sh ](https://github.com/GameServerManagers/LinuxGSM/blob/master/lgsm/functions/install_ts3db.sh) script does not ask user for database socket path. Issue n.3 [ install_ts3db.sh ](https://github.com/GameServerManagers/LinuxGSM/blob/master/lgsm/functions/install_ts3db.sh) libmariadb.so.2 is not copied from serverfiles/redist/ -> serverfiles/ if the file is not found in serverfiles/, even the libmariadb.so.2 is always included in teamspeak3 server files under redist/. ## To Reproduce Steps to reproduce the behaviour: 1. preconfigure your mariadb dabatase ( Create user and create database for ts3server ). 2. start installation ( `./ts3server install` ) 3. Do you want to use MariaDB/MySQL instead of sqlite? (DB must be pre-configured) [y/N] y 4. Installation will fail because libmariadb.so.2 is not found in serverfiles/ 5. `cp serverfiles/redist/libmariadb.so.2 serverfiles/` 6. start installation ( `./ts3server install` ) 7. Do you want to use MariaDB/MySQL instead of sqlite? (DB must be pre-configured) [y/N] y 8. Input your database connection information. ``` Configuring TeamSpeak 3 Server for MariaDB/MySQL ================================= Enter MariaDB hostname: localhost Enter MariaDB port: 3306 Enter MariaDB username: ********** Enter MariaDB password: ********************************** Enter MariaDB database name: TestDB ================================= Information! Accepting TeamSpeak license: * /home/teamspeak3-server/temp/serverfiles/LICENSE Getting privilege key ================================= IMPORANT! Save these details for later. Starting the TeamSpeak 3 server TeamSpeak 3 server started, for details please view the log file ------------------------------------------------------------------ I M P O R T A N T ------------------------------------------------------------------ Server Query Admin Account created loginname= "serveradmin", password= "**********" ------------------------------------------------------------------ ------------------------------------------------------------------ I M P O R T A N T ------------------------------------------------------------------ ServerAdmin privilege key created, please use it to gain serveradmin rights for your virtualserver. please also check the doc/privilegekey_guide.txt for details. token=******************************************* ------------------------------------------------------------------ Stopping the TeamSpeak 3 server.done fetching fix.sh...OK Applying Post-Install Fixes ================================= Information! No fixes required. fetching install_complete.sh...OK ================================= Install Complete! To start server type: ./ts3server start fetching core_exit.sh...OK ``` 9. ts3db_mariadb.ini will be generated and looks like this -> ``` updating config. [config] host='localhost' port='3306' username='************************' password='************************' database='TestDB' socket= ``` 10. TeamSpeak3 server will be started and connection to the MariaDB fails due incorrect syntax or because socket incorrectly defined, anyways connection fails, and ts3 server fallbacks to the sqlite database and creates one. 11. Fix the ts3db_mariadb.ini and add your path to the socket. ``` [config] host='localhost' port='3306' username='ts3server' password='9?3tWSbKkWjt&Y5mX49E%a=5B?e+' database='teamspeak3' socket='/var/lib/mysql/mysql.sock' ``` 12. start the server once again `./ts3server start` ( Server starts and is now using the MariaDB database correctly. ) ## Expected behaviour User should be able to input the path to the database socket in installation process, so server would work right after installation process with need to find the database connection configuration file and fixing it. Typo in [install_ts3db.sh](https://github.com/GameServerManagers/LinuxGSM/blob/master/lgsm/functions/install_ts3db.sh) line - 35 should be fixed so that user does not have to find it and fix it after the installation, and server would function as expected right from the start. Installation script should try to cp the libmariadb.so.2 file from redist/ and place it in to the correct place if user is trying to configure the ts3 server to use MariaDB while installing. This can be annoying for the new users, and requires the user to do some googleing to find out what to do. I have already made required fixes to the [install_ts3db.sh](https://github.com/GameServerManagers/LinuxGSM/blob/master/lgsm/functions/install_ts3db.sh) and the changes have been pushed to my fork https://github.com/Vis25/LinuxGSM I will be creating pull request to fix this issue. Best regards, visdmin 06.04.2019
kerem 2026-02-27 02:58:42 +03:00
  • closed this issue
  • added the
    type: bug
    label
Author
Owner

@visdmin commented on GitHub (Apr 6, 2019):

This issue ( or issues ), are fixed by these changes in my fork.
github.com/Vis25/LinuxGSM@8d0edf32fc
github.com/Vis25/LinuxGSM@99fba6cb29

Here is how the installation process looks like after these fixes.

Do you want to use MariaDB/MySQL instead of sqlite? (DB must be pre-configured) [y/N] y
checking if libmariadb2 is installed
=================================
        libmariadb.so.2 => not found
libmariadb2 not installed.
Trying to installing libmariadb2.
Done installing libmariadb2.
Retrying to continue.

Checking if libmariadb2 is installed
=================================
libmariadb2 installed.

Configuring TeamSpeak 3 Server for MariaDB/MySQL
=================================
Enter MariaDB hostname: localhost
Enter MariaDB port: 3306
Enter MariaDB username: ************************
Enter MariaDB password: ************************
Enter MariaDB database name: TestDB
Enter MariaDB socket path:/var/lib/mysql/mysql.sock
Updating config.
=================================

Here is the generated ts3db_mariadb.ini

[config]
host='localhost'
port='3306'
username='************************'
password='************************'
database='TestDB'
socket='/var/lib/mysql/mysql.sock'
<!-- gh-comment-id:480521530 --> @visdmin commented on GitHub (Apr 6, 2019): This issue ( or issues ), are fixed by these changes in my fork. https://github.com/Vis25/LinuxGSM/commit/8d0edf32fc6b9178a312dad87a10a96c3022ba08 https://github.com/Vis25/LinuxGSM/commit/99fba6cb296a1038f7353453e0aaf6c5508d9bff Here is how the installation process looks like after these fixes. ``` Do you want to use MariaDB/MySQL instead of sqlite? (DB must be pre-configured) [y/N] y checking if libmariadb2 is installed ================================= libmariadb.so.2 => not found libmariadb2 not installed. Trying to installing libmariadb2. Done installing libmariadb2. Retrying to continue. Checking if libmariadb2 is installed ================================= libmariadb2 installed. Configuring TeamSpeak 3 Server for MariaDB/MySQL ================================= Enter MariaDB hostname: localhost Enter MariaDB port: 3306 Enter MariaDB username: ************************ Enter MariaDB password: ************************ Enter MariaDB database name: TestDB Enter MariaDB socket path:/var/lib/mysql/mysql.sock Updating config. ================================= ``` Here is the generated ts3db_mariadb.ini ``` [config] host='localhost' port='3306' username='************************' password='************************' database='TestDB' socket='/var/lib/mysql/mysql.sock' ```
Author
Owner

@dgibbs64 commented on GitHub (Apr 6, 2019):

The detail is amazing. Thank you for the effort!

<!-- gh-comment-id:480524888 --> @dgibbs64 commented on GitHub (Apr 6, 2019): The detail is amazing. Thank you for the effort!
Author
Owner

@visdmin commented on GitHub (Apr 6, 2019):

Hope we can get this resolved so someone's life will be easier in future !

Great to hear that my research, and reporting was well done ( First time working with GitHub project ).

<!-- gh-comment-id:480532287 --> @visdmin commented on GitHub (Apr 6, 2019): Hope we can get this resolved so someone's life will be easier in future ! Great to hear that my research, and reporting was well done ( First time working with GitHub project ).
Author
Owner

@lock[bot] commented on GitHub (Apr 25, 2020):

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

<!-- gh-comment-id:619342875 --> @lock[bot] commented on GitHub (Apr 25, 2020): This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Sign in to join this conversation.
No labels
Atomic
Epic
cannot reproduce
command: backup
command: console
command: debug
command: details
command: fast-dl
command: install
command: mods
command: monitor
command: post-details
command: restart
command: send
command: start
command: stop
command: update
command: update-lgsm
command: validate
command: wipe
distro: AlmaLinux
distro: Arch Linux
distro: CentOS
distro: Debian
distro: Fedora
distro: RedHat
distro: Rocky Linux
distro: Ubuntu
distro: openSUSE
engine: goldsrc
engine: source
game: 7 Days to Die
game: ARMA 3
game: Ark: Survival Evolved
game: Assetto Corsa
game: Avorion
game: BATTALION: Legacy
game: Barotrauma
game: Battalion 1944
game: Battlefield 1942
game: Black Mesa: Deathmatch
game: Blade Symphony
game: Call of Duty 2
game: Call of Duty 4
game: Call of Duty: United Offensive
game: Counter-Strike 1.6
game: Counter-Strike 2
game: Counter-Strike: Global Offensive
game: Counter-Strike: Source
game: Day of Infamy
game: Dayz
game: Death Match Classic
game: Don't Starve Together
game: ET: Legacy
game: Eco
game: Factorio
game: Factorio
game: Garry's Mod
game: Half-Life
game: Hurtword
game: Insurgecy
game: Insurgecy
game: Insurgency: Sandstorm
game: Just Cause 3
game: Killing Floor
game: Killing Floor 2
game: Left 4 Dead 2
game: Minecraft
game: Minecraft Bedrock
game: Mordhau
game: Multi Theft Auto
game: Mumble
game: Natural Selection 2
game: No More Room in Hell
game: Pavlov VR
game: Post Scriptum
game: Project Zomboid
game: Quake 3
game: QuakeWorld
game: Red Orchestra: Ostfront 41-45
game: Return to Castle Wolfenstein
game: Rising World
game: Rust
game: San Andreas Multiplayer
game: Satisfactory
game: Soldat
game: Soldier of Fortune 2
game: Squad
game: Squad 44
game: Starbound
game: Stationeers
game: Sven Co-op
game: Team Fortress 2
game: Teamspeak 3
game: Teeworlds
game: Terraria
game: The Front
game: Unreal Tournament 2004
game: Unreal Tournament 3
game: Unreal Tournament 99
game: Unturned
game: Valheim
game: Wurm Unlimited
game: Zombie Master Reborn
game: label missing
good first issue
help wanted
info: alerts
info: dependency
info: docker
info: docs
info: email
info: query
info: steamcmd
info: systemd
info: tmux
info: website
info: website
needs more info
outcome: duplicate
outcome: issue resolved
outcome: issue resolved
outcome: issue unresolved
outcome: pr accepted
outcome: pr rejected
outcome: unconfirmed
outcome: wontfix
outcome: wrong forum
potential-duplicate
priority
pull-request
type: bug
type: feature
type: feature
type: feature request
type: game server request
type: refactor
waiting response
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/LinuxGSM#1719
No description provided.