LinuxGSM icon indicating copy to clipboard operation
LinuxGSM copied to clipboard

[Bug]: Minecraft Bedrock Monitor defaults to invalid querytype with gamedig

Open danielbodart opened this issue 1 year ago • 0 comments

User story

As a admin I want the default setup for Minecraft Bedrock to not constrantly restart the server due to an invalid default config

Game

Minecraft Bedrock

Linux distro

Ubuntu 22.04

Command

command: monitor

Further information

The default config for Minecraft Bedrock (https://github.com/GameServerManagers/LinuxGSM/blob/master/lgsm/config-default/config-lgsm/mcbserver/_default.cfg#L128)

The querytype is set to "minecraftbe", this works for gsquery but is invalid for gamedig. For gamedig the correct valuye is "mbe"

What is worse is it does not appear to fallback to gsquery with querymode="2" (probably a different bug).

Work around is edit lgsm/config-lgsm/mcbserver/common.cfg and add the following to override the _default.cfg:

querymode="3"
querytype="mbe"

Relevant log output

# ./mcbserver query-raw

Gamedig Raw Output
=================================

gamedig --type "minecraftbe" "127.0.0.1:19132"|jq

{
  "error": "Invalid game: minecraftbe"
}
gamedig --type "minecraftbe" "172.23.0.4:19132"|jq

{
  "error": "Invalid game: minecraftbe"
}

# From the official Docker Images
mcbserver            | Jan 26 08:03:41.265 mcbserver: MONITOR: INFO: Querying port: gamedig: 127.0.0.1:19132 : 2 : QUERYING
mcbserver            | Jan 26 08:03:41.686 mcbserver: MONITOR: WARN: Querying port: gamedig: 127.0.0.1:19132 : 2 : FAIL

Steps to reproduce

Run the official docker image (example docker-compose.yaml)

version: '3.8'

volumes:
  minecraft_bedrock_data:

services:
  minecraft_bedrock:
    image: 'gameservermanagers/gameserver:mcb'
    container_name: mcbserver
    volumes:
      - 'minecraft_bedrock_data:/data'
    ports:
      - '19132:19132/udp'
    restart: unless-stopped

Then wait a few minutes for monitor to kick in (then either tail the logs or connect with a minecraft client and you will get kicked after a few minutes.

danielbodart avatar Jan 26 '24 09:01 danielbodart