Shut Down and 111 after start

Status
Not open for further replies.

titi

Member
Dec 16, 2015
4
3
35
Hi
I'm sorry for my bad Englsih, I'm French
I have VPS (Centos 6) and i have installed Teamspeak server 3.0.11.4
When I reboot my server, Teamspeak server Start with this scipt :

#!/bin/sh # chkconfig: 2345 99 01
# description: Teamspeak 3 Server
### BEGIN INIT INFO
# Provides: teamspeak3
# Required-Start: $all
# Required-Stop: # Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Description: Teamspeak 3 Server
### END INIT INFO
USER="ts3"
DIR="/home/ts3"
case "" in
start)
su $USER -c "${DIR}/AccountingServerEmulator-Linux" sleep 10
su $USER -c "${DIR}/ts3server_startscript.sh start"
;;
stop)
su $USER -c "${DIR}/ts3server_startscript.sh stop"
su $USER -c "${DIR}/AccountingServerEmulator-Linux"
;;
restart)
su $USER -c "${DIR}/ts3server_startscript.sh restart"
su $USER -c "${DIR}/AccountingServerEmulator-Linux"
;;
status)
su $USER -c "${DIR}/ts3server_startscript.sh status"
su $USER -c "${DIR}/AccountingServerEmulator-Linux"
;;
*)
echo "Benutze: `basename $0` {start|stop|restart|status}" >&2
exit 1
;;
esac
exit 0

Logs TS :
2016-07-17 08:49:22.874790|INFO |ServerLibPriv | | TeamSpeak 3 Server 3.0.11.4 (2015-08-18 13:30:34)
2016-07-17 08:49:22.875450|INFO |ServerLibPriv | | SystemInformation: Linux 2.6.32-042stab111.12 #1 SMP Thu Sep 17 11:38:20 MSK 2015 x86_64 Binary: 64bit
2016-07-17 08:49:22.896851|INFO |DatabaseQuery | | dbPlugin name: SQLite3 plugin, Version 2, (c)TeamSpeak Systems GmbH
2016-07-17 08:49:22.900796|INFO |DatabaseQuery | | dbPlugin version: 3.6.21
2016-07-17 08:49:22.919581|INFO |DatabaseQuery | | checking database integrity (may take a while)
2016-07-17 08:49:23.031931|ERROR | | | TS3ANetwork::Connect failed error: 111
2016-07-17 08:49:23.032051|ERROR | | | Unable to connect to primary address, trying secondary
2016-07-17 08:49:23.032210|ERROR | | | TS3ANetwork::Connect failed error: 111
2016-07-17 08:49:23.035009|ERROR |Accounting | | Unable to connect to accounting server
2016-07-17 08:49:23.035053|INFO |Accounting | | Licensing Information
2016-07-17 08:49:23.035084|INFO |Accounting | | licensed to : MESMERiZE
2016-07-17 08:49:23.035116|INFO |Accounting | | type : Hoster
2016-07-17 08:49:23.035196|INFO |Accounting | | starting date : Fri Jan 1 00:00:00 2010
2016-07-17 08:49:23.035229|INFO |Accounting | | ending date : Wed Jan 1 00:00:00 2025
2016-07-17 08:49:23.035259|INFO |Accounting | | max virtualservers: 65535
2016-07-17 08:49:23.035289|INFO |Accounting | | max slots : 16776960
2016-07-17 08:49:25.149683|INFO | | | Puzzle precompute time: 2037
2016-07-17 08:49:25.150513|INFO |FileManager | | listening on 0.0.0.0:30033
2016-07-17 08:49:25.374600|INFO |CIDRManager | | updated query_ip_whitelist ips: 127.0.0.1, X.X.X.X, X.X.X.X, X.X.X.X,
2016-07-17 08:49:25.377440|INFO |Query | | listening on 0.0.0.0:10011
2016-07-17 08:49:25.444580|ERROR | | | TS3ANetwork::Connect failed error: 111
2016-07-17 08:49:25.444666|ERROR | | | Unable to connect to primary address, trying secondary
2016-07-17 08:49:25.444813|ERROR | | | TS3ANetwork::Connect failed error: 111

Teamspeak Run, but AccountingServerEmulator-Linux dosen't work. I have to start it manually.

I do not understand why "AccountingServerEmulator-Linux" does not start with the autostart script.

I read the forum several times and tried everything that is proposed (Firewall TCP-UDP, rename AccountingServerEmulator-Linux to FUTS, installed anticrash)

Thank you for your Help ;)
 
Last edited:

shinryu

Member
Jun 29, 2016
1
1
38
this one works for me
Code:
#!/bin/sh
### BEGIN INIT INFO
# Provides:  teamspeak3_start
# Required-Start:  $local_fs $network
# Required-Stop:  $local_fs $network
# Default-Start:  2 3 4 5
# Default-Stop:  0 1 6
# Short-Description:
# Description:  Teamspeak 3 Server
#
### END INIT INFO#!/bin/sh

case "$1" in
start)
su root -c "/usr/local/ts3/./AccountingServerEmulator-Linux"
sleep 10
su root -c "/usr/local/ts3/./ts3server_startscript.sh start"
;;
stop)
su root -c "/usr/local/ts3/./ts3server_startscript.sh stop"
su root -c "/usr/local/ts3/./AccountingServerEmulator-Linux stop"
;;
*)
echo "$0 (start|stop)"
exit 1
;;
esac
exit 0

otherwise use accounting script. You can find it somewhere here...
 

titi

Member
Dec 16, 2015
4
3
35
@shinryu thanks but your script doesn't work on Centos.
"/usr/local/ts3/./ts3server_startscript.sh stop" => Centos say : "./ts3server_startscript.sh it's not a folder"

@timodohmen
Thanks for your help. Where are the folder of Teamspeak in your script?
What is BINARYNAME ?

Thanks ;)
 
Last edited:

Haxxthe

Member
Sep 16, 2015
95
48
54
Or use a script that checks the ts server every minute like I did :)
Code:
#!/bin/bash
TEAMSPEAK=`ps ax | grep ts3server_linux_amd64 | grep -v grep | wc -l`
if [ $TEAMSPEAK -eq 1 ]
then
exit
else
echo TS3 Server Down - Restarting
./ts3server_startscript.sh start
fi
that with crontab will do the trick
And for the accounting, start it every minute. It doesn't start twice if one instance is already running :9
 

titi

Member
Dec 16, 2015
4
3
35
#!/bin/sh
### BEGIN INIT INFO
# Provides: teamspeak3_start
# Required-Start: $local_fs $network
# Required-Stop: $local_fs $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description:
# Description: Teamspeak 3 Server
#
### END INIT INFO#!/bin/sh

case "$1" in
start)
su root -c "/usr/local/ts3/./AccountingServerEmulator-Linux"
sleep 10
su root -c "/usr/local/ts3/./ts3server_startscript.sh start"
;;
stop)
su root -c "/usr/local/ts3/./ts3server_startscript.sh stop"
su root -c "/usr/local/ts3/./AccountingServerEmulator-Linux stop"
;;
*)
echo "$0 (start|stop)"
exit 1
;;
esac
exit 0
Use ./usr/local/ts3/ts3server_startscript.sh stop
With this script, i have the same problem. Teamspeak Run, but AccountingServerEmulator-Linux dosen't run.
 

titi

Member
Dec 16, 2015
4
3
35
@Haxxthe helped me. He explained with Teamviewer how to create scripts and gave me several council to manage my server. He even price temp install Debian 8. Thanks for your help. ;)
 
Status
Not open for further replies.
Top