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

Error querying the server PAUSE_IF_NO_PLAYERS #208

Open
wippy00 opened this issue Oct 15, 2024 · 1 comment
Open

Error querying the server PAUSE_IF_NO_PLAYERS #208

wippy00 opened this issue Oct 15, 2024 · 1 comment
Labels
help wanted Extra attention is needed

Comments

@wippy00
Copy link

wippy00 commented Oct 15, 2024

Compose file:

services:
  mc:
    image: itzg/minecraft-server:java8
    container_name: crash-landing
    restart: unless-stopped
    ports:
        - "25565:25565"
    environment:
        EULA: "true"
        VERSION: "1.6.4"
        TYPE: "CURSEFORGE"
        CF_SERVER_MOD: "/modpack/CrashLandingServer.zip"
        MOTD: "Crash landing chi legge"
        MAX_MEMORY: 4G
        
        ENABLE_RCON: "true"
        RCON_PASSWORD: "***"
        
        OVERRIDE_SERVER_PROPERTIES: "true"
    volumes:
        - ./data:/data
        - ./modpack:/modpack
  backups:
    image: itzg/mc-backup
    container_name: crash-landing-BK
    environment:
        DEBUG: TRUE
        RCON_HOST: "mc"
        RCON_PASSWORD: "***"
        
        BACKUP_INTERVAL: "2m"
        PAUSE_IF_NO_PLAYERS: "true"
        PLAYERS_ONLINE_CHECK_INTERVAL: "5m"
        PRE_BACKUP_SCRIPT: echo "Backup Started!"
        POST_BACKUP_SCRIPT: echo "Backup from server to mc-backup finished"
    volumes:
        # mount the same volume used by server, but read-only
        - ./data:/data:ro
        # use a host attached directory so that it in turn can be backed up
        # to external/cloud storage
        - ./mc-backups:/backups

Error log:

crash-landing-BK  | + true
crash-landing-BK  | + is_paused
crash-landing-BK  | + [[ -e /data/.paused ]]
crash-landing-BK  | ++ mc-monitor status --host mc --port 25565 --show-player-count
crash-landing     | 2024-10-15 09:43:42 [INFO] [STDERR] java.io.IOException: Bad packet id 99
crash-landing     | 2024-10-15 09:43:42 [INFO] [STDERR]         at net.minecraft.network.packet.Packet.func_73272_a(Packet.java:149)
crash-landing     | 2024-10-15 09:43:42 [INFO] [STDERR]         at net.minecraft.network.TcpConnection.func_74447_i(TcpConnection.java:325)
crash-landing     | 2024-10-15 09:43:42 [INFO] [STDERR]         at net.minecraft.network.TcpConnection.func_74450_c(TcpConnection.java:549)
crash-landing     | 2024-10-15 09:43:42 [INFO] [STDERR]         at net.minecraft.network.TcpReaderThread.run(SourceFile:94)
crash-landing-BK  | + PLAYERS_ONLINE='2024-10-15T09:43:42.744Z  DEBUG   mc-monitor/java_status.go:82    pinging
crash-landing-BK  | 2024-10-15T09:43:42.747Z    DEBUG   mc-monitor/java_status.go:85    ping returned   {"error": "read tcp 172.19.0.2:33806->172.19.0.3:25565: read: connection reset by peer", "info": null}
crash-landing-BK  | failed to ping mc:25565 : read tcp 172.19.0.2:33806->172.19.0.3:25565: read: connection reset by peer'
crash-landing-BK  | + log ERROR 'Error querying the server, waiting 5m...'
crash-landing-BK  | + local oldState
crash-landing-BK  | ++ shopt -po xtrace
crash-landing-BK  | + oldState='set -o xtrace'
crash-landing-BK  | + shopt -u -o xtrace
crash-landing-BK  | 2024-10-15T09:43:42+0000 ERROR Error querying the server, waiting 5m...
crash-landing-BK  | + sleep 5m
crash-landing     | 2024-10-15 09:43:42 [INFO] [Minecraft-Server] Disconnecting /172.19.0.2:33806: Protocol error
crash-landing     | 2024-10-15 09:43:42 [INFO] [Minecraft-Server] /172.19.0.2:33806 lost connection

What i am doing wrong?

@wippy00 wippy00 changed the title Error querying the server PLAYERS_ONLINE_CHECK_INTERVAL Error querying the server PAUSE_IF_NO_PLAYERS Oct 15, 2024
@itzg
Copy link
Owner

itzg commented Oct 15, 2024

It's because that version of Minecraft, 1.6.4, is very old and uses a different player query protocol version.

I will have to research if there's an option that can be exposed for that.

@itzg itzg added the help wanted Extra attention is needed label Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
Status: No status
Development

No branches or pull requests

2 participants