McLive / api.minetools.eu

Issuetracker for the Minetools API.
2 stars 0 forks source link

Server ping works great but query doesn't #31

Closed Symii closed 5 months ago

Symii commented 3 years ago

Hello, I am trying to send query to my minecraft server to get online player names. Server ping works great https://api.minetools.eu/ping/51.83.139.155/25565 but query doesn't https://api.minetools.eu/query/51.83.139.155/25565 { "error": "timed out", "status": "ERR" }

Query is enabled in my bungee config: query_enabled: true Probably it is caused because my firewall protection is blocking it From what server IP address you are sending queries?

McLive commented 3 years ago

The request is sent from 144.76.87.187

Are you sure that the query port is also 25565? (udp)

Symii commented 3 years ago

Yes - query_port: 25565 and host: 51.83.139.155:25565 is set on 25565

I have added these IP addresses: 144.76.87.121 144.76.87.187 to my firewall exceptions but it still doesn't work

McLive commented 3 years ago

Weird..

At least I can see that the port is open:

Ncat: Connected to 51.83.139.155:25565.
Ncat: UDP packet sent successfully
Ncat: 1 bytes sent, 0 bytes received in 2.01 seconds.

I'll need to look into whats happening in the code. Which bungee version are you using?

McLive commented 3 years ago

The backend can't read packets from the connection. Looks like your bungeecord doesn't answer or your firewall is still blocking it.

Symii commented 3 years ago

What is the IP address where packets are coming from?

McLive commented 3 years ago

The query is sent from 144.76.87.187

SoraCent commented 3 years ago

Good day,

I got the Same problem since some Weeks.

The Query Worked before but now suddently not.

Queryport is set as 25555 and like I said before it worked but now it's saying { "error": "timed out", "status": "ERR" } I didn't changed anything in the Server Config so that couldn't be a problem that it doesn't work.

Hope someone can fix that.

Thanks

McLive commented 3 years ago

Please send me your IP-Address so I can check what's going on

SoraCent commented 3 years ago

Please send me your IP-Address so I can check what's going on

Yes it is 45.139.115.40 and Queryport is 25555

McLive commented 3 years ago

Please send me your IP-Address so I can check what's going on

Yes it is 45.139.115.40 and Queryport is 25555

Your server takes really long to respond. Actually, it's 5 seconds. The timeout on minetools however, is 3 seconds for UDP connections.

root@localhost:~# time nc -z -v -u 45.139.115.40 25555
45.139.115.40.mc-host24.de [45.139.115.40] 25555 (?) open

real    0m5.020s
user    0m0.001s
sys     0m0.001s
SoraCent commented 3 years ago

But thats not my Fault that It takes longer to respond and before it worked well

McLive commented 3 years ago

I can't do anything about that. Maybe you should contact your server host about that issue.