Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Receving Failed to query: 'timed out' #6

Open
stevarino opened this issue Mar 5, 2022 · 1 comment
Open

Receving Failed to query: 'timed out' #6

stevarino opened this issue Mar 5, 2022 · 1 comment

Comments

@stevarino
Copy link

Just trying this out on my world (Dedicated 1.18.12.01 - current release at this time) and receiving timed out errors. Tried both domain name and localhost:

>>> with mcquery('localhost', timeout=20) as data:
...   print(data)
...
DEBUG:mcquery.query:Connecting to localhost:19132...
DEBUG:mcquery.query:Sending handshake...

DEBUG:mcquery.query:Closing connection...
Traceback (most recent call last):
  File "/mnt/mbe-backup/env/lib/python3.8/site-packages/mcquery/query.py", line 95, in mcquery
    token = soc.recv(65535)[5:-1].decode()
socket.timeout: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.8/contextlib.py", line 113, in __enter__
    return next(self.gen)
  File "/mnt/mbe-backup/env/lib/python3.8/site-packages/mcquery/query.py", line 116, in mcquery
    raise QueryNetworkError(f"Failed to query: '{msg}'")
mcquery.query.QueryNetworkError: Failed to query: 'timed out'

Let me know if you need any further info, happy to share world info privately if it helps debug (or contribute myself if you have any pointers, looking over socket docs nothing stands out to me).

@w-gao
Copy link
Owner

w-gao commented Mar 5, 2022

Hi @stevarino, thank you for your report.

Just to make sure, Dedicated 1.18.12.01 is the official Bedrock server, correct? In that case, mcquery won't work. Please refer to w-gao/py-mcpe-stats#7 (comment) for more details, but essentially this tool uses a protocol that is not supported by all server software.

There is also mcstats, which should work as long as the server is running (but fetches less information), so feel free to try that out.

In the meantime, I ought to update the README to mention this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants