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.56k stars 1.56k forks source link

ERROR failed to auto-install CurseForge modpack #3089

Closed albinmedoc closed 1 month ago

albinmedoc commented 1 month ago

Describe the problem

After a container restart today the container didnt come back up. I have been running the server for about 1 week with daily restarts.

Container definition

services:
  atm9-sky:
    container_name: "minecraft-atm9-sky"
    image: itzg/minecraft-server:latest
    restart: unless-stopped
    volumes:
      - ${APPDATA}/atm9-sky:/data
    env_file:
      - stack.env
    environment:
      EULA:true
      TYPE: "AUTO_CURSEFORGE"
      CF_SLUG: "all-the-mods-9-to-the-sky"
      CF_API_KEY:"-------"
      MEMORY: "6G"
      SPAWN_PROTECTION: 10
      ALLOW_FLIGHT: true

Container logs

[init] Running as uid=1001 gid=100 with /data as 'drwxr-sr-x 2 1001 100 4096 Oct  4 08:53 /data'

Exception in thread "main" java.lang.ClassFormatError: Illegal constant pool index 0 for method signature in class file sun/security/provider/DSA

    at java.base/java.lang.Class.forName0(Native Method)

    at java.base/java.lang.Class.forName(Unknown Source)

    at java.base/java.lang.Class.forName(Unknown Source)

    at java.base/java.security.Provider$Service.getImplClass(Unknown Source)

    at java.base/java.security.Provider$Service.getDefaultConstructor(Unknown Source)

    at java.base/java.security.Provider$Service.newInstanceOf(Unknown Source)

    at java.base/java.security.Provider$Service.newInstanceUtil(Unknown Source)

    at java.base/java.security.Provider$Service.newInstance(Unknown Source)

    at java.base/java.security.Signature.isSpi(Unknown Source)

    at java.base/java.security.Signature.getInstance(Unknown Source)

    at java.base/sun.security.ssl.SignatureScheme.<init>(Unknown Source)

    at java.base/sun.security.ssl.SignatureScheme.<init>(Unknown Source)

    at java.base/sun.security.ssl.SignatureScheme.<init>(Unknown Source)

    at java.base/sun.security.ssl.SignatureScheme.<init>(Unknown Source)

    at java.base/sun.security.ssl.SignatureScheme.<clinit>(Unknown Source)

    at java.base/sun.security.ssl.SSLSessionImpl.<clinit>(Unknown Source)

    at java.base/sun.security.ssl.TransportContext.<init>(Unknown Source)

    at java.base/sun.security.ssl.TransportContext.<init>(Unknown Source)

    at java.base/sun.security.ssl.SSLEngineImpl.<init>(Unknown Source)

    at java.base/sun.security.ssl.SSLEngineImpl.<init>(Unknown Source)

    at java.base/sun.security.ssl.SSLContextImpl$AbstractTLSContext.createSSLEngineImpl(Unknown Source)

    at java.base/sun.security.ssl.SSLContextImpl.engineCreateSSLEngine(Unknown Source)

    at java.base/javax.net.ssl.SSLContext.createSSLEngine(Unknown Source)

    at io.netty.handler.ssl.JdkSslContext$Defaults.init(JdkSslContext.java:108)

    at io.netty.handler.ssl.JdkSslContext.<clinit>(JdkSslContext.java:74)

    at io.netty.handler.ssl.SslContext.newClientContextInternal(SslContext.java:832)

    at io.netty.handler.ssl.SslContextBuilder.build(SslContextBuilder.java:648)

    at reactor.netty.tcp.AbstractProtocolSslContextSpec.sslContext(AbstractProtocolSslContextSpec.java:53)

    at reactor.netty.tcp.SslProvider.<init>(SslProvider.java:384)

    at reactor.netty.tcp.SslProvider$Build.build(SslProvider.java:785)

    at reactor.netty.http.client.HttpClient.secure(HttpClient.java:1431)

    at me.itzg.helpers.http.SharedFetch.<init>(SharedFetch.java:71)

    at me.itzg.helpers.http.Fetch.sharedFetch(Fetch.java:21)

    at me.itzg.helpers.curseforge.CurseForgeApiClient.<init>(CurseForgeApiClient.java:59)

    at me.itzg.helpers.curseforge.CurseForgeInstaller.install(CurseForgeInstaller.java:212)

    at me.itzg.helpers.curseforge.CurseForgeInstaller.install(CurseForgeInstaller.java:182)

    at me.itzg.helpers.curseforge.InstallCurseForgeCommand.call(InstallCurseForgeCommand.java:213)

    at me.itzg.helpers.curseforge.InstallCurseForgeCommand.call(InstallCurseForgeCommand.java:29)

    at picocli.CommandLine.executeUserObject(CommandLine.java:2045)

    at picocli.CommandLine.access$1500(CommandLine.java:148)

    at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2465)

    at picocli.CommandLine$RunLast.handle(CommandLine.java:2457)

    at picocli.CommandLine$RunLast.handle(CommandLine.java:2419)

    at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2277)

    at picocli.CommandLine$RunLast.execute(CommandLine.java:2421)

    at picocli.CommandLine.execute(CommandLine.java:2174)

    at me.itzg.helpers.McImageHelper.main(McImageHelper.java:159)

[init] ERROR failed to auto-install CurseForge modpack
EmilyxFox commented 1 month ago

I don't know if you're allowed to mix and match the environment variable syntax. Try fixing that to see if that's the issue

CF_SLUG: "all-the-mods-9-to-the-sky"
CF_API_KEY="-------" #mismatch
albinmedoc commented 1 month ago

I don't know if you're allowed to mix and match the environment variable syntax. Try fixing that to see if that's the issue

CF_SLUG: "all-the-mods-9-to-the-sky"
CF_API_KEY="-------" #mismatch

Ohh, sorry. I'm using portainer and some environment variables are loaded from the UI using below:

env_file:
      - stack.env

Those environment variables with '=' I added in the issue just to make it more clear. But I should have added them with ':'

albinmedoc commented 1 month ago

I have found a fix. By using the stable-tag the server starts up. I thought the latest also were stable

So by changing the image to itzg/minecraft-server:stable it's now working.

itzg commented 1 month ago

I thought the latest also were stable

Yes they are. The stable is simply the most recently tagged version of the image.

Given such a strange, low-level JDK error my only theory is that the image became corrupted. Deleting and re-pulling the latest image might also fix it.