Forum


Notice to all users

We are migrating towards a new forum system located at community.teamspeak.com, as such this forum will become read-only on January 29, 2020

Results 1 to 4 of 4
  1. #1
    Join Date
    August 2011
    Posts
    2

    Question MySQL Error on TeamSpeak 3 Boot Script

    Hi Guys!
    Whilst trying to move my Teamspeak 3 server from one machine to another, I've ran into a sting of issues. The forums have helped solve my first two issues (which were a libmysqlclient error and a MySQL socket error). However I'm now experiencing a strange error on my automatic boot script (which launches TS3 when the machine starts).

    I'm using a Ubuntu Linux 10.04. This is the startup init.d script itself.

    Code:
    #!/bin/sh
    # chkconfig: 2345 99 10
    # description: Starts or Stops TeamSpeak 3 Server
    #
    USER="root"
    TS3='/etc/teamspeak'
    STARTSCRIPT="$TS3/ts3server_startscript.sh"
    COMMANDLINE_PARAMETERS="inifile=ts3server.ini"
    cd $TS3
    case "$1" in
    'start')
    su $USER -c "$STARTSCRIPT start $COMMANDLINE_PARAMETERS"
    ;;
    'stop')
    su $USER -c "$STARTSCRIPT stop"
    ;;
    'status')
    su $USER -c "$STARTSCRIPT status"
    ;;
    *)
    echo "Usage $0 start|stop|status"
    esac
    When the server boots it creates the pid file in the TS3 directory. However it appears to crash with the following error instantly.

    Code:
    2012-06-02 13:58:16.201675|INFO    |ServerLibPriv |   | TeamSpeak 3 Server 3.0.2 (2012-02-29 05:39:32)
    2012-06-02 13:58:16.506459|INFO    |DatabaseQuery |   | dbPlugin name:    MySQL plugin, (c)TeamSpeak Systems GmbH
    2012-06-02 13:58:16.671542|INFO    |DatabaseQuery |   | dbPlugin version: 1
    2012-06-02 13:58:16.773330|ERROR   |DatabaseQuery |   | mysql_real_connect() failed with error: Can't connect to MySQL server on '127.0.0.1' (111)
    2012-06-02 13:58:16.773392|CRITICAL|ServerLibPriv |   | Server() DatabaseError
    To make it stranger, if I run this command...

    Code:
    sudo /etc/init.d/teamspeak start
    It starts perfectly without error. I therefore assume it's not a MySQL issue but rather an issue with the startup configuration? I'm at a loss with this particular error due to my inexperience. Hopefully someone will be able to point out an error.

    Thanks in advance,
    Kieran

  2. #2
    Join Date
    January 2010
    Location
    Germany
    Posts
    2,029
    Simple, when the TS3 Init.d Script launches the MySQL Server is not launched yet, hence a connection cannot be established. When you instantly run the init Script yourself then the MySQL Server is already there and it is working just fine.
    You need to make sure the MySQL Server is launched before your TS3 Script runs.

  3. #3
    Join Date
    August 2011
    Posts
    2
    I had my suspicions that it was something to do with the boot order. How would I go about ensuring Teamspeak starts after MySQL?
    Thanks for your help.

  4. #4
    Join Date
    January 2010
    Location
    Germany
    Posts
    2,029
    not that deep into init.d so try google.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Teamspeak3 start on boot with MySQL
    By nireos in forum Linux / FreeBSD
    Replies: 1
    Last Post: February 21st, 2015, 04:29 PM
  2. [Resolved] Unable to launch TS3 with a boot script
    By Robidu in forum Linux / FreeBSD
    Replies: 0
    Last Post: May 11th, 2012, 01:47 AM
  3. Ubuntu start at boot with MySQL
    By Fraq! in forum Linux / FreeBSD
    Replies: 3
    Last Post: November 8th, 2010, 05:00 AM
  4. Replies: 1
    Last Post: April 7th, 2010, 02:34 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •