Auto start on server boot "startscript"

Hi,

I’m having an autostart problem on my Ts server after a server reboot or crash.

My server works normally, but when the server crashes or needs to be restarted I have to manually type the command “./ts3server_startscript.sh start” .

I tried two different methods.

  1. crontab -e
    @reboot cd /home/yourteamspeakdirectory && ./ts3server_startscript.sh start

  2. nano /lib/systemd/system/ts3server.service
    [Unit]
    Description=Teamspeak Service
    Wants=network.target

[Service]
WorkingDirectory=/home/teamspeak
User=teamspeak
ExecStart=/home/teamspeak/ts3server_minimal_runscript.sh
ExecStop=/home/teamspeak/ts3server_startscript.sh stop
ExecReload=/home/teamspeak/ts3server_startscript.sh restart
Restart=always
RestartSec=15

[Install]
WantedBy=multi-user.target

For both methods when I do reboot the server will not start automatically

  1. Screenshot by Lightshot
  2. Screenshot by Lightshot

I’m probably doing something wrong, I need help.

Thanks in advance.

This doesn’t help. Could you send us the 0.log of the server so we can find the issue?

2022-12-03 16:24:07.767062|INFO    |ServerLibPriv |   |TeamSpeak 3 Server 3.13.7 (2022-06-20 12:21:53)
2022-12-03 16:24:07.767133|INFO    |ServerLibPriv |   |SystemInformation: Linux 5.4.0-100-generic #113-Ubuntu SMP Thu Feb 3 18:43:29 UTC 2022 x86_64 Binary: 64bit
2022-12-03 16:24:07.767150|INFO    |ServerLibPriv |   |Using hardware aes
2022-12-03 16:24:07.767566|INFO    |DatabaseQuery |   |dbPlugin name:    SQLite3 plugin, Version 3, (c)TeamSpeak Systems GmbH
2022-12-03 16:24:07.767588|INFO    |DatabaseQuery |   |dbPlugin version: 3.11.1
2022-12-03 16:24:07.767730|INFO    |DatabaseQuery |   |checking database integrity (may take a while)
2022-12-03 16:24:07.783834|INFO    |Accounting    |   |Licensing Information
2022-12-03 16:24:07.783890|INFO    |Accounting    |   |licensed to       : ----------
2022-12-03 16:24:07.783899|INFO    |Accounting    |   |type              : -----------
2022-12-03 16:24:07.783913|INFO    |Accounting    |   |starting date     : Thu Nov 24 00:00:00 2022
2022-12-03 16:24:07.783920|INFO    |Accounting    |   |ending date       : Fri Nov 24 00:00:00 2023
2022-12-03 16:24:07.783927|INFO    |Accounting    |   |max virtualservers: 1
2022-12-03 16:24:07.783934|INFO    |Accounting    |   |max slots         : 256
2022-12-03 16:24:07.849818|ERROR   |Accounting    |   |Server https://accounting2.teamspeak.com replied with status: 403 Forbidden
2022-12-03 16:24:07.871796|ERROR   |Accounting    |   |Error contacting server https://backupaccounting2.teamspeak.com: RESOLVE_ERROR: Host not found (authoritative)
2022-12-03 16:24:07.871850|ERROR   |Accounting    |   |Unable to connect to accounting server
2022-12-03 16:24:09.036141|INFO    |              |   |Puzzle precompute time: 1238
2022-12-03 16:24:09.036586|INFO    |FileManager   |   |listening on 0.0.0.0:30033, [::]:30033
2022-12-03 16:24:09.037402|INFO    |Query         |   |Using a query thread pool size of 2
2022-12-03 16:24:09.052899|INFO    |Query         |   |listening for query on 0.0.0.0:10011, [::]:10011
2022-12-03 16:24:09.053075|INFO    |Query         |   |listening for ssh query on 0.0.0.0:10022, [::]:10022
2022-12-03 16:24:09.053160|INFO    |Query         |   |listening for http query on 0.0.0.0:10080, [::]:10080
2022-12-03 16:24:09.053210|INFO    |CIDRManager   |   |updated query_ip_allowlist ips: 127.0.0.1/32, ::1/128, 
2022-12-03 16:24:09.089112|INFO    |ServerLibPriv |   |failed to download revocation list - count: 1
2022-12-03 16:24:09.096016|INFO    |ServerLibPriv |   |failed to download revocation list - count: 1
2022-12-03 16:29:11.002758|ERROR   |              |   |TS3ANetwork::Send failed error: 111
2022-12-03 16:29:13.002714|ERROR   |              |   |TS3ANetwork::Send failed error: 111
2022-12-03 16:37:53.228262|INFO    |              |   |Error opening file "files/virtualserver_1/internal/icons/icon_1994527899": No such file or directory
2022-12-03 16:37:53.289941|INFO    |              |   |Error opening file "files/virtualserver_1/internal/icons/icon_4022260194": No such file or directory
2022-12-03 16:37:53.500539|INFO    |              |   |Error opening file "files/virtualserver_1/internal/icons/icon_1639894369": No such file or directory
2022-12-03 16:39:09.273197|ERROR   |              |   |TS3ANetwork::Send failed error: 111
2022-12-03 16:39:11.003742|ERROR   |              |   |TS3ANetwork::Send failed error: 111
2022-12-03 16:39:13.002749|ERROR   |              |   |TS3ANetwork::Send failed error: 111
2022-12-03 16:47:02.584935|INFO    |              |   |Error opening file "files/virtualserver_1/internal/icons/icon_1273213478": No such file or directory
2022-12-03 16:49:09.266908|ERROR   |              |   |TS3ANetwork::Send failed error: 111
2022-12-03 16:49:11.006717|ERROR   |              |   |TS3ANetwork::Send failed error: 111
2022-12-03 16:59:11.002717|ERROR   |              |   |TS3ANetwork::Send failed error: 111
2022-12-03 16:59:13.002745|ERROR   |              |   |TS3ANetwork::Send failed error: 111
2022-12-03 17:09:09.232737|ERROR   |              |   |TS3ANetwork::Send failed error: 111
2022-12-03 17:09:11.002734|ERROR   |              |   |TS3ANetwork::Send failed error: 111
2022-12-03 17:09:13.002726|ERROR   |              |   |TS3ANetwork::Send failed error: 111
2022-12-03 17:19:09.295298|ERROR   |              |   |TS3ANetwork::Send failed error: 111
2022-12-03 17:19:11.006792|ERROR   |              |   |TS3ANetwork::Send failed error: 111
2022-12-03 17:19:13.002725|ERROR   |              |   |TS3ANetwork::Send failed error: 111
2022-12-03 17:29:09.324591|ERROR   |              |   |TS3ANetwork::Send failed error: 111
2022-12-03 17:29:11.002717|ERROR   |              |   |TS3ANetwork::Send failed error: 111
2022-12-03 17:29:13.003815|ERROR   |              |   |TS3ANetwork::Send failed error: 111
2022-12-03 17:39:09.381964|ERROR   |              |   |TS3ANetwork::Send failed error: 111
2022-12-03 17:39:11.006726|ERROR   |              |   |TS3ANetwork::Send failed error: 111
2022-12-03 17:39:13.006746|ERROR   |              |   |TS3ANetwork::Send failed error: 111
2022-12-03 17:49:09.529001|ERROR   |              |   |TS3ANetwork::Send failed error: 111
2022-12-03 17:49:11.006745|ERROR   |              |   |TS3ANetwork::Send failed error: 111
2022-12-03 17:49:13.006738|ERROR   |              |   |TS3ANetwork::Send failed error: 111
2022-12-03 17:59:09.581720|ERROR   |              |   |TS3ANetwork::Send failed error: 111
2022-12-03 17:59:11.007572|ERROR   |              |   |TS3ANetwork::Send failed error: 111
2022-12-03 17:59:13.006718|ERROR   |              |   |TS3ANetwork::Send failed error: 111
2022-12-03 18:09:09.543449|ERROR   |              |   |TS3ANetwork::Send failed error: 111
2022-12-03 18:09:11.002725|ERROR   |              |   |TS3ANetwork::Send failed error: 111
2022-12-03 18:09:13.003608|ERROR   |              |   |TS3ANetwork::Send failed error: 111
2022-12-03 18:19:09.619038|ERROR   |              |   |TS3ANetwork::Send failed error: 111
2022-12-03 18:19:11.002724|ERROR   |              |   |TS3ANetwork::Send failed error: 111
2022-12-03 18:19:13.002751|ERROR   |              |   |TS3ANetwork::Send failed error: 111
2022-12-03 18:24:07.784047|ERROR   |Accounting    |   |Could not connect to accounting server after multiple attempts, shutting down server

