Unity-Technologies/qstat

Unable to query Terraria servers

Xylemon opened this issue · 8 comments

I am unable to properly query Terraria servers. If I do "qstat -terraria serveriphere" with my servers for instance, I can see my qstat client attempting interacting with the server, but qstat just spits out "no response". Did support break with the latest major update?

Here is what happens with my server:

qstat -terraria servers.bloodbathsoftworks.com:7777 -d -d -d -d
debug(4) 07:53:30 qstat.c:4164 add_qserver() - servers.bloodbathsoftworks.com:7777, terraria, (null), (null)
debug(1) 07:53:30 hcache.c:365 hcache_lookup_hostname() - looking up servers.bloodbathsoftworks.com
debug(2) 07:53:30 hcache.c:375 hcache_lookup_hostname() - validating servers.bloodbathsoftworks.com
debug(2) 07:53:30 hcache.c:380 hcache_lookup_hostname() - returning 4403fb8c
ADDRESS           PLAYERS      MAP   RESPONSE TIME    NAME
debug(1) 07:53:30 qstat.c:4860 bind_qserver2() - start 0xbb9b10 @ 68.3.251.140:7777
debug(2) 07:53:30 qstat.c:4958 bind_qserver2() - connect:68.3.251.140:7777 - in progress
debug(2) 07:53:30 qstat.c:5095 bind_sockets() - calling status_query_func for 0xbb9b10 - in progress
debug(2) 07:53:30 qserver.c:142 send_packet() - [TERRARIA] send
TO servers.bloodbathsoftworks.com:7777 len 35
    0: 47455420 2f76322f 73657276 65722f73  GET /v2/ server/s
   16: 74617475 73204854 54502f31 2e310d0a  tatus HT TP/1.1..
   32: 0d0a00                               ...

debug(3) 07:53:30 qstat.c:5128 process_func_ret() - 0xbb9b10, 0
debug(3) 07:53:30 qstat.c:5164 send_packets() - processing...
debug(2) 07:53:30 qstat.c:3130 do_work() - connected: 1
debug(2) 07:53:30 qstat.c:6246 qserver_get_timeout() - timeout for 0xbb9b10 is diff1 1000 diff2 65535
debug(2) 07:53:31 qstat.c:3153 do_work() - rc 0
debug(2) 07:53:31 qstat.c:3216 do_work() - fill: 0 < 40
debug(3) 07:53:31 qstat.c:5164 send_packets() - processing...
debug(2) 07:53:31 qstat.c:5207 send_packets() - server 0xbb9b10, name (null), retry1 2, next_rule (nil), next_player_info 65535, num_players 0, n_retries 3
debug(2) 07:53:31 qstat.c:6246 qserver_get_timeout() - timeout for 0xbb9b10 is diff1 0 diff2 65535
debug(2) 07:53:31 qstat.c:5283 send_packets() - no queries sent: 1000 2000
debug(3) 07:53:31 qstat.c:5300 send_packets() - done
debug(2) 07:53:31 qstat.c:3293 do_work() - connected: 1
debug(2) 07:53:31 qstat.c:6246 qserver_get_timeout() - timeout for 0xbb9b10 is diff1 500 diff2 65535
debug(2) 07:53:31 qstat.c:3153 do_work() - rc 0
debug(2) 07:53:31 qstat.c:3216 do_work() - fill: 0 < 40
debug(3) 07:53:31 qstat.c:5164 send_packets() - processing...
debug(2) 07:53:31 qstat.c:5207 send_packets() - server 0xbb9b10, name (null), retry1 1, next_rule (nil), next_player_info 65535, num_players 0, n_retries 3
debug(2) 07:53:31 qstat.c:6246 qserver_get_timeout() - timeout for 0xbb9b10 is diff1 -1 diff2 65535
debug(2) 07:53:31 qstat.c:5283 send_packets() - no queries sent: 1501 2000
debug(3) 07:53:31 qstat.c:5300 send_packets() - done
debug(2) 07:53:31 qstat.c:3293 do_work() - connected: 1
debug(2) 07:53:31 qstat.c:6246 qserver_get_timeout() - timeout for 0xbb9b10 is diff1 499 diff2 65535
debug(2) 07:53:32 qstat.c:3153 do_work() - rc 0
debug(2) 07:53:32 qstat.c:3216 do_work() - fill: 0 < 40
debug(3) 07:53:32 qstat.c:5164 send_packets() - processing...
debug(2) 07:53:32 qstat.c:5207 send_packets() - server 0xbb9b10, name (null), retry1 0, next_rule (nil), next_player_info 65535, num_players 0, n_retries 3
debug(3) 07:53:32 qstat.c:6144 cleanup_qserver() - cleanup_qserver 0xbb9b10, 1
debug(3) 07:53:32 qstat.c:6147 cleanup_qserver() - server has no name, forcing close
debug(3) 07:53:32 qstat.c:6170 cleanup_qserver() - close_it 1
servers.bloodbathsoftworks.com:7777 no response
debug(3) 07:53:32 qstat.c:5300 send_packets() - done
debug(2) 07:53:32 qstat.c:3293 do_work() - connected: 0

