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

No servers responding with any information #112

Closed CamBitter closed 3 years ago

CamBitter commented 3 years ago

("Server did not respond with any information!") OSError: Server did not respond with any information! Just for a test, I've tried: server = MinecraftServer("mc.hypixel.net", 25565) server = MinecraftServer.lookup("mc.hypixel.net") server = MinecraftServer("mc.hypixel.net", 25565) server = MinecraftServer.lookup("mc.hypixel.net", 25565) I also tried that with the actual IP of the server : 172.65.230.166 as a string

Iapetus-11 commented 3 years ago

Just tested some of these on my PC using the latest version of mcstatus, and they worked fine. Perhaps you're using an outdated/unsupported version of Python, or an outdated version of mcstatus?

CamBitter commented 3 years ago

Can you show me the code you used? python --version returns 3.9.2 and pip show mcstatus returns 5.1.1

Iapetus-11 commented 3 years ago
python3 -V
Python 3.9.1

python3
Python 3.9.1 (default, Feb  6 2021, 06:49:13) 
[GCC 10.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from mcstatus import MinecraftServer
>>> MinecraftServer("mc.hypixel.net", 25565)
<mcstatus.server.MinecraftServer object at 0x7fb45e372df0>
>>> MinecraftServer("mc.hypixel.net", 25565).status()
<mcstatus.pinger.PingResponse object at 0x7fb45d8d74c0>
>>> MinecraftServer.lookup("mc.hypixel.net")
<mcstatus.server.MinecraftServer object at 0x7fb45e372df0>
>>> exit()

pip show mcstatus
Name: mcstatus
Version: 5.1.1
...
kevinkjt2000 commented 3 years ago

These all worked on my machine too. Tested with python 3.8.7 and 3.9.1. Make sure there is not a network firewall preventing you from connecting to these servers.

>>> from mcstatus import MinecraftServer
>>> ms = MinecraftServer("mc.hypixel.net", 25565)
>>> ms.status().raw
{'version': {'name': 'Requires MC 1.8 / 1.16', 'protocol': 47}, 'players': {'max': 200000, 'online': 123062, 'sample': []}, 'description': '             §aHypixel Network  §c[1.8-1.16]\n        §6§lSKYBLO
CK 0.11 §7- §5§lDWARVEN MINES', 'favicon': 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAAB
...
kevinkjt2000 commented 3 years ago

Closing due to lack of response. Seems like it was an issue related to networking and/or firewalls.

alexitx commented 2 years ago

I can confirm this issue when pinging only, not when fetching the status. It works fine on vanilla and fabric servers, as well as on Velocity proxies, but not on BungeeCord-based proxies and its forks.

The proxy reports:

16:20:34 [INFO] [/127.0.0.1:49208] <-> InitialHandler has pinged
16:20:34 [WARNING] [/127.0.0.1:49208] <-> InitialHandler - IllegalStateException: Not expecting PING

While mcstatus raises OSError: Server did not respond with any information!

It would be nice to just ping since it's less data and it's faster, unless the problem strictly comes from bungee. The same problem is reported in #92.

kevinkjt2000 commented 2 years ago

If BungeeCord needs an explicit implementation, let's discuss that in its own issue. #174