And I forgot to mention that my server shuts down by itself every 2 hours

Except the TS3ANetwork error i see that it shows up every 10 minutes which is the weblist and it’s down and you can ignore it, I see that your server can’t communicate with the accounting system (since you have an active license). Make sure that you have opened all the required ports:

can you help me with that, I tried something but it didn’t work and I still can’t find a solution
what should I do to change those ports?

Since you have Ubuntu this tutorial about setting up firewall rules will help you for sure.

I did everything needed for those ports, however when reinstalling the vps I didn’t insert the ts3 license and the server didn’t shut down even once, I also got the error “TS3ANetwork::Send failed error: 111” but it didn’t shut down , when I put in the “non-profit license” my server shut down after 2 hours and every time it shuts down after 2 hours when the license is present

same 0.log as above

2022-12-03 16:24:07.849818|ERROR   |Accounting    |   |Server https://accounting2.teamspeak.com replied with status: 403 Forbidden
2022-12-03 16:24:07.871796|ERROR   |Accounting    |   |Error contacting server https://backupaccounting2.teamspeak.com: RESOLVE_ERROR: Host not found (authoritative)
2022-12-03 16:24:07.871850|ERROR   |Accounting    |   |Unable to connect to accounting server

It could be that Cloudflare thinks that your server ip is suspicious.
https://support.cloudflare.com/hc/en…-site-visitor-
You can test your IP on Inspect an IP | Project Honey Pot

The Project Honey Pot system has detected behavior from the IP address consistent with that of a spam harvester and comment spammer . Below we’ve reported some other data associated with this IP. This interrelated data helps map spammers’ networks and aids in law enforcement efforts. If you know something about this IP, please [leave a comment]

what I can to do now

If the problem is ip as you say or those ports,
how does it work for me no problem a server that has no license means it has 32 slots until i insert my license, and when I insert my “non-profit license” license, the server shuts down for exactly 2 hours of work .
And i get this error

2022-12-03 16:24:07.849818|ERROR   |Accounting    |   |Server https://accounting2.teamspeak.com replied with status: 403 Forbidden
2022-12-03 16:24:07.871796|ERROR   |Accounting    |   |Error contacting server https://backupaccounting2.teamspeak.com: RESOLVE_ERROR: Host not found (authoritative)
2022-12-03 16:24:07.871850|ERROR   |Accounting    |   |Unable to connect to accounting server

Without license there is no need to contact accounting.

https://www.projecthoneypot.org/contact_us.php?ft=Mistaken%20Listing

1 Like