Mine is password protected, so just in case that was a factor I tried another server that works and is public:

qstat -terraria t.jteeria.net:7777 -d -d -d -d
debug(4) 07:59:04 qstat.c:4164 add_qserver() - t.jteeria.net:7777, terraria, (null), (null)
debug(1) 07:59:04 hcache.c:365 hcache_lookup_hostname() - looking up t.jteeria.net
debug(2) 07:59:04 hcache.c:375 hcache_lookup_hostname() - validating t.jteeria.net
debug(2) 07:59:04 hcache.c:380 hcache_lookup_hostname() - returning 4a5b7fb2
ADDRESS           PLAYERS      MAP   RESPONSE TIME    NAME
debug(1) 07:59:04 qstat.c:4860 bind_qserver2() - start 0x22a7b10 @ 74.91.127.178:7777
debug(2) 07:59:04 qstat.c:4958 bind_qserver2() - connect:74.91.127.178:7777 - in progress
debug(2) 07:59:04 qstat.c:5095 bind_sockets() - calling status_query_func for 0x22a7b10 - in progress
debug(2) 07:59:04 qserver.c:142 send_packet() - [TERRARIA] send
TO t.jteeria.net:7777 len 35
    0: 47455420 2f76322f 73657276 65722f73  GET /v2/ server/s
   16: 74617475 73204854 54502f31 2e310d0a  tatus HT TP/1.1..
   32: 0d0a00                               ...

debug(3) 07:59:04 qstat.c:5128 process_func_ret() - 0x22a7b10, 0
debug(3) 07:59:04 qstat.c:5164 send_packets() - processing...
debug(2) 07:59:04 qstat.c:3130 do_work() - connected: 1
debug(2) 07:59:04 qstat.c:6246 qserver_get_timeout() - timeout for 0x22a7b10 is diff1 1000 diff2 65535
debug(2) 07:59:05 qstat.c:3153 do_work() - rc 0
debug(2) 07:59:05 qstat.c:3216 do_work() - fill: 0 < 40
debug(3) 07:59:05 qstat.c:5164 send_packets() - processing...
debug(2) 07:59:05 qstat.c:5207 send_packets() - server 0x22a7b10, name (null), retry1 2, next_rule (nil), next_player_info 65535, num_players 0, n_retries 3
debug(2) 07:59:05 qstat.c:6246 qserver_get_timeout() - timeout for 0x22a7b10 is diff1 -1 diff2 65535
debug(2) 07:59:05 qstat.c:5283 send_packets() - no queries sent: 1001 2000
debug(3) 07:59:05 qstat.c:5300 send_packets() - done
debug(2) 07:59:05 qstat.c:3293 do_work() - connected: 1
debug(2) 07:59:05 qstat.c:6246 qserver_get_timeout() - timeout for 0x22a7b10 is diff1 499 diff2 65535
debug(2) 07:59:06 qstat.c:3153 do_work() - rc 0
debug(2) 07:59:06 qstat.c:3216 do_work() - fill: 0 < 40
debug(3) 07:59:06 qstat.c:5164 send_packets() - processing...
debug(2) 07:59:06 qstat.c:5207 send_packets() - server 0x22a7b10, name (null), retry1 1, next_rule (nil), next_player_info 65535, num_players 0, n_retries 3
debug(2) 07:59:06 qstat.c:6246 qserver_get_timeout() - timeout for 0x22a7b10 is diff1 0 diff2 65535
debug(2) 07:59:06 qstat.c:5283 send_packets() - no queries sent: 1500 2000
debug(3) 07:59:06 qstat.c:5300 send_packets() - done
debug(2) 07:59:06 qstat.c:3293 do_work() - connected: 1
debug(2) 07:59:06 qstat.c:6246 qserver_get_timeout() - timeout for 0x22a7b10 is diff1 499 diff2 65535
debug(2) 07:59:06 qstat.c:3153 do_work() - rc 0
debug(2) 07:59:06 qstat.c:3216 do_work() - fill: 0 < 40
debug(3) 07:59:06 qstat.c:5164 send_packets() - processing...
debug(2) 07:59:06 qstat.c:5207 send_packets() - server 0x22a7b10, name (null), retry1 0, next_rule (nil), next_player_info 65535, num_players 0, n_retries 3
debug(3) 07:59:06 qstat.c:6144 cleanup_qserver() - cleanup_qserver 0x22a7b10, 1
debug(3) 07:59:06 qstat.c:6147 cleanup_qserver() - server has no name, forcing close
debug(3) 07:59:06 qstat.c:6170 cleanup_qserver() - close_it 1
t.jteeria.net:7777 no response
debug(3) 07:59:06 qstat.c:5300 send_packets() - done
debug(2) 07:59:06 qstat.c:3293 do_work() - connected: 0

I suspect you have the wrong port.

7777 is the correct port.

Just a reminder qstat still can't crawl Terraria servers.

@Xylemon By and large the project seems to be dead right now. I am developing a replacement utility written in Go and will look into adding Terraria support later on.

