Vultr.com - Instant Cloud Server Deployment
Game Rank
Servers:
Teams:
Fans:
45645
Players:
1015
PREV 1 2 NEXT
zerosanityPM
#1
Help adding server
May 03, 2012 10:01 AM
Joined: Feb 05, 2009
Posts: 9
I need help adding my server to GameTracker

The server is running

Bukkit #2149 1.2.5-R1.0 Recommended Build
(Bukkit is an official part of Mojang and Minecraft now)

I have also tried the stock minecraft server with gives the exact same error message

Whenever I try to add my server to GameTracker the server throws this error

Bukkit Error
------------------
08:22:03 [SEVERE] java.io.IOException: Bad packet id 81
08:22:03 [SEVERE] at net.minecraft.server.Packet.a(Packet.java:75)
08:22:03 [SEVERE] at net.minecraft.server.NetworkManager.h(NetworkManager.java:149)
08:22:03 [SEVERE] at net.minecraft.server.NetworkManager.c(NetworkManager.java:268)
08:22:03 [SEVERE] at net.minecraft.server.NetworkReaderThread.run(SourceFile:76)
08:22:03 [INFO] /208.167.225.13:46060 lost connection


Standard minecraft_server.jar error
--------------------------------------------
2012-05-03 09:16:43 [INFO] Query running on 64.85.162.148:25565
java.io.IOException: Bad packet id 81
at lx.a(SourceFile:149)
at qq.h(SourceFile:189)
at qq.c(SourceFile:9)
at zt.run(SourceFile:76)
2012-05-03 09:17:25 [INFO] /208.167.225.13:55150 lost connection


I thought maybe something was wrong with the server config
#Minecraft server properties
#Sun Mar 25 07:47:10 CDT 2012
allow-nether=true
level-name=world
enable-query=true
allow-flight=true
server-port=25565
query.port=25565
level-type=DEFAULT
enable-rcon=false
level-seed=-2911377767319133884
server-ip=64.85.162.148
max-build-height=256
spawn-npcs=true
white-list=false
debug=false
spawn-animals=true
online-mode=true
pvp=true
difficulty=1
server-name=JFH Minecraft Server
gamemode=0
max-players=20
spawn-monsters=true
generate-structures=true
view-distance=10
motd=JFH Minecraft Server

Everything is set correctly. I tried a different query port with no success. However the default and recomended port is UDP 25565 so I left it at that

Then I checked my firewall settings
Accept If protocol is TCP and destination port is 25565
Accept If protocol is UDP and destination port is 25565
the Minecraft query protocol uses UDP

So the firewall is working. Plus if it was not I would not have even seen the invalid packet id message.

I tried adding my server to another website that tracks servers. It worked without any issue!

I investigated this Packet ID 81 issue
On the minecraft developer wiki it does not list packet 81 as being a valid packet in a query
http://www.wiki.vg/Query
http://dinnerbone.com/blog/2011/10/14/minecraft-19-has-rcon-and-query/

Here is a post I could find with other people having the same issue
http://www.gametracker.com/forums/forum.php?site=1&post=277863
In both cases the server was added by an admin

Please tell me what I can do to get my server listed on GameTracker

Thanks
Last edited by: zerosanity May 03, 2012 10:20 AM
burnPM
#2
May 03, 2012 10:42 AM
GAMETRACKER ADMIN Joined: Sep 27, 2006
Posts: 10927
Hi,

I am not able to scan this server either. Do you run minequery / minecraftviewer? I would recommend removing any tracking plugins to avoid conflicts.

I would also recommend trying updating the query port to 25566, making the adjustments in the firewall also. Sometimes users can get it to work on one port but not the other.

You may also want to try disabling the firewall temporarily to rule out an issue with that. If it works without the firewall monitoring, it may be due to an issue with setting up your rules or you may need to refresh the rules. If you run a home router, if you host it from how, you may need to portforward in that also.
I am retired from GameTracker after 11 years and will not be responsive for support requests.

