itzg / docker-minecraft-server

Docker image that provides a Minecraft Server that will automatically download selected version at startup

Home Page:https://docker-minecraft-server.readthedocs.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`SPIGET_RESOURCES` failing to download one plugin

anthr76 opened this issue · comments

Describe the problem

An enviorment variable like SPIGET_RESOURCES: "83557,28140,14573,60623,9089,34315" is failing to download one plugin.

Container definition

Name:         minecraft-survival-0-6d8fff6d57-qbv2g
Namespace:    infra
Priority:     0
Node:         worker-02/192.168.8.62
Start Time:   Sun, 21 Nov 2021 21:32:37 -0500
Labels:       app=minecraft-survival-0
              pod-template-hash=6d8fff6d57
Annotations:  k8s.v1.cni.cncf.io/network-status:
                [{
                    "name": "cilium",
                    "interface": "eth0",
                    "ips": [
                        "fddf:f7bc:9670:7::7d94",
                        "10.244.4.240"
                    ],
                    "mac": "96:1f:9d:64:e7:80",
                    "default": true,
                    "dns": {}
                }]
              k8s.v1.cni.cncf.io/networks-status:
                [{
                    "name": "cilium",
                    "interface": "eth0",
                    "ips": [
                        "fddf:f7bc:9670:7::7d94",
                        "10.244.4.240"
                    ],
                    "mac": "96:1f:9d:64:e7:80",
                    "default": true,
                    "dns": {}
                }]
              kubectl.kubernetes.io/restartedAt: 2021-11-21T21:32:33-05:00
              kubernetes.io/psp: privileged
Status:       Running
IP:           10.244.4.240
IPs:
  IP:           10.244.4.240
  IP:           fddf:f7bc:9670:7::7d94
Controlled By:  ReplicaSet/minecraft-survival-0-6d8fff6d57
Containers:
  minecraft-survival-0:
    Container ID:   containerd://9e7b14a90089ba76ef595c4918fdd4a0c10f7048c81556e7be71b6c7b055e00a
    Image:          docker.io/itzg/minecraft-server:2021.22.0
    Image ID:       docker.io/itzg/minecraft-server@sha256:bdfe686d5c2a994aad0dbca446ce5328667115c4c986c842a4adfd582dcf8d6a
    Ports:          25565/TCP, 25575/TCP, 8100/TCP
    Host Ports:     0/TCP, 0/TCP, 0/TCP
    State:          Running
      Started:      Sun, 21 Nov 2021 21:32:42 -0500
    Ready:          True
    Restart Count:  0
    Requests:
      cpu:      1
      memory:   2Gi
    Liveness:   tcp-socket :25565 delay=30s timeout=1s period=5s #success=1 #failure=10
    Readiness:  tcp-socket :25565 delay=30s timeout=1s period=5s #success=1 #failure=10
    Environment Variables from:
      minecraft  Secret  Optional: false
    Environment:
      EULA:                           TRUE
      TYPE:                           PAPER
      PAPER_DOWNLOAD_URL:
      VERSION:                        1.17.1
      DIFFICULTY:                     normal
      WHITELIST:
      OPS:                            iTz_Crush
      ICON:
      MAX_PLAYERS:                    20
      MAX_WORLD_SIZE:                 2.9999984e+07
      ALLOW_NETHER:                   true
      ANNOUNCE_PLAYER_ACHIEVEMENTS:   true
      ENABLE_COMMAND_BLOCK:           true
      FORCE_GAMEMODE:                 false
      GENERATE_STRUCTURES:            true
      HARDCORE:                       false
      MAX_BUILD_HEIGHT:               256
      MAX_TICK_TIME:                  -1
      SPAWN_ANIMALS:                  true
      SPAWN_MONSTERS:                 true
      SPAWN_NPCS:                     true
      VIEW_DISTANCE:                  20
      SEED:
      MODE:                           survival
      MOTD:                           Welcome to Minecraft on Kubernetes!
      PVP:                            true
      LEVEL_TYPE:                     DEFAULT
      GENERATOR_SETTINGS:
      LEVEL:                          world
      ONLINE_MODE:                    false
      MEMORY:                         3G
      JVM_OPTS:
      JVM_XX_OPTS:
      ENABLE_RCON:                    true
      RCON_PASSWORD:                  <set to the key 'rcon-password' in secret 'minecraft-survival-0'>  Optional: false
      CFG_LP_SERVER:                  global
      COPY_CONFIG_DEST:               /data
      NETWORK_COMPRESSION_THRESHOLD:  -1
      OVERRIDE_SERVER_PROPERTIES:     TRUE
      PATCH_DEFINITIONS:              /patches
      REPLACE_ENV_DURING_SYNC:        TRUE
      REPLACE_ENV_VARIABLES:          TRUE
      SPIGET_RESOURCES:               83557,28140,14573,60623,9089,34315
    Mounts:
      /config/plugins/BlueMap/ from bluemap-config (rw)
      /config/plugins/LuckPerms/ from luckperms-config (rw)
      /data from datadir (rw)
      /patches/ from patches (rw)
      /var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-ccwh5 (ro)
