gamedig / node-gamedig

Query game servers and not only! Node.JS/Deno/Bun or Bash (via the CLI).
https://www.npmjs.com/package/gamedig
MIT License
606 stars 146 forks source link

Drakan - UDP timeout #127

Closed alezab closed 3 years ago

alezab commented 5 years ago

It looks like it successfully queries all necessary information to show. It tries to pull something more after players section, but fails because UDP timeout and stops. Tested also on my server with default port and changing socket timeout doesn't fix the problem.

Master server link: http://333networks.com/s/drakan

gamedig --type drakan 193.93.90.104:38012 --debug
Q#0 Query is running with options: { socketTimeout: 2000,
  attemptTimeout: 10000,
  maxAttempts: 1,
  port: 38013,
  protocol: 'gamespy1',
  type: 'drakan',
  host: '193.93.90.104',
  debug: true }
Q#0 DNS Lookup: 193.93.90.104
Q#0 Raw IP Address: 193.93.90.104
Q#0 193.93.90.104:38013 UDP-->
Q#0 Buffer length: 6 bytes
5c 69 6e 66 6f 5c
\  i  n  f  o  \

193.93.90.104:38013 <--UDP
Buffer length: 174 bytes
5c 68 6f 73 74 6e 61 6d 65 5c 41 72 6f 6b 68 27 73 20 4c 61 69
\  h  o  s  t  n  a  m  e  \  A  r  o  k  h  '  s     L  a  i
72 20 77 77 77 2e 41 72 6f 6b 68 73 4c 61 69 72 2e 6e 65 74 5c
r     w  w  w  .  A  r  o  k  h  s  L  a  i  r  .  n  e  t  \
68 6f 73 74 70 6f 72 74 5c 33 38 30 31 32 5c 6d 61 70 6e 61 6d
h  o  s  t  p  o  r  t  \  3  8  0  1  2  \  m  a  p  n  a  m
65 5c 52 61 69 6e 6d 61 72 73 68 20 28 67 72 6f 75 6e 64 29 5c
e  \  R  a  i  n  m  a  r  s  h     (  g  r  o  u  n  d  )  \
67 61 6d 65 74 79 70 65 5c 47 72 6f 75 6e 64 20 4d 61 74 63 68
g  a  m  e  t  y  p  e  \  G  r  o  u  n  d     M  a  t  c  h
5c 6e 75 6d 70 6c 61 79 65 72 73 5c 30 5c 6d 61 78 70 6c 61 79
\  n  u  m  p  l  a  y  e  r  s  \  0  \  m  a  x  p  l  a  y
65 72 73 5c 38 5c 67 61 6d 65 6d 6f 64 65 5c 6f 70 65 6e 70 6c
e  r  s  \  8  \  g  a  m  e  m  o  d  e  \  o  p  e  n  p  l
61 79 69 6e 67 5c 71 75 65 72 79 69 64 5c 31 32 30 39 2e 31 5c
a  y  i  n  g  \  q  u  e  r  y  i  d  \  1  2  0  9  .  1  \
66 69 6e 61 6c 5c
f  i  n  a  l  \

Q#0 Registered RTT: 216ms
Q#0 Received part num=1 queryId=1209 final=true
Q#0 Received part #1 of 1
Q#0 Received all parts
Q#0 UDP send finished by callback
Q#0 193.93.90.104:38013 UDP-->
Q#0 Buffer length: 7 bytes
5c 72 75 6c 65 73 5c
\  r  u  l  e  s  \

193.93.90.104:38013 <--UDP
Buffer length: 134 bytes
5c 44 65 64 69 63 61 74 65 64 20 53 65 72 76 65 72 3f 5c 59 65
\  D  e  d  i  c  a  t  e  d     S  e  r  v  e  r  ?  \  Y  e
73 5c 4b 69 6c 6c 73 20 4c 69 6d 69 74 5c 32 30 5c 54 69 6d 65
s  \  K  i  l  l  s     L  i  m  i  t  \  2  0  \  T  i  m  e
20 4c 69 6d 69 74 5c 33 32 5c 4e 65 74 77 6f 72 6b 20 53 70 65
   L  i  m  i  t  \  3  2  \  N  e  t  w  o  r  k     S  p  e
