py-mine / mcstatus

A Python library for checking the status of Minecraft servers
https://mcstatus.readthedocs.io
Apache License 2.0
478 stars 37 forks source link

Can't get response from a server #145

Closed py-mine-bot closed 2 years ago

py-mine-bot commented 2 years ago

MeRuslan Authored by MeRuslan Closed

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.

py-mine-bot commented 2 years ago

CoolCat467 Authored by CoolCat467


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.

py-mine-bot commented 2 years ago

MeRuslan Authored by MeRuslan


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

py-mine-bot commented 2 years ago

Iapetus-11 Authored by Iapetus-11


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.

py-mine-bot commented 2 years ago

MeRuslan Authored by MeRuslan


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.

py-mine-bot commented 2 years ago

kevinkjt2000 Authored by kevinkjt2000


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.

py-mine-bot commented 2 years ago

MeRuslan Authored by MeRuslan


@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.

py-mine-bot commented 2 years ago

MeRuslan Authored by MeRuslan


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.

py-mine-bot commented 2 years ago

MeRuslan Authored by MeRuslan


Done

py-mine-bot commented 2 years ago

kevinkjt2000 Authored by kevinkjt2000


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.

py-mine-bot commented 2 years ago

MeRuslan Authored by MeRuslan


It is alternative bedrock server. Come on, guys.

py-mine-bot commented 2 years ago

MeRuslan Authored by MeRuslan


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.

py-mine-bot commented 2 years ago

kevinkjt2000 Authored by kevinkjt2000


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!

py-mine-bot commented 2 years ago

MeRuslan Authored by MeRuslan


Thanks, understandable.

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