Conditions:
  Type              Status
  Initialized       True
  Ready             True
  ContainersReady   True
  PodScheduled      True
Volumes:
  datadir:
    Type:       PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
    ClaimName:  minecraft-survival-v1
    ReadOnly:   false
  patches:
    Type:      ConfigMap (a volume populated by a ConfigMap)
    Name:      minecraft-survival-patches
    Optional:  false
  bluemap-config:
    Type:      ConfigMap (a volume populated by a ConfigMap)
    Name:      minecraft-survival-bluemap-config
    Optional:  false
  luckperms-config:
    Type:      ConfigMap (a volume populated by a ConfigMap)
    Name:      minecraft-luckperms-template
    Optional:  false
  kube-api-access-ccwh5:
    Type:                    Projected (a volume that contains injected data from multiple sources)
    TokenExpirationSeconds:  3607
    ConfigMapName:           kube-root-ca.crt
    ConfigMapOptional:       <nil>
    DownwardAPI:             true
QoS Class:                   Burstable
Node-Selectors:              <none>
Tolerations:                 node.kubernetes.io/not-ready:NoExecute op=Exists for 300s
                             node.kubernetes.io/unreachable:NoExecute op=Exists for 300s

Container logs



at java.util.jar.JarFile.<init>(JarFile.java:284) ~[?:?]
--
  |   | at java.util.jar.JarFile.<init>(JarFile.java:318) ~[?:?]
  |   | at java.util.jar.JarFile.<init>(JarFile.java:347) ~[?:?]
  |   | at java.util.zip.ZipFile.<init>(ZipFile.java:172) ~[?:?]
  |   | at java.util.zip.ZipFile.<init>(ZipFile.java:243) ~[?:?]
  |   | at java.util.zip.ZipFile$CleanableResource.<init>(ZipFile.java:709) ~[?:?]
  |   | at java.util.zip.ZipFile$Source.get(ZipFile.java:1277) ~[?:?]
  |   | at java.util.zip.ZipFile$Source.<init>(ZipFile.java:1315) ~[?:?]
  |   | at java.util.zip.ZipFile$Source.initCEN(ZipFile.java:1477) ~[?:?]
  |   | at java.util.zip.ZipFile$Source.findEND(ZipFile.java:1469) ~[?:?]
  |   | Caused by: java.util.zip.ZipException: zip END header not found
  |   | at java.lang.Thread.run(Thread.java:833) ~[?:?]
  |   | at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:319) ~[patched_1.17.1.jar:git-Paper-388]
  |   | at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1220) ~[patched_1.17.1.jar:git-Paper-388]
  |   | at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:287) ~[patched_1.17.1.jar:git-Paper-388]
  |   | at org.bukkit.craftbukkit.v1_17_R1.CraftServer.loadPlugins(CraftServer.java:419) ~[patched_1.17.1.jar:git-Paper-388]
  |   | at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:158) ~[patched_1.17.1.jar:git-Paper-388]
  |   | at org.bukkit.plugin.java.JavaPluginLoader.getPluginDescription(JavaPluginLoader.java:186) ~[patched_1.17.1.jar:git-Paper-388]
  |   | org.bukkit.plugin.InvalidDescriptionException: Invalid plugin.yml
  |   | [01:53:37 ERROR]: Could not load 'plugins/9089.jar' in folder 'plugins'


This seems like the unzip is corrupting the jar?

EssentialsX (aka resource ID 9089) breaks the normal spiget flow as discussed in this PR with the spiget maintainers: #982 (comment)

I probably need to explicitly disallow that resource via SPIGET_RESOURCE. Instead use MODS=https://github.com/EssentialsX/Essentials/releases/download/2.19.0/EssentialsX-2.19.0.jar

This issue is stale because it has been open 30 days with no activity. Please add a comment describing the reason to keep this issue open.

I've met the same issue, SPIGET_RESOURCES still allows 9089 resource id.
And also, document should be updated https://github.com/itzg/docker-minecraft-server#auto-downloading-spigotmcbukkitpapermc-plugins

This is still happening, bumping above recommendation