TheHolyWaffle / TeamSpeak-3-Java-API

A Java wrapper of TeamSpeak's 3 server query API.
MIT License
307 stars 107 forks source link

Connection closed by the server #393

Open tue-Jonas opened 3 years ago

tue-Jonas commented 3 years ago

I have no idea how to fix this error: Screenshot_1

[[TeamSpeak-3-Java-API] StreamReader] ERROR com.github.theholywaffle.teamspeak3.StreamReader - Connection closed by the server. [pool-1-thread-1] ERROR com.github.theholywaffle.teamspeak3.api.reconnect.DisconnectingConnectionHandler - [Connection] Disconnected from TS3 server Exception in thread "main" com.github.theholywaffle.teamspeak3.api.exception.TS3QueryShutDownException: The query was shut down or disconnected. at com.github.theholywaffle.teamspeak3.api.CommandFuture.checkForFailure(CommandFuture.java:416) at com.github.theholywaffle.teamspeak3.api.CommandFuture.getUninterruptibly(CommandFuture.java:357) at com.github.theholywaffle.teamspeak3.TS3Api.selectVirtualServerByPort(TS3Api.java:3908) at teamspeak.Load.connect(Load.java:26) at Main.main(Main.java:24)

rogermb commented 3 years ago

Hi @akaJonas

It looks like you are able to connect to the TS3 server, but you're getting disconnected immediately after. Almost always, this is the case because people forget to whitelist / allow-list the IP of their query client on the TS3 server while using the UNLIMITED flood rate. To help diagnose this issue, you could try running the query with the default flood rate. If you don't get disconnected, not properly being whitelisted is what caused your issue. Please note that you may have to wait for the previous flood ban to expire before being able to connect again. To speed up this process, you could also restart your TS3 server.

Also, note that the whitelist / allow-list file is only read once when the TS3 server is started, so you have to restart the server for any changes to take effect.