Can not conect to my Server on Docker

Since the official docker image was updated shortly, my teamspeak Server is not reachable anymore. Docker Container is running as usual. Just not reachable. Tried to use the 3.13.6 Image, but it doesn’t seem to work anymore “The default license has expired. Please use the latest server version.”. Any help?

Hi sorry, for the late reply.

Have you opened UDP? It is required put udp behind the port or else it opens TCP ports.

docker run -p 9987:9987/udp -p 10011:10011 -p 30033:30033 -e TS3SERVER_LICENSE=accept teamspeak
2 Likes

I did. It still does not work. Also tried to run the server without Docker at all and it doesn’t work either

What does the docker log say for the server container?
Is the port open in your host’s firewall?

1 Like

Log:

2023-11-04 20:24:27.050540|INFO    |ServerLibPriv |   |TeamSpeak 3 Server 3.13.7 (2022-06-20 12:21:53)
2023-11-04 20:24:27.050978|INFO    |ServerLibPriv |   |SystemInformation: Linux 5.15.0-88-generic #98-Ubuntu SMP Mon Oct 2 15:18:56 UTC 2023 x86_64 Binary: 64bit
2023-11-04 20:24:27.051071|INFO    |ServerLibPriv |   |Using hardware aes
2023-11-04 20:24:27.053869|INFO    |DatabaseQuery |   |dbPlugin name:    SQLite3 plugin, Version 3, (c)TeamSpeak Systems GmbH
2023-11-04 20:24:27.053935|INFO    |DatabaseQuery |   |dbPlugin version: 3.11.1
2023-11-04 20:24:27.068313|INFO    |DatabaseQuery |   |checking database integrity (may take a while)
2023-11-04 20:24:27.206772|WARNING |Accounting    |   |Unable to open licensekey.dat, falling back to limited functionality
2023-11-04 20:24:27.215592|INFO    |Accounting    |   |Licensing Information
2023-11-04 20:24:27.215662|INFO    |Accounting    |   |licensed to       : Anonymous
2023-11-04 20:24:27.215684|INFO    |Accounting    |   |type              : No License
2023-11-04 20:24:27.215700|INFO    |Accounting    |   |starting date     : Tue Feb  1 00:00:00 2022
2023-11-04 20:24:27.215718|INFO    |Accounting    |   |ending date       : Thu Jul  1 00:00:00 2027
2023-11-04 20:24:27.215737|INFO    |Accounting    |   |max virtualservers: 1
2023-11-04 20:24:27.215753|INFO    |Accounting    |   |max slots         : 32
2023-11-04 20:24:27.880066|INFO    |              |   |Puzzle precompute time: 631
2023-11-04 20:24:27.880735|INFO    |FileManager   |   |listening on 0.0.0.0:30033, [::]:30033
2023-11-04 20:24:27.880859|INFO    |VirtualSvrMgr |   |executing monthly interval
2023-11-04 20:24:27.881323|INFO    |VirtualSvrMgr |   |reset virtualserver traffic statistics
2023-11-04 20:24:27.884113|INFO    |Query         |   |Using a query thread pool size of 2
2023-11-04 20:24:27.998986|INFO    |Query         |   |listening for query on 0.0.0.0:10011, [::]:10011
2023-11-04 20:24:27.999305|INFO    |CIDRManager   |   |updated query_ip_allowlist ips: 127.0.0.1/32, ::1/128, 
2023-11-04 20:24:29.080893|INFO    |              |   |myTeamSpeak identifier revocation list was downloaded successfully - all related features are activated

Ports are open. Even tried deactivating the Firewall in Plesk

Well, the logs look good. I am pretty sure that the problem is somewhere in the network configuration, be it firewall, NATing, or whatever.
You could shut down the server temporarily and try to establish a connection on the intended UDP voice port through netcat:

On the server run:

nc -ul 9987 # or the UDP port used for your TS server

On any client run:

nc -u <ip> <port>

And then you should be able to send messages from server to client and vice versa.
It should look something like this (server on the left, client on the right)
image

If you fail to establish a connection the problem does not lie with the TeamSpeak server or the docker image.

1 Like

This is what it looks like for me
Server:
image
Client:

Guess this is not how it should be looking. Any advice?

Right.

The problem is somewhere in between. You need to make sure that any firewall - be it hard or software allows port 9987/UDP AND any router forwards the same port to the next server in the route - so a proxy, the server itself, a firewall, …
It is quite hard to guide you in the proper direction without knowing your network setup.

1 Like

Well it’s a Ubuntu server from Netcup with Plesk. I don’t know more about it myself. Deactivating the Firewall in plesk didn’t help. I don’t know what to try anymore either. Tried everything i found online over the past month. Also I think it’s really weird that it just stopped working without me doing or changing anything. At the time it happened, the TeamSpeak Server just restarted automatically (also don’t know why) and then nobody could connect anymore. I’m a bit desperate rn.

