itzg / docker-minecraft-server

Docker image that provides a Minecraft Server that will automatically download selected version at startup
https://docker-minecraft-server.readthedocs.io/
Apache License 2.0
9.55k stars 1.56k forks source link

Unable to use mc-send-to-console on Ubuntu 20.04 #1393

Closed adnieman closed 2 years ago

adnieman commented 2 years ago

Describe the problem

I've run this container under Alpine and it works very well. Under Ubuntu 20.04, I can not send any commands to the console using docker exec mc_existence mc-send-to-console. The error that appears is error: failed switching to "minecraft": operation not permitted.

I start the container using docker-compose up -d and I can attach to the console by way of docker attach mc_existence, but I can not send commands to the console unless it is in interactive. I have opened a shell in the container and sent commands to the named pipe as root using mc-send-to-console say hello, which is successful. I see the output show up in the minecraft server log.

I haven't seen this bug listed in the list of open reports, so I've posted it here hoping for some help.

Container definition


services:
  mc:
    container_name: mc_existence
    user: "1000:1000"
    image: itzg/minecraft-server
    ports:
      - 25565:25565
    environment:
      DEBUG: "true"
      MEMORY: "1536M"
      USE_AIKAR_FLAGS: "true"
      EULA: "TRUE"
      VERSION: "1.18.1"
      ENABLE_RCON: "false"
      JVM_OPTS: "-Dlog4j.configurationFile=log4j2.xml"
    tty: true
    stdin_open: true
    restart: unless-stopped
    volumes:
      # attach a directory relative to the directory containing this compose file
      - ./mc_existence:/data```

### Container logs

``` + export HOME=/data
 + HOME=/data
 ++ id -u
 ++ id -g
 ++ ls -lnd /data
 + log 'Running as uid=1000 gid=1000 with /data as '\''drwxrwxr-x 6 1000 1000 4096 Mar  2 16:13 /data'\'''
 + local oldState
 ++ shopt -po xtrace
 + oldState='set -o xtrace'
 + shopt -u -o xtrace
 [init] 2022-03-02 18:13:19+00:00 Running as uid=1000 gid=1000 with /data as 'drwxrwxr-x 6 1000 1000 4096 Mar  2 16:13 /data'
 + '[' '!' -e /data/eula.txt ']'
 + isTrue false
 + local oldState
 ++ shopt -po xtrace
 + oldState='set -o xtrace'
 + shopt -u -o xtrace
 + return 1
 + isTrue false
 + local oldState
 ++ shopt -po xtrace
 + oldState='set -o xtrace'
 + shopt -u -o xtrace
 + return 1
 + [[ -n '' ]]
 + [[ -n '' ]]
 + fixJavaPath
 + which java
 + export VERSIONS_JSON=https://launchermeta.mojang.com/mc/game/version_manifest.json
 + VERSIONS_JSON=https://launchermeta.mojang.com/mc/game/version_manifest.json
 + case "X$VERSION" in
 + VANILLA_VERSION=1.18.1
 + export VANILLA_VERSION
 + log 'Resolved version given 1.18.1 into 1.18.1'
 + local oldState
 ++ shopt -po xtrace
 + oldState='set -o xtrace'
 + shopt -u -o xtrace
 [init] 2022-03-02 18:13:19+00:00 Resolved version given 1.18.1 into 1.18.1
 + cd /data
 + export ORIGINAL_TYPE=VANILLA
 + ORIGINAL_TYPE=VANILLA
 + isTrue false
 + local oldState
 ++ shopt -po xtrace
 + oldState='set -o xtrace'
 + shopt -u -o xtrace
 + return 1
 + isTrue false
 + local oldState
 ++ shopt -po xtrace
 + oldState='set -o xtrace'
 + shopt -u -o xtrace
 + return 1
 + versionLessThan 1.7
 + mc-image-helper compare-versions 1.18.1 lt 1.7
 + log 'Resolving type given VANILLA'
 + local oldState
 ++ shopt -po xtrace
 + oldState='set -o xtrace'
 + shopt -u -o xtrace
 [init] 2022-03-02 18:13:20+00:00 Resolving type given VANILLA
 + case "${TYPE^^}" in
 + exec /start-deployVanilla
 + set -o pipefail
 + export SERVER=minecraft_server.1.18.1.jar
 + SERVER=minecraft_server.1.18.1.jar
 + '[' '!' -e minecraft_server.1.18.1.jar ']'
 + '[' -n '' ']'
 + versionLessThan 1.6
 + mc-image-helper compare-versions 1.18.1 lt 1.6
 + [[ -L /data/minecraft_server.jar ]]
 + isDebugging
 + isTrue true
 + local oldState
 ++ shopt -po xtrace
 + oldState='set -o xtrace'
 + shopt -u -o xtrace
 + return 0
 + return 0
 + ls -l
 total 45440
 -rw-r--r--  1 minecraft minecraft        2 Mar  2 18:00 banned-ips.json
 -rw-r--r--  1 minecraft minecraft      868 Mar  2 18:00 banned-players.json
 -rw-r--r--  1 minecraft minecraft      180 Mar  2 16:13 eula.txt
 drwxr-xr-x 12 minecraft minecraft     4096 Mar  2 18:13 Existence
 -rw-rw-r--  1 minecraft minecraft   121694 Mar  2 18:13 latest.log
 drwxr-xr-x  8 minecraft minecraft     4096 Mar  2 16:13 libraries
 -rw-r--r--  1 minecraft minecraft      832 Mar  2 16:13 log4j2.xml
 drwxr-xr-x  2 minecraft minecraft     4096 Mar  2 16:13 logs
 -rw-rw-r--  1 minecraft minecraft 46324407 Mar  2 16:13 minecraft_server.1.18.1.jar
 -rw-r--r--  1 minecraft minecraft      280 Mar  2 18:00 ops.json
 -rw-rw-r--  1 minecraft minecraft    29815 Mar  2 16:13 server.log
 -rw-r--r--  1 minecraft minecraft     1183 Mar  2 18:00 server.properties
 -rw-r--r--  1 minecraft minecraft      652 Mar  2 18:00 usercache.json
 drwxr-xr-x  3 minecraft minecraft     4096 Mar  2 16:11 versions
 -rw-r--r--  1 minecraft minecraft      182 Mar  2 16:13 whitelist.json
 + export FAMILY=VANILLA
 + FAMILY=VANILLA
 + exec /start-setupWorld
 + '[' VANILLA = CURSEFORGE ']'
 + worldDest=/data/world
 + [[ -n '' ]]
 + exec /start-setupVanillaTweaks
 + VT_VERSION=
 + DATAPACKS_DIR=/data/world/datapacks
 + RESOURCEPACKS_DIR=/data/resourcepacks
 + isTrue false
 + local oldState
 ++ shopt -po xtrace
 + oldState='set -o xtrace'
 + shopt -u -o xtrace
 + return 1
 + [[ -n '' ]]
 + [[ -n '' ]]
 + exec /start-setupDatapack
 + out_dir=/data/world/datapacks
 + isTrue false
 + local oldState
 ++ shopt -po xtrace
 + oldState='set -o xtrace'
 + shopt -u -o xtrace
 + return 1
 + [[ -n '' ]]
 + [[ -n '' ]]
 + exec /start-setupForgeApiMods
 + isTrue false
 + local oldState
 ++ shopt -po xtrace
 + oldState='set -o xtrace'
 + shopt -u -o xtrace
 + return 1
 + '[' '' ']'
 + '[' '' ']'
 + exec /start-setupModpack
 + CURSE_URL_BASE=https://minecraft.curseforge.com/projects
 + isTrue false
 + local oldState
 ++ shopt -po xtrace
 + oldState='set -o xtrace'
 + shopt -u -o xtrace
 + return 1
 + [[ -n '' ]]
 + [[ -n '' ]]
 + [[ -n '' ]]
 + [[ -n '' ]]
 + [[ -n '' ]]
 + : ''
 + : ''
 + : ''
 + [[ -n '' ]]
 + exec /start-setupModconfig
 + isTrue true
 + local oldState
 ++ shopt -po xtrace
 + oldState='set -o xtrace'
 + shopt -u -o xtrace
 + return 0
 + updateArg=--skip-newer-in-destination
 + isTrue true
 + local oldState
 ++ shopt -po xtrace
 + oldState='set -o xtrace'
 + shopt -u -o xtrace
 + return 0
 + subcommand=sync-and-interpolate
 + '[' -d /plugins ']'
 + : /data/mods
 + '[' -d /mods ']'
 + : /data/config
 + '[' -d /config ']'
 + exec /start-setupServerProperties
 [init] 2022-03-02 18:13:22+00:00 server.properties already created, skipping
 [init] 2022-03-02 18:13:22+00:00 DEBUG Dumping server.properties
 #Minecraft server properties
 #Wed Mar 02 18:00:30 UTC 2022
 enable-jmx-monitoring=false
 rcon.port=25575
 level-seed=
 enable-command-block=false
 gamemode=survival
 enable-query=true
 generator-settings=
 level-name=Existence
 motd=Existence PvE Server\nRun by BassCookie
 query.port=25565
 pvp=false
 generate-structures=true
 difficulty=normal
 network-compression-threshold=256
 max-tick-time=-1
 require-resource-pack=false
 max-players=10
 use-native-transport=true
 online-mode=true
 enable-status=true
 allow-flight=false
 broadcast-rcon-to-ops=true
 view-distance=12
 resource-pack-prompt=
 server-ip=
 allow-nether=true
 server-port=25565
 enable-rcon=false
 sync-chunk-writes=true
 op-permission-level=4
 prevent-proxy-connections=true
 hide-online-players=false
 resource-pack=
 entity-broadcast-range-percentage=100
 simulation-distance=10
 rcon.password=
 player-idle-timeout=0
 force-gamemode=false
 rate-limit=0
 hardcore=false
 white-list=true
 broadcast-console-to-ops=true
 spawn-npcs=true
 spawn-animals=true
 snooper-enabled=false
 function-permission-level=2
 level-type=default
 text-filtering-config=
 spawn-monsters=true
 enforce-whitelist=true
 resource-pack-sha1=
 spawn-protection=0
 max-world-size=29999984
 + versionLessThan 1.7.6
 + mc-image-helper compare-versions 1.18.1 lt 1.7.6
 + opsFile=ops.json
 + whitelistFile=whitelist.json
 + isTrue ''
 + local oldState
 ++ shopt -po xtrace
 + oldState='set -o xtrace'
 + shopt -u -o xtrace
 + return 1
 + '[' -n '' ']'
 + '[' -n '' ']'
 + isTrue ''
 + local oldState
 ++ shopt -po xtrace
 + oldState='set -o xtrace'
 + shopt -u -o xtrace
 + return 1
 + '[' -n '' ']'
 + '[' -n '' ']'
 + exec /start-finalExec
 + '[' -n '' ']'
 + canUseRollingLogs=true
 + useFallbackJvmFlag=false
 + versionLessThan 1.7
 + mc-image-helper compare-versions 1.18.1 lt 1.7
 + isFamily VANILLA
 + for f in "${@}"
 + [[ VANILLA == \V\A\N\I\L\L\A ]]
 + return 0
 + versionLessThan 1.12
 + mc-image-helper compare-versions 1.18.1 lt 1.12
 + isFamily VANILLA
 + for f in "${@}"
 + [[ VANILLA == \V\A\N\I\L\L\A ]]
 + return 0
 + versionLessThan 1.17
 + mc-image-helper compare-versions 1.18.1 lt 1.17
 + isType PURPUR
 + for t in "${@}"
 + [[ VANILLA == \P\U\R\P\U\R ]]
 + return 1
 + isType PURPUR
 + for t in "${@}"
 + [[ VANILLA == \P\U\R\P\U\R ]]
 + return 1
 + versionLessThan 1.18.1
 + mc-image-helper compare-versions 1.18.1 lt 1.18.1
 + false
 + isTrue false
 + local oldState
 ++ shopt -po xtrace
 + oldState='set -o xtrace'
 + shopt -u -o xtrace
 + return 1
 + log 'Checking for JSON files.'
 + local oldState
 ++ shopt -po xtrace
 + oldState='set -o xtrace'
 + shopt -u -o xtrace
 [init] 2022-03-02 18:13:28+00:00 Checking for JSON files.
 ++ find /data -maxdepth 1 -name '*.json'
 + JSON_FILES='/data/usercache.json
 /data/whitelist.json
 /data/ops.json
 /data/banned-players.json
 /data/banned-ips.json'
 + for j in $JSON_FILES
 ++ cat /data/usercache.json
 ++ sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//'
 + [[ [{"name":"BassCookie32415","uuid":"3b7b40a3-6e4e-4a2b-8de3-f58dc9d1c526","expiresOn":"2022-04-02 16:35:38 +0000"},{"name":"Notch","uuid":"069a79f4-44e9-4726-a5be-fca90e38aaf5","expiresOn":"2022-04-02 02:58:08 +0000"},{"name":"MOTORMOUTH730","uuid":"bf1d6b8c-61d4-47a7-98ac-c5ed0636ddec","expiresOn":"2022-03-21 02:12:03 +0000"},{"name":"KongenAfKabul","uuid":"0ce66a1e-3626-4f53-be90-e050578658c2","expiresOn":"2022-01-13 20:34:38 +0000"},{"name":"Lucurious","uuid":"b1c11c70-f799-45b9-8055-ce08f42832ea","expiresOn":"2022-01-13 20:34:30 +0000"},{"name":"Pepijnyp","uuid":"ec4641f3-b42c-4a38-a63c-a69eb1f3ddbb","expiresOn":"2022-01-13 20:34:09 +0000"}] == '' ]]
 + for j in $JSON_FILES
 ++ cat /data/whitelist.json
 ++ sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//'
 + [[ [
 {
 "uuid": "bf1d6b8c-61d4-47a7-98ac-c5ed0636ddec",
 "name": "MOTORMOUTH730"
 },
 {
 "uuid": "3b7b40a3-6e4e-4a2b-8de3-f58dc9d1c526",
 "name": "BassCookie32415"
 }
 ] == '' ]]
 + for j in $JSON_FILES
 ++ cat /data/ops.json
 ++ sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//'
 + [[ [
 {
 "uuid": "bf1d6b8c-61d4-47a7-98ac-c5ed0636ddec",
 "name": "MOTORMOUTH730",
 "level": 0,
 "bypassesPlayerLimit": true
 },
 {
 "uuid": "3b7b40a3-6e4e-4a2b-8de3-f58dc9d1c526",
 "name": "BassCookie32415",
 "level": 4,
 "bypassesPlayerLimit": true
 }
 ] == '' ]]
 + for j in $JSON_FILES
 ++ cat /data/banned-players.json
 ++ sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//'
 + [[ [
 {
 "uuid": "3c62f4b4-e08d-4b20-84b9-36883f932d21",
 "name": "_r12",
 "created": "2021-12-13 20:34:21 +0000",
 "source": "Server",
 "expires": "forever",
 "reason": "Banned for griefing."
 },
 {
 "uuid": "0ce66a1e-3626-4f53-be90-e050578658c2",
 "name": "KongenAfKabul",
 "created": "2021-12-13 20:34:38 +0000",
 "source": "Server",
 "expires": "forever",
 "reason": "Banned for griefing."
 },
 {
 "uuid": "ec4641f3-b42c-4a38-a63c-a69eb1f3ddbb",
 "name": "Pepijnyp",
 "created": "2021-12-13 20:34:09 +0000",
 "source": "Server",
 "expires": "forever",
 "reason": "Banned for griefing."
 },
 {
 "uuid": "b1c11c70-f799-45b9-8055-ce08f42832ea",
 "name": "Lucurious",
 "created": "2021-12-13 20:34:30 +0000",
 "source": "Server",
 "expires": "forever",
 "reason": "Banned for griefing."
 }
 ] == '' ]]
 + for j in $JSON_FILES
 ++ cat /data/banned-ips.json
 ++ sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//'
 + [[ [] == '' ]]
 + versionLessThan 1.14
 + mc-image-helper compare-versions 1.18.1 lt 1.14
 + [[ '' = false ]]
 + : 1536M
 + : 1536M
 + expandedDOpts=
 + '[' -n '' ']'
 + isTrue
 + local oldState
 ++ shopt -po xtrace
 + oldState='set -o xtrace'
 + shopt -u -o xtrace
 + return 1
 + isTrue true
 + local oldState
 ++ shopt -po xtrace
 + oldState='set -o xtrace'
 + shopt -u -o xtrace
 + return 0
 ++ normalizeMemSize 1536M
 ++ local scale=1
 ++ case ${1,,} in
 ++ scale=1048576
 ++ val=1536
 ++ echo 1610612736
 ++ normalizeMemSize 12g
 ++ local scale=1
 ++ case ${1,,} in
 ++ scale=1073741824
 ++ val=12
 ++ echo 12884901888
 + ((  1610612736 >= 12884901888  ))
 + log 'Using Aikar'\''s flags'
 + local oldState
 ++ shopt -po xtrace
 + oldState='set -o xtrace'
 + shopt -u -o xtrace
 [init] 2022-03-02 18:13:29+00:00 Using Aikar's flags
 + G1NewSizePercent=30
 + G1MaxNewSizePercent=40
 + G1HeapRegionSize=8M
 + G1ReservePercent=20
 + InitiatingHeapOccupancyPercent=15
 + JVM_XX_OPTS='
   -XX:+UseG1GC
   -XX:+ParallelRefProcEnabled
   -XX:MaxGCPauseMillis=200
   -XX:+UnlockExperimentalVMOptions
   -XX:+DisableExplicitGC
   -XX:+AlwaysPreTouch
   -XX:G1NewSizePercent=30
   -XX:G1MaxNewSizePercent=40
   -XX:G1HeapRegionSize=8M
   -XX:G1ReservePercent=20
   -XX:G1HeapWastePercent=5
   -XX:G1MixedGCCountTarget=4
   -XX:InitiatingHeapOccupancyPercent=15
   -XX:G1MixedGCLiveThresholdPercent=90
   -XX:G1RSetUpdatingPauseTimePercent=5
   -XX:SurvivorRatio=32
   -XX:+PerfDisableSharedMem
   -XX:MaxTenuringThreshold=1
   -Dusing.aikars.flags=https://mcflags.emc.gs
   -Daikars.new.flags=true
   '
 + isTrue ''
 + local oldState
 ++ shopt -po xtrace
 + oldState='set -o xtrace'
 + shopt -u -o xtrace
 + return 1
 + isTrue ''
 + local oldState
 ++ shopt -po xtrace
 + oldState='set -o xtrace'
 + shopt -u -o xtrace
 + return 1
 + [[ -n 1536M ]]
 + log 'Setting initial memory to 1536M and max to 1536M'
 + local oldState
 ++ shopt -po xtrace
 + oldState='set -o xtrace'
 + shopt -u -o xtrace
 [init] 2022-03-02 18:13:29+00:00 Setting initial memory to 1536M and max to 1536M
 + [[ -n 1536M ]]
 + JVM_OPTS='-Xms1536M -Dlog4j.configurationFile=log4j2.xml'
 + [[ -n 1536M ]]
 + JVM_OPTS='-Xmx1536M -Xms1536M -Dlog4j.configurationFile=log4j2.xml'
 + mcServerRunnerArgs=(--stop-duration "${STOP_DURATION:-60}s" --named-pipe "${CONSOLE_IN_NAMED_PIPE:-/tmp/minecraft-console-in}")
 + [[ -n '' ]]
 + [[ VANILLA == \C\U\R\S\E\F\O\R\G\E ]]
 + [[ VANILLA == \C\U\R\S\E\F\O\R\G\E ]]
 + [[ minecraft_server.1.18.1.jar =~ run.sh ]]
 + '[' -f /data/bootstrap.txt ']'
 + log 'Starting the Minecraft server...'
 + local oldState
 ++ shopt -po xtrace
 + oldState='set -o xtrace'
 + shopt -u -o xtrace
 [init] 2022-03-02 18:13:29+00:00 Starting the Minecraft server...
 + finalArgs=($JVM_XX_OPTS $JVM_OPTS $expandedDOpts -jar "$SERVER" "$@" $EXTRA_ARGS)
 + isTrue false
 + local oldState
 ++ shopt -po xtrace
 + oldState='set -o xtrace'
 + shopt -u -o xtrace
 + return 1
 + isTrue ''
 + local oldState
 ++ shopt -po xtrace
 + oldState='set -o xtrace'
 + shopt -u -o xtrace
 + return 1
 + isTrue false
 + local oldState
 ++ shopt -po xtrace
 + oldState='set -o xtrace'
 + shopt -u -o xtrace
 + return 1
 + exec mc-server-runner --stop-duration 60s --named-pipe /tmp/minecraft-console-in java -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=true -Xmx1536M -Xms1536M -Dlog4j.configurationFile=log4j2.xml -jar minecraft_server.1.18.1.jar
 Starting net.minecraft.server.Main
 02-Mar-2022 18:13:48.111 UTC [INFO] Environment: authHost='https://authserver.mojang.com', accountsHost='https://api.mojang.com', sessionHost='https://sessionserver.mojang.com', servicesHost='https://api.minecraftservices.com', name='PROD'
 02-Mar-2022 18:13:50.040 UTC [WARN] Ambiguity between arguments [teleport, location] and [teleport, destination] with inputs: [0.1 -0.5 .9, 0 0 0]
 02-Mar-2022 18:13:50.054 UTC [WARN] Ambiguity between arguments [teleport, location] and [teleport, targets] with inputs: [0.1 -0.5 .9, 0 0 0]
 02-Mar-2022 18:13:50.070 UTC [WARN] Ambiguity between arguments [teleport, destination] and [teleport, targets] with inputs: [Player, 0123, @e, dd12be42-52a9-4a91-a8a1-11c01849e498]
 02-Mar-2022 18:13:50.547 UTC [WARN] Ambiguity between arguments [teleport, targets] and [teleport, destination] with inputs: [Player, 0123, dd12be42-52a9-4a91-a8a1-11c01849e498]
 02-Mar-2022 18:13:50.568 UTC [WARN] Ambiguity between arguments [teleport, targets, location] and [teleport, targets, destination] with inputs: [0.1 -0.5 .9, 0 0 0]
 02-Mar-2022 18:13:50.615 UTC [INFO] Reloading ResourceManager: Default
 02-Mar-2022 18:13:53.671 UTC [INFO] Loaded 7 recipes
 02-Mar-2022 18:13:55.056 UTC [INFO] Loaded 1141 advancements
 02-Mar-2022 18:14:04.224 UTC [INFO] Starting minecraft server version 1.18.1
 02-Mar-2022 18:14:04.226 UTC [INFO] Loading properties
 02-Mar-2022 18:14:04.227 UTC [INFO] Default game type: SURVIVAL
 02-Mar-2022 18:14:04.228 UTC [INFO] Generating keypair
 02-Mar-2022 18:14:05.044 UTC [INFO] Starting Minecraft server on *:25565
 02-Mar-2022 18:14:05.440 UTC [INFO] Using epoll channel type
 02-Mar-2022 18:14:05.863 UTC [INFO] Preparing level "Existence"
 02-Mar-2022 18:14:06.232 UTC [INFO] Preparing start region for dimension minecraft:overworld
 02-Mar-2022 18:14:11.302 UTC [INFO] Preparing spawn area: 0%
 02-Mar-2022 18:14:11.360 UTC [INFO] Preparing spawn area: 0%
 02-Mar-2022 18:14:11.396 UTC [INFO] Preparing spawn area: 0%
 02-Mar-2022 18:14:11.436 UTC [INFO] Preparing spawn area: 0%
 02-Mar-2022 18:14:11.479 UTC [INFO] Preparing spawn area: 0%
 02-Mar-2022 18:14:11.497 UTC [INFO] Preparing spawn area: 0%
 02-Mar-2022 18:14:11.540 UTC [INFO] Preparing spawn area: 0%
 02-Mar-2022 18:14:11.590 UTC [INFO] Preparing spawn area: 0%
 02-Mar-2022 18:14:11.643 UTC [INFO] Preparing spawn area: 0%
 02-Mar-2022 18:14:11.677 UTC [INFO] Preparing spawn area: 0%
 02-Mar-2022 18:14:11.729 UTC [INFO] Preparing spawn area: 0%
 02-Mar-2022 18:14:11.759 UTC [INFO] Preparing spawn area: 0%
 02-Mar-2022 18:14:12.247 UTC [INFO] Preparing spawn area: 0%
 02-Mar-2022 18:14:12.736 UTC [INFO] Preparing spawn area: 0%
 02-Mar-2022 18:14:13.236 UTC [INFO] Preparing spawn area: 0%
 02-Mar-2022 18:14:13.751 UTC [INFO] Preparing spawn area: 0%
 02-Mar-2022 18:14:14.240 UTC [INFO] Preparing spawn area: 0%
 02-Mar-2022 18:14:14.739 UTC [INFO] Preparing spawn area: 0%
 02-Mar-2022 18:14:15.755 UTC [INFO] Preparing spawn area: 0%
 02-Mar-2022 18:14:15.782 UTC [INFO] Preparing spawn area: 0%
 02-Mar-2022 18:14:16.239 UTC [INFO] Preparing spawn area: 0%
 02-Mar-2022 18:14:16.734 UTC [INFO] Preparing spawn area: 0%
 02-Mar-2022 18:14:17.239 UTC [INFO] Preparing spawn area: 0%
 02-Mar-2022 18:14:17.741 UTC [INFO] Preparing spawn area: 0%
 02-Mar-2022 18:14:18.236 UTC [INFO] Preparing spawn area: 0%
 02-Mar-2022 18:14:18.735 UTC [INFO] Preparing spawn area: 0%
 02-Mar-2022 18:14:19.237 UTC [INFO] Preparing spawn area: 0%
 02-Mar-2022 18:14:19.740 UTC [INFO] Preparing spawn area: 0%
 02-Mar-2022 18:14:20.715 UTC [INFO] Preparing spawn area: 0%
 02-Mar-2022 18:14:20.744 UTC [INFO] Preparing spawn area: 0%
 02-Mar-2022 18:14:21.238 UTC [INFO] Preparing spawn area: 0%
 02-Mar-2022 18:14:21.749 UTC [INFO] Preparing spawn area: 0%
 02-Mar-2022 18:14:22.248 UTC [INFO] Preparing spawn area: 0%
 02-Mar-2022 18:14:22.736 UTC [INFO] Preparing spawn area: 0%
 02-Mar-2022 18:14:23.363 UTC [INFO] Preparing spawn area: 1%
 02-Mar-2022 18:14:23.739 UTC [INFO] Preparing spawn area: 1%
 02-Mar-2022 18:14:24.248 UTC [INFO] Preparing spawn area: 1%
 02-Mar-2022 18:14:24.741 UTC [INFO] Preparing spawn area: 1%
 02-Mar-2022 18:14:25.240 UTC [INFO] Preparing spawn area: 1%
 02-Mar-2022 18:14:25.737 UTC [INFO] Preparing spawn area: 1%
 02-Mar-2022 18:14:26.239 UTC [INFO] Preparing spawn area: 1%
 02-Mar-2022 18:14:26.740 UTC [INFO] Preparing spawn area: 1%
 02-Mar-2022 18:14:27.240 UTC [INFO] Preparing spawn area: 1%
 02-Mar-2022 18:14:28.073 UTC [INFO] Preparing spawn area: 1%
 02-Mar-2022 18:14:28.251 UTC [INFO] Preparing spawn area: 1%
 02-Mar-2022 18:14:28.833 UTC [INFO] Preparing spawn area: 2%
 02-Mar-2022 18:14:29.241 UTC [INFO] Preparing spawn area: 7%
 02-Mar-2022 18:14:29.743 UTC [INFO] Preparing spawn area: 7%
 02-Mar-2022 18:14:30.235 UTC [INFO] Preparing spawn area: 7%
 02-Mar-2022 18:14:30.896 UTC [INFO] Preparing spawn area: 7%
 02-Mar-2022 18:14:31.237 UTC [INFO] Preparing spawn area: 7%
 02-Mar-2022 18:14:31.735 UTC [INFO] Preparing spawn area: 7%
 02-Mar-2022 18:14:32.239 UTC [INFO] Preparing spawn area: 8%
 02-Mar-2022 18:14:33.351 UTC [INFO] Preparing spawn area: 10%
 02-Mar-2022 18:14:33.352 UTC [INFO] Preparing spawn area: 10%
 02-Mar-2022 18:14:33.739 UTC [INFO] Preparing spawn area: 13%
 02-Mar-2022 18:14:34.242 UTC [INFO] Preparing spawn area: 17%
 02-Mar-2022 18:14:34.759 UTC [INFO] Preparing spawn area: 17%
 02-Mar-2022 18:14:35.235 UTC [INFO] Preparing spawn area: 18%
 02-Mar-2022 18:14:35.943 UTC [INFO] Preparing spawn area: 23%
 02-Mar-2022 18:14:36.237 UTC [INFO] Preparing spawn area: 23%
 02-Mar-2022 18:14:36.741 UTC [INFO] Preparing spawn area: 25%
 02-Mar-2022 18:14:37.369 UTC [INFO] Preparing spawn area: 27%
 02-Mar-2022 18:14:37.735 UTC [INFO] Preparing spawn area: 28%
 02-Mar-2022 18:14:38.244 UTC [INFO] Preparing spawn area: 36%
 02-Mar-2022 18:14:38.909 UTC [INFO] Preparing spawn area: 36%
 02-Mar-2022 18:14:39.246 UTC [INFO] Preparing spawn area: 36%
 02-Mar-2022 18:14:39.867 UTC [INFO] Preparing spawn area: 36%
 02-Mar-2022 18:14:40.234 UTC [INFO] Preparing spawn area: 36%
 02-Mar-2022 18:14:40.743 UTC [INFO] Preparing spawn area: 36%
 02-Mar-2022 18:14:41.272 UTC [INFO] Preparing spawn area: 36%
 02-Mar-2022 18:14:41.734 UTC [INFO] Preparing spawn area: 36%
 02-Mar-2022 18:14:44.273 UTC [INFO] Preparing spawn area: 36%
 02-Mar-2022 18:14:44.276 UTC [INFO] Preparing spawn area: 36%
 02-Mar-2022 18:14:44.277 UTC [INFO] Preparing spawn area: 36%
 02-Mar-2022 18:14:44.279 UTC [INFO] Preparing spawn area: 36%
 02-Mar-2022 18:14:44.281 UTC [INFO] Preparing spawn area: 36%
 02-Mar-2022 18:14:44.738 UTC [INFO] Preparing spawn area: 41%
 02-Mar-2022 18:14:45.236 UTC [INFO] Preparing spawn area: 66%
 02-Mar-2022 18:14:45.747 UTC [INFO] Preparing spawn area: 76%
 02-Mar-2022 18:14:46.284 UTC [INFO] Preparing spawn area: 80%
 02-Mar-2022 18:14:46.978 UTC [INFO] Preparing spawn area: 80%
 02-Mar-2022 18:14:47.235 UTC [INFO] Preparing spawn area: 85%
 02-Mar-2022 18:14:47.737 UTC [INFO] Preparing spawn area: 90%
 02-Mar-2022 18:14:48.670 UTC [INFO] Preparing spawn area: 94%
 02-Mar-2022 18:14:48.758 UTC [INFO] Preparing spawn area: 94%
 02-Mar-2022 18:14:49.237 UTC [INFO] Preparing spawn area: 96%
 02-Mar-2022 18:14:49.991 UTC [INFO] Time elapsed: 43757 ms
 02-Mar-2022 18:14:49.994 UTC [INFO] Done (44.129s)! For help, type "help"
 02-Mar-2022 18:14:49.994 UTC [INFO] Starting GS4 status listener
 02-Mar-2022 18:14:50.075 UTC [INFO] Thread Query Listener started
 02-Mar-2022 18:14:50.075 UTC [INFO] Query running on 0.0.0.0:25565
 02-Mar-2022 18:14:52.410 UTC [WARN] Can't keep up! Is the server overloaded? Running 2031ms or 40 ticks behind
itzg commented 2 years ago

Thanks for reporting this. Yes, it definitely looks like a bug where the current implementation assumes the container was started with uid=0. I'll need to add some more logic to this line

https://github.com/itzg/docker-minecraft-server/blob/07665d757152901338f60ac625ae2118bc4d4a08/bin/mc-send-to-console#L15

adnieman commented 2 years ago

Thanks for reporting this. Yes, it definitely looks like a bug where the current implementation assumes the container was started with uid=0. I'll need to add some more logic to this line

https://github.com/itzg/docker-minecraft-server/blob/07665d757152901338f60ac625ae2118bc4d4a08/bin/mc-send-to-console#L15

A work-around for now is to use the command docker exec -itu0 [container] mc-send-to-console say hello