Closed Gu-f closed 2 years ago
Query can be enabled/disabled by servers. The server you're trying to use it on most likely has query disabled, hence why it times out.
Is it the enable-query in the server.properties file? I set enable-query to true, but it still timed out. Besides enable-query, it also has query.port, query. port and server-port are the same. They are both 25565. Is this normal?
It is in the server.properties file, and it is normal for it to be on the same port. I don't know why it's not working then. What server software and version are you running?
This server is running Paper version git-Paper-399 (MC: 1.17.1) (Implementing API version 1.17.1-R0.1-SNAPSHOT) (Git: d4318a6 on ver/1.17.1)
And
This server is running LoliServer version 1.16.5-a3891ce (MC: 1.16.5) (Implementing API version 1.16.5-R0.1-SNAPSHOT, Forge version 36.2.19)
Neither of them works.
Thanks a lot. After many attempts, I solved the problem. It is because the firewall does not allow UDP protocol communication. I only turn on TCP protocol......... server.query() works normally under the following conditions: firewall - (UDP -25565 and TCP -25565) -accept server.properties - (enable-query:=true and query.port=25565)
Thanks a lot.
Glad you figured it out! Apologies that the documentation still isn’t better yet for this.
This is pinned in issue #164 and mentioned in #136
plaease list it in README, thanks
@kevinkjt2000
plaease list it in README, thanks
The need to enable query is mentioned.
But with custom firewall configurations, it's up to the user to know when their firewall is blocking their traffic.
I suppose we could add a note of it, but that's like asking every program that makes connections anywhere, to add a notice like this. You should probably know that if you want to make connections to some non-standard ports and protocols which your firewall isn't allowing that you may need to enable it. Though I did see more issues like these where firewall was the cause, so it may be worth it, but it still feels a bit weird, I mean it's fairly obvious that to you need to allow your firewall to make the connection to get a response.
This is a closed issue. #136 is tracking the documentation overhaul that will include this.
server.ping() and server.status() normal working but server.query() timed out.
python3.6 os: centos 7