The Plesk firewall module seems to use iptables from what I found, while newer Ubuntu versions default to ufw. You could try to check if ufw is running with sudo ufw status. If it’s running you could disable it with sudo ufw disable or better allow the port incoming with sudo ufw allow 9987/udp.

If that doesn’t help I’d try to shoot a message to the Netcup support. I’m sure they can help you with finding out why you can not establish a connection through that port.

1 Like

Update: This works now

image

Does this mean if you now start the TS docker container again it also works?

1 Like

Just tried it. Docker container doesn’t work. TS Server without Docker does work, but I’d prefer the container though

Does the container start (properly) and is the port set up for the container?

1 Like

Console log:

2023-11-05 19:11:48.604572|INFO    |ServerLibPriv |   |TeamSpeak 3 Server 3.13.7 (2022-06-20 12:21:53)
2023-11-05 19:11:48.604695|INFO    |ServerLibPriv |   |SystemInformation: Linux 5.15.0-88-generic #98-Ubuntu SMP Mon Oct 2 15:18:56 UTC 2023 x86_64 Binary: 64bit
2023-11-05 19:11:48.604729|INFO    |ServerLibPriv |   |Using hardware aes
2023-11-05 19:11:48.604958|INFO    |DatabaseQuery |   |dbPlugin name:    SQLite3 plugin, Version 3, (c)TeamSpeak Systems GmbH
2023-11-05 19:11:48.605006|INFO    |DatabaseQuery |   |dbPlugin version: 3.11.1
2023-11-05 19:11:48.605141|INFO    |DatabaseQuery |   |checking database integrity (may take a while)
2023-11-05 19:11:48.640664|WARNING |Accounting    |   |Unable to open licensekey.dat, falling back to limited functionality
2023-11-05 19:11:48.647222|INFO    |Accounting    |   |Licensing Information
2023-11-05 19:11:48.647279|INFO    |Accounting    |   |licensed to       : Anonymous
2023-11-05 19:11:48.647292|INFO    |Accounting    |   |type              : No License
2023-11-05 19:11:48.647312|INFO    |Accounting    |   |starting date     : Tue Feb  1 00:00:00 2022
2023-11-05 19:11:48.647328|INFO    |Accounting    |   |ending date       : Thu Jul  1 00:00:00 2027
2023-11-05 19:11:48.647342|INFO    |Accounting    |   |max virtualservers: 1
2023-11-05 19:11:48.647355|INFO    |Accounting    |   |max slots         : 32
2023-11-05 19:11:49.226801|INFO    |              |   |Puzzle precompute time: 562
2023-11-05 19:11:49.227352|INFO    |FileManager   |   |listening on 0.0.0.0:30033, [::]:30033
2023-11-05 19:11:49.228454|INFO    |Query         |   |Using a query thread pool size of 2
2023-11-05 19:11:49.293786|INFO    |Query         |   |listening for query on 0.0.0.0:10011, [::]:10011
2023-11-05 19:11:49.293879|INFO    |CIDRManager   |   |updated query_ip_allowlist ips: 127.0.0.1/32, ::1/128, 
2023-11-05 19:11:49.293437|INFO    |VirtualServerBase|1  |listening on 0.0.0.0:9987, [::]:9987

started with

docker run -p 9987:9987/udp -p 10011:10011 -p 30033:30033 -e TS3SERVER_LICENSE=accept teamspeak

Anything i missed?

This looks good. But sometimes Docker fails to bind to a port and simply does not redirect it.
You could check with docker container ls whether the port is actually going through.

1 Like

There’s your problem. The ports are published on the loopback IP 127.0.0.1. So the server will only accept connections from the server itself.
This should not happen with a normal docker configuration, and I have no idea why it ever would…
However, simply start the container like so:

docker run -p 0.0.0.0:9987:9987/udp -p 0.0.0.0:10011:10011 -p 0.0.0.0:30033:30033 -e TS3SERVER_LICENSE=accept teamspeak

Also, I’d recommend you look into docker compose. It is part of docker, though sometimes you need to manually install the compose plugin.
It makes managing containers a lot easier, especially as the config you use to start a container is saved to a file.
Your code would translate to the following compose file:

version: "3"

services:
  teamspeak:
    image: teamspeak:latest
    container_name: teamspeak
    environment:
      TS3SERVER_LICENSE: accept
    ports:
      - 0.0.0.0:9987:9987/udp
      - 0.0.0.0:10011:10011
      - 0.0.0.0:30033:30033
    volumes:  # also add this to store keep data on server restarts (replace the path before the ':')
      - /my/own/datadir:/var/ts3server/
2 Likes

I can manage the containers in Plesk too, I just used the commands for testing now. Thank you for your help, it works now! I don’t know either why this changed or how to change it back, but at least it does work again now. Thank you so much! Gonna leave you a tip on that website linked in your profile.

1 Like

No problem, I’m always glad to help!

That’s really not necessary, but much appreciated! :​)

1 Like