Another reminder and debug log relating to this issue:

qstat -terraria t.teeria.eu:7777 -d -d -d -d
debug(4) 06:42:56 qstat.c:4164 add_qserver() - t.teeria.eu:7777, terraria, (null), (null)
debug(1) 06:42:56 hcache.c:365 hcache_lookup_hostname() - looking up t.teeria.eu
debug(2) 06:42:56 hcache.c:375 hcache_lookup_hostname() - validating t.teeria.eu
debug(2) 06:42:56 hcache.c:380 hcache_lookup_hostname() - returning 4a5b7fb2
ADDRESS           PLAYERS      MAP   RESPONSE TIME    NAME
debug(1) 06:42:56 qstat.c:4860 bind_qserver2() - start 0x20d4c30 @ 74.91.127.178:7777
debug(2) 06:42:56 qstat.c:4958 bind_qserver2() - connect:74.91.127.178:7777 - in progress
debug(2) 06:42:56 qstat.c:5095 bind_sockets() - calling status_query_func for 0x20d4c30 - in progress
debug(2) 06:42:56 qserver.c:142 send_packet() - [TERRARIA] send
TO t.teeria.eu:7777 len 35
    0: 47455420 2f76322f 73657276 65722f73  GET /v2/ server/s
   16: 74617475 73204854 54502f31 2e310d0a  tatus HT TP/1.1..
   32: 0d0a00                               ...

debug(3) 06:42:56 qstat.c:5128 process_func_ret() - 0x20d4c30, 0
debug(3) 06:42:56 qstat.c:5164 send_packets() - processing...
debug(2) 06:42:56 qstat.c:3130 do_work() - connected: 1
debug(2) 06:42:56 qstat.c:6246 qserver_get_timeout() - timeout for 0x20d4c30 is diff1 1000 diff2 65535
debug(2) 06:42:57 qstat.c:3153 do_work() - rc 0
debug(2) 06:42:57 qstat.c:3216 do_work() - fill: 0 < 40
debug(3) 06:42:57 qstat.c:5164 send_packets() - processing...
debug(2) 06:42:57 qstat.c:5207 send_packets() - server 0x20d4c30, name (null), retry1 2, next_rule (nil), next_player_info 65535, num_players 0, n_retries 3
debug(2) 06:42:57 qstat.c:6246 qserver_get_timeout() - timeout for 0x20d4c30 is diff1 -1 diff2 65535
debug(2) 06:42:57 qstat.c:5283 send_packets() - no queries sent: 1001 2000
debug(3) 06:42:57 qstat.c:5300 send_packets() - done
debug(2) 06:42:57 qstat.c:3293 do_work() - connected: 1
debug(2) 06:42:57 qstat.c:6246 qserver_get_timeout() - timeout for 0x20d4c30 is diff1 499 diff2 65535
debug(2) 06:42:57 qstat.c:3153 do_work() - rc 0
debug(2) 06:42:57 qstat.c:3216 do_work() - fill: 0 < 40
debug(3) 06:42:57 qstat.c:5164 send_packets() - processing...
debug(2) 06:42:57 qstat.c:5207 send_packets() - server 0x20d4c30, name (null), retry1 1, next_rule (nil), next_player_info 65535, num_players 0, n_retries 3
debug(2) 06:42:57 qstat.c:6246 qserver_get_timeout() - timeout for 0x20d4c30 is diff1 0 diff2 65535
debug(2) 06:42:57 qstat.c:5283 send_packets() - no queries sent: 1500 2000
debug(3) 06:42:57 qstat.c:5300 send_packets() - done
debug(2) 06:42:57 qstat.c:3293 do_work() - connected: 1
debug(2) 06:42:57 qstat.c:6246 qserver_get_timeout() - timeout for 0x20d4c30 is diff1 500 diff2 65535
debug(2) 06:42:58 qstat.c:3153 do_work() - rc 0
debug(2) 06:42:58 qstat.c:3216 do_work() - fill: 0 < 40
debug(3) 06:42:58 qstat.c:5164 send_packets() - processing...
debug(2) 06:42:58 qstat.c:5207 send_packets() - server 0x20d4c30, name (null), retry1 0, next_rule (nil), next_player_info 65535, num_players 0, n_retries 3
debug(3) 06:42:58 qstat.c:6144 cleanup_qserver() - cleanup_qserver 0x20d4c30, 1
debug(3) 06:42:58 qstat.c:6147 cleanup_qserver() - server has no name, forcing close
debug(3) 06:42:58 qstat.c:6170 cleanup_qserver() - close_it 1
t.teeria.eu:7777 no response
debug(3) 06:42:58 qstat.c:5300 send_packets() - done
debug(2) 06:42:58 qstat.c:3293 do_work() - connected: 0

It would be fantastic if this issue got investigated/solved.

Is your server running tshock, if not then it won't work as it was a new capability that was added to tshock.

@stevenh Ah, well that explains everything. Could the help documentation specify this? Like, "-terraria query Terraria server (TShock only)", otherwise there is no indication that this is a requirement unless you dig around in the source code.