Dinnerbone / mcstatus

A Python class for checking the status of an enabled Minecraft server
http://dinnerbone.com/minecraft/tools/status/
1.11k stars 146 forks source link

Can't get response from a server #145

Closed MeRuslan closed 3 years ago

MeRuslan commented 3 years ago

Server: mermine.ru:19132 It is a PE server, but does answer regular query requests: https://mcsrvstat.us/server/mermine.ru:19132 (with "Bedrock server?" checkbox off).

It does work with MinecraftBedrockServer, but does not with MinecraftServer, which is a bug/problem. What's up with this one?

PS 1: It's a very recent version (v1.17.0) which uses a new protocol version - 440.

PS 2: bedrock and regular queries return different answers.

CoolCat467 commented 3 years ago

Pocket edition is another way to say bedrock edition. Of course it doesn't work with MinecraftServer, because that class uses the Java Edition protocol. MinecraftBedrockServer is the only one that's going to work properly for a pocket edition server. This is not a bug.

MeRuslan commented 3 years ago

Pocket edition is another way to say bedrock edition. Of course it doesn't work with MinecraftServer, because that class uses the Java Edition protocol. MinecraftBedrockServer is the only one that's going to work properly for a pocket edition server. This is not a bug.

I'm afraid you didn't quite get it.

Yes, it's bedrock, but it does answer java edition queries as well, in fact, most pe servers do.

I didn't research if the new protocol introduced breaking changed or not, but I believe it may be the cause

Iapetus-11 commented 3 years ago

most pe servers do

No, BE servers created with NukkitX or Pocketmine do, the vanilla server software for Bedrock Edition does not. Also, Pocket Edition is discontinued and the proper name for Minecraft on phones and consoles is Bedrock Edition.

In addition, it would help if we can see your code to see exactly what you tested. It could be that it works with a method you're not trying as Java Edition has multiple ways of checking the status of a Minecraft server.

MeRuslan commented 3 years ago

It could be that it works with a method you're not trying as Java Edition has multiple ways of checking the status of a Minecraft server.

I did basically everything there's to try: status, ping, query. Will get back with code, if needed, a bit later.

kevinkjt2000 commented 3 years ago

Pocket Edition (PE) was eventually later renamed to Bedrock Edition (BE) according to https://wiki.vg/Pocket_Edition_Protocol_Documentation

Thus, it makes sense that only MinecraftBedrockServer is working when talking to a PE server.

MeRuslan commented 3 years ago

@kevinkjt2000 That would imply that this library is okay with not supporting querying PocketMine-MP servers.

I totally get where you are coming from, but using MinecraftBedrockServer can simply be a really bad option when you can full query a servers. That's because that way you'll never get a list of players/plugins, thus I want to continue the investigation.

MeRuslan commented 3 years ago

Okay, it turns out to be caused by a bug in a handshake request. Somehow all other clients worked nonetheless, but this PocketMine-MP servers does not.

Working on a PR.

MeRuslan commented 3 years ago

Done

kevinkjt2000 commented 3 years ago

PocketMine-MP is not the same as PE (Pocket Edition). Also it was stated specifically that "Yes, it's bedrock". This confused the rest of us.

Re-opening, since this seems to be an alternate implementation of vanilla and not bedrock.

MeRuslan commented 3 years ago

It is alternative bedrock server. Come on, guys.

MeRuslan commented 3 years ago

https://github.com/pmmp/PocketMine-MP Check the description.

I said it all correct, it is bedrock, but does support "regular" query requests as well.

kevinkjt2000 commented 3 years ago

My confusion stems from only caring about the communication protocols. When I hear someone say it's Bedrock, I immediately assume it only supports Bedrock stuff. This is the first I've heard of a server that supports both. Still a nice catch to find this though!

MeRuslan commented 3 years ago

Thanks, understandable.

It's completely the opposite for me :D I've never seen a public bedrock server that does not support it.