zerosanityPM
#3
May 03, 2012 10:47 AM
Joined: Feb 05, 2009
Posts: 9
burn wrote:
Hi,

I am not able to scan this server either. Do you run minequery / minecraftviewer? I would recommend removing any tracking plugins to avoid conflicts.

I would also recommend trying updating the query port to 25566, making the adjustments in the firewall also. Sometimes users can get it to work on one port but not the other.

You may also want to try disabling the firewall temporarily to rule out an issue with that. If it works without the firewall monitoring, it may be due to an issue with setting up your rules or you may need to refresh the rules. If you run a home router, if you host it from how, you may need to portforward in that also.


Thanks for the quick responce, our server was being attacked just now. The host just null routed the offending IP's and it is responding again. Please try again.

We do not run any minequery or minecraft viewer addon since query is built into minecraft now. Plus this issue happens with standard minecraft with no plugins or anything.

Also I do not think it is a firewall issue since the server is getting packets from GameTracker. It's just getting the Wrong Packets.

I have tried port 25566 for the query and that does not work either.

Finally, I can query the server without any issues using other sources. So the server does accept and respond to querys properly.
burnPM
#4
May 03, 2012 11:19 AM
GAMETRACKER ADMIN Joined: Sep 27, 2006
Posts: 10927
Hi,

I am still unable to scan it on either minequery or gamespy4. I have also tried another minecraft tracker and it also could not get a response from your server. If you do not mind me asking, what are you doing to scan it that you are getting it to be successful? Do you have the source code? I can mention it to someone who can compare the GT scanner to it to see if there may be a way to improve the scanning here.
I am retired from GameTracker after 11 years and will not be responsive for support requests.

maulPM
#5
May 03, 2012 11:59 AM
GAMETRACKER ADMIN Joined: Oct 17, 2006
Posts: 984
Hello,

Which other sources are able to scan your server?

I have tried scanning UDP 64.85.162.148:25565 from several different IP addresses, and have not gotten a response. The TCP port 25565 appears to be listening properly for game traffic.

We are following the 7-byte handshake request defined in your query documentation: http://www.wiki.vg/Query

Best regards.
I do not provide support over PM. Please ask your questions on the GameTracker forums.
zerosanityPM
#6
May 03, 2012 12:01 PM
Joined: Feb 05, 2009
Posts: 9
This website works


this script works
-------------------------------------------
<?php
class MinecraftQuery
{
public static function query($address, $port = 25565, $timeout = 2)
{
$socket = @fsockopen($address, $port, $errno, $errstr, $timeout);

if (!$socket) return false;

fwrite($socket, chr(254));

$response = "";

while(!feof($socket)) $response .= fgets($socket, 1024);

$result = array();
$response = str_replace(chr(0),"",$response);
$response = substr($response, 2);
$query = preg_split("/[".chr(167)."]/", $response, -1, PREG_SPLIT_NO_EMPTY);

$result['hostname'] = trim($query[0]);
$result['players'] = (int) $query[1];
$result['maxplayers'] = (int) $query[2];
return $result;
}
}
print_r(MinecraftQuery::query("64.85.162.148"));
?>
----------------------------------------

And this is the result
----------------------------------------
Array
(
[hostname] => JFH Minecraft Server
[players] => 0
[maxplayers] => 20
)
Last edited by: zerosanity May 03, 2012 12:18 PM
maulPM
#7
May 03, 2012 12:25 PM
GAMETRACKER ADMIN Joined: Oct 17, 2006
Posts: 984
Hello,

I sent the command in your example to your server, and received the same data: "JFH Minecraft Server", "0", "20". This command is recognized over the TCP game traffic port, which differs from the way GT does Minecraft queries. I was not aware that 3rd party websites are using this command to obtain Minecraft server information.

