Multivit4min / TS3-NodeJS-Library

TeamSpeak 3 Server Query Library supports SSH and RAW Query

Home Page:https://multivit4min.github.io/TS3-NodeJS-Library/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Socket Timeout reached

TigerGamer134 opened this issue · comments

Describe the bug
When connecting on the same machine as the TS server, I get a "Error: Socket Timeout reached" issue, but when I try to run it on another machine such as my localhost or another VPS it works just fine.

To Reproduce
Just try connecting on the same machine as a TS Server

Expected behavior
N/A

Versions used

  • TS Server Version - 3.13.6 on Linux
  • NodeJS Version - 17
  • Library Version - 3.4.1

Additional context
N/A

Can you test that you can connect with a telnet / ssh client to your teamspeak server directly?
I dont see a reason why it should work on one server but not on another.
Other issues could be that the TeamSpeak Server has banned the Query IP (which i am not 100% sure if this does not matter when connecting through localhost)

@Multivit4min Would you like for me to try telnet on another machine or the localhost machine? I have also checked the banned IPs and allowed IPs which it is not on the banned.

test the connection from the machine which does not work with the connection informations you use to connect to your teamspeak server in your node project

I will try this. And could it be something with the fact that I use pterodactyl?

So I just tried on the same machine that the ts server is running on and I got a connection refused.
image

seems like you are using wrong connection informations, the default telnet port is 10011

Yeah, I changed my query port to 50112 which I then changed my telnet command to after I sent that as I realized, which still gave me the same result. And that query port 50112 works fine for the bot when it's not on the same machine

Nevermind my last, it did let me connect.

so is the issue resolved?

so is the issue resolved?

No. I was able to connect to the server via telnet like you asked if I was able too. Still cannot connect with the bot itself on the same machine.

but you are using the same queryport? and you are using localhost or 127.0.0.1 to connect from your node application?
do you have a bind ip set for your teamspeak server in a config.ini?

I am using the same connection information that I use when testing on my computer. I tried using both localhost & 127.0.0.1 on the machine, which still didn't work. I am currently using the main servers IP which still doesn't work. (That is what I use on my computer. the machines IP)

Sorry but i absolutely dont know why it should work on one machine to connect via localhost to the teamspeak server but not on another, is there any special setup?

I myself always connect via localhost to my TeamSpeak Server and never run into that issue
Double check your Query Port, validate that you dont have any bind ip set to your teamspeak server which might interfer.

If running on linux you can check with netstat -tulpn on what port and ip the teamspeak server is bound

Would it matter that it's in a "docker proxy"? As it said LISTEN docker/proxy something and the. The Ip and Port accordingly

The exact things I found from running that command are as follow:

udp        0      0 REDACTED:50112      0.0.0.0:*                           13823/docker-proxy
tcp        0      0 REDACTED:50112      0.0.0.0:*               LISTEN      13809/docker-proxy

And the teamspeak server says this when starting up:

2022-03-14 20:31:35.666935|INFO    |Query         |   |listening for query on 0.0.0.0:50112, [::]:50112
2022-03-14 20:31:35.667415|INFO    |Query         |   |listening for ssh query on 0.0.0.0:10022, [::]:10022
2022-03-14 20:31:35.667645|INFO    |Query         |   |listening for http query on 0.0.0.0:10080, [::]:10080

sorry but i have never used docker,
but when you say you can reach from the machine where your nodejs project runs the teamspeak server via the telnet cli then something must be specifically wrong with the teamspeak library which i cant reproduce without a docker setup

I have resolved this. I wasn't using the appropriate "docker IP" to connect from one docker container to another.