Comments (7)
I am getting this same problem with a Valheim server I am running on linux.
from python-a2s.
if u do ping localhost command or server ip => you will get 64 bytes from localhost icmp_seq=1 ttl=46 time=162 ms (DUP!)
the (DUP!)* Duplicate and Damaged Packets
so ... after this ping command u not receive other error
so for fix this error u need to add exception => every timeout error do : ping 5 times or 8 times on target address
from python-a2s.
Yeah same here. Here is output of my test script on 189.1.168.21:26921
:
$ py test.py
sent: b'TSource Engine Query\x00'
Received single packet: b'A\xdcm\x05N'
sent: b'TSource Engine Query\x00\xdcm\x05N'
Received single packet: b'I\x11deadheim\x00deadheim\x00valheim\x00\x00\x00\x00\x052\x00dl\x01\x001.0.0.0\x00\xb1(i\x05D\xb6{\xf7H@\x010.203.11-MagicOverhaul1.5.2\x00*\xa0\r\x00\x00\x00\x00\x00'
sent: b'U\x00\x00\x00\x00'
Received single packet: b'A\xdcm\x05N'
sent: b'U\xdcm\x05N'
Received single packet: b'D\x05\x00\x00\x00\x00\x00\x00\xd5\xdf\xc2E\x00\x00\x00\x00\x00\x00\xa1B\x9eE\x00\x00\x00\x00\x00\x00\xc6\xec(E\x00\x00\x00\x00\x00\x00\xaa\x1e E\x00\x00\x00\x00\x00\x00\xd9\x0cmD'
sent: b'V\x00\x00\x00\x00'
Received single packet: b'A\xdcm\x05N'
sent: b'V\xdcm\x05N'
Traceback (most recent call last):
File "test.py", line 29, in <module>
data = asyncio.get_event_loop().run_until_complete(a2s.arules(address))
File "c:\users\oleg\appdata\local\programs\python\python38\lib\asyncio\base_events.py", line 608, in run_until_complete
return future.result()
File "D:\Projects\Current\ARK Server monitor\lib\site-packages\a2s\rules.py", line 18, in arules
return await request_async(address, timeout, encoding, RulesProtocol)
File "D:\Projects\Current\ARK Server monitor\lib\site-packages\a2s\a2s_async.py", line 22, in request_async
response = await request_async_impl(conn, encoding, a2s_proto)
File "D:\Projects\Current\ARK Server monitor\lib\site-packages\a2s\a2s_async.py", line 43, in request_async_impl
return await request_async_impl(
File "D:\Projects\Current\ARK Server monitor\lib\site-packages\a2s\a2s_async.py", line 28, in request_async_impl
resp_data = await conn.request(a2s_proto.serialize_request(challenge))
File "D:\Projects\Current\ARK Server monitor\lib\site-packages\a2s\a2s_async.py", line 137, in request
return await self.recv()
File "D:\Projects\Current\ARK Server monitor\lib\site-packages\a2s\a2s_async.py", line 130, in recv
raise asyncio.TimeoutError()
asyncio.exceptions.TimeoutError
It seems like valheim isn't responding to rules request (see https://developer.valvesoftware.com/wiki/Server_queries#A2S_RULES). Sadly there is nothing library can do with such case.
from python-a2s.
@Nereg Thanks for being so quick to help others!
If the server is not responding to the request there's nothing I can do about it. If the game has a player list somewhere in the server browser I might be able to help you to reverse engineer that, but that's out of scope for this particular library.
from python-a2s.
Well, now I tried to get this working but get similar problem - only that it's showing with a2s.info too:
>>> import a2s
>>> a = ("localhost", 2457)
>>> i = a2s.info(a)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.9/dist-packages/a2s/info.py", line 182, in info
return request_sync(address, timeout, encoding, InfoProtocol)
File "/usr/local/lib/python3.9/dist-packages/a2s/a2s_sync.py", line 22, in request_sync
response = request_sync_impl(conn, encoding, a2s_proto)
File "/usr/local/lib/python3.9/dist-packages/a2s/a2s_sync.py", line 28, in request_sync_impl
resp_data = conn.request(a2s_proto.serialize_request(challenge))
File "/usr/local/lib/python3.9/dist-packages/a2s/a2s_sync.py", line 92, in request
return self.recv()
File "/usr/local/lib/python3.9/dist-packages/a2s/a2s_sync.py", line 67, in recv
packet = self._socket.recv(65535)
socket.timeout: timed out
from python-a2s.
Can you get player list/server info from LAN
tab in Steam server browser? If not then library can't help because it implements protocol which is used in the browser.
from python-a2s.
It works just fine for me. Now.
Not sure why it started to work but maybe it is how the server is started or perhaps it needs a while before responding. I have to dig som more to get to know the workings of the Valheim server I run. But it does work now.
from python-a2s.
Related Issues (20)
- Settings being returned are encrypted HOT 9
- a2s.players name doesn't work for "7 Days to Die" HOT 4
- Is it possible to query every server ? HOT 1
- Question HOT 3
- How do i get an output?
- A2S_RULES not decoding correctly ? HOT 13
- [Question] Multiple Query HOT 1
- Is it possible to to see if player is on CT or T Side? HOT 1
- Rust server returning random player names instead of actual player names when using a2s.players HOT 3
- S2C_CHALLENGE support? HOT 3
- implementing player steamid's if connected using steam HOT 1
- Strange a2s.exceptions.BufferExhaustedError HOT 3
- Proposal: add A2S_PING for query server HOT 1
- Rust server names HOT 2
- query is inaccurate HOT 1
- suggestion HOT 1
- Class attribute docstrings show wrong values. HOT 3
- player_count HOT 2
- Request: Get MvM Mission and wave progress HOT 2
- Which ports need to be unblocked, for a2s to work? HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-a2s.