I would recommend getting your server to recognize the UDP queries defined here: ( http://www.wiki.vg/Query ). These queries provide much more information than the method that you have posted. Using the "Add A Server" feature on this page ( http://www.gametracker.com/servers/ ) will test this type of query. For ease of testing, you may want to change your query port to 25566.

Let me know if you have any additional questions.
I do not provide support over PM. Please ask your questions on the GameTracker forums.
zerosanityPM
#8
May 03, 2012 12:29 PM
Joined: Feb 05, 2009
Posts: 9
maul wrote:
Hello,

I sent the command in your example to your server, and received the same data: "JFH Minecraft Server", "0", "20". This command is recognized over the TCP game traffic port, which differs from the way GT does Minecraft queries. I was not aware that 3rd party websites are using this command to obtain Minecraft server information.

I would recommend getting your server to recognize the UDP queries defined here: ( http://www.wiki.vg/Query ). These queries provide much more information than the method that you have posted. Using the "Add A Server" feature on this page ( http://www.gametracker.com/servers/ ) will test this type of query. For ease of testing, you may want to change your query port to 25566.

Let me know if you have any additional questions.


Okay, that makes sence, I'll look into it further to see if I can get a UDP query to work. Thanks
zerosanityPM
#9
May 03, 2012 1:08 PM
Joined: Feb 05, 2009
Posts: 9
Okay I rewrote the script to use the UDP handshake. The server responds as it should

Here is the script

<?php
$address = "64.85.162.148";
$port = "25565";
$socket = fsockopen("udp://".$address, $port, $errno, $errstr, 1);
if (!$socket) return false;
fwrite($socket, pack('c*', 0xFE, 0xFD, 0x09, 0x01, 0x02, 0x03, 0x04));
$reply = fread($socket, 16);
$challenge = pack('N', substr($reply, 5));
fwrite($socket, pack('c*', 0xFE, 0xFD, 0x00, 0x01, 0x02, 0x03, 0x04).$challenge.pack('c*', 0x01, 0x02, 0x03, 0x04));
$status = fread($socket, 2048);
$status = substr($status, 11);
$status = explode("\x00\x00\x01player_\x00\x00", $status);
$players = substr($status[1], 0, -2);
$status = explode("\x00", $status[0]);
echo nl2br(print_r($status,true));
$players = explode("\x00", $players);
echo nl2br(print_r($players,true));
?>

and here is the result

Array
(
[0] => um
[1] => €
[2] => hostname
[3] => JFH Minecraft Server
[4] => gametype
[5] => SMP
[6] => game_id
[7] => MINECRAFT
[8] => version
[9] => 1.2.5
[10] => plugins
[11] => CraftBukkit on Bukkit 1.2.5-R1.0: WorldBorder 1.5.4; Orebfuscator 1.4.3; NoCheatPlus 3.5.8; WorldEdit 5.3; iConomy 7.0; CommandBook 2.1; creaturebox 1.0; neoPaintingSwitch 1.31; Vault 1.2.15-b172; PermissionsEx 1.19.1; LWC 4.1.1 (b645-git-b24cc99e); WorldGuard 5.5.2; Jobs 2.7.4; ChatManager 1.19; ChestShop 3.4; Modifyworld 1.19
[12] => map
[13] => world
[14] => numplayers
[15] => 1
[16] => maxplayers
[17] => 20
[18] => hostport
[19] => 25565
[20] => hostip
[21] => 64.85.162.148
)
Array
(
[0] => halla_ja
)


This script was tested on a seperate server just to make sure I was not bypassing the firewall.
maulPM
#10
May 03, 2012 1:24 PM
GAMETRACKER ADMIN Joined: Oct 17, 2006
Posts: 984
Hello again,

The data that you have posted is correct. Unfortunately, I am still unable to query your server. Is there a chance that either you or your server provider is blocking GameTracker IP's? You will receive incoming requests from 108.61.78.* for GameTracker.
I do not provide support over PM. Please ask your questions on the GameTracker forums.
PREV 1 2 NEXT