Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
danielbodart opened this issue Jan 26, 2024 · 1 comment

Comments

@danielbodart
Copy link

danielbodart commented Jan 26, 2024

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.

@theBeaz
Copy link

theBeaz commented Jan 1, 2025

This is still broken, btw. I just had to do the workaround mentioned above. The monitor command was broken on my fresh install:

Before workaround:
mc@testmc:~$ ./mcbserver m
[ OK ] Monitoring mcbserver: Checking session: OK
[ FAIL ] Monitoring mcbserver: Querying port: gsquery: 127.0.0.1:19132 : 60/5: FAIL

After workaround:
mc@testmc:~$ ./mcbserver m
[ OK ] Monitoring mcbserver: Checking session: OK

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🆕 New Issues
2 participants