65 64 5c 54 31 4c 41 4e 5c 4e 75 6d 20 54 65 61 6d 73 5c 30 5c
e  d  \  T  1  L  A  N  \  N  u  m     T  e  a  m  s  \  0  \
46 72 69 65 6e 64 6c 79 20 46 69 72 65 3f 5c 4e 4f 5c 70 61 73
F  r  i  e  n  d  l  y     F  i  r  e  ?  \  N  O  \  p  a  s
73 77 6f 72 64 5c 30 5c 71 75 65 72 79 69 64 5c 31 32 31 30 2e
s  w  o  r  d  \  0  \  q  u  e  r  y  i  d  \  1  2  1  0  .
31 5c 66 69 6e 61 6c 5c
1  \  f  i  n  a  l  \

Q#0 Registered RTT: 215ms
Q#0 Received part num=1 queryId=1210 final=true
Q#0 Received part #1 of 1
Q#0 Received all parts
Q#0 UDP send finished by callback
Q#0 193.93.90.104:38013 UDP-->
Q#0 Buffer length: 9 bytes
5c 70 6c 61 79 65 72 73 5c
\  p  l  a  y  e  r  s  \

Q#0 UDP timeout detected
Q#0 Query failed with error Error: UDP - Timed out after 2000ms
    at Timeout.setTimeout (C:\Users\Aleksander\AppData\Roaming\npm\node_modules\gamedig\lib\Promises.js:7:25)
    at ontimeout (timers.js:498:11)
    at tryOnTimeout (timers.js:323:5)
    at Timer.listOnTimeout (timers.js:290:5)
Q#1 Query is running with options: { socketTimeout: 2000,
  attemptTimeout: 10000,
  maxAttempts: 1,
  port: 38012,
  protocol: 'gamespy1',
  type: 'drakan',
  host: '193.93.90.104',
  debug: true }
Q#1 DNS Lookup: 193.93.90.104
Q#1 Raw IP Address: 193.93.90.104
Q#1 193.93.90.104:38012 UDP-->
Q#1 Buffer length: 6 bytes
5c 69 6e 66 6f 5c
\  i  n  f  o  \

Q#1 UDP timeout detected
Q#1 Query failed with error Error: UDP - Timed out after 2000ms
    at Timeout.setTimeout (C:\Users\Aleksander\AppData\Roaming\npm\node_modules\gamedig\lib\Promises.js:7:25)
    at ontimeout (timers.js:498:11)
    at tryOnTimeout (timers.js:323:5)
    at Timer.listOnTimeout (timers.js:290:5)
Error: Failed all 2 attempts
    at QueryRunner.run (C:\Users\Aleksander\AppData\Roaming\npm\node_modules\gamedig\lib\QueryRunner.js:88:21)
    at <anonymous>
Attempt #1 - Port=38013 Retry=0:
Error: UDP - Timed out after 2000ms
    at Timeout.setTimeout (C:\Users\Aleksander\AppData\Roaming\npm\node_modules\gamedig\lib\Promises.js:7:25)
    at ontimeout (timers.js:498:11)
    at tryOnTimeout (timers.js:323:5)
    at Timer.listOnTimeout (timers.js:290:5)
Attempt #2 - Port=38012 Retry=0:
Error: UDP - Timed out after 2000ms
    at Timeout.setTimeout (C:\Users\Aleksander\AppData\Roaming\npm\node_modules\gamedig\lib\Promises.js:7:25)
    at ontimeout (timers.js:498:11)
    at tryOnTimeout (timers.js:323:5)
    at Timer.listOnTimeout (timers.js:290:5)
passivedragon commented 4 years ago

Has this been fixed in any way? I'm experiencing a similar issue, thought with conanexiles. I've tried with multiple IPs and servers as listed on battlemetrics. All of them show me:

Q#0 UDP timeout detected
Q#0 Query failed with error Error: UDP - Timed out

Overwolf_BlN7MBqOKJ

Is that a setup issue on my end?

passivedragon commented 4 years ago

This is likely a new issue, but considering the UDP error I found nowhere else, it might still be related. I have no idea.

mmorrisontx commented 3 years ago

Seems there are no servers online to test with anymore :(. We've made several fixes to the gamespy1 protocol since this issue was created, so it may have already been fixed. If anyone experiences this issue in the future, please create a new issue.