itzg / minecraft-server-charts

MIT License
279 stars 143 forks source link

Java error when launching FTB Sky Odyssey #66

Open cclloyd opened 3 years ago

cclloyd commented 3 years ago

I'm having an issue starting a new server for FTB Sky Odyssey

K8s version: 1.20.4: Host version: Ubuntu 20.04

chmod: changing permissions of '/data': Operation not permitted
[init] Running as uid=1000 gid=1000 with /data as 'drwxrwxrwx 8 0 0 4096 Apr 15 01:13 /data'
[init] Resolved version given 1.12.2 into 1.12.2
[init] Resolving type given FTBA
[init] FTB modpack ID 8, version ID 142 is ready to go
[init] server.properties already created, skipping
[init] Updating ops
[init] Checking for JSON files.
[init] Setting initial memory to 8192M and max to 8192M
[init] Starting the Minecraft server...
A problem occurred running the Server launcher.java.lang.reflect.InvocationTargetException
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.base/java.lang.reflect.Method.invoke(Unknown Source)
    at net.minecraftforge.fml.relauncher.ServerLaunchWrapper.run(ServerLaunchWrapper.java:70)
    at net.minecraftforge.fml.relauncher.ServerLaunchWrapper.main(ServerLaunchWrapper.java:34)
Caused by: java.lang.ClassCastException: class jdk.internal.loader.ClassLoaders$AppClassLoader cannot be cast to class java.net.URLClassLoader (jdk.internal.loader.ClassLoaders$AppClassLoader and java.net.URLClassLoader are in module java.base of loader 'bootstrap')
    at net.minecraft.launchwrapper.Launch.<init>(Launch.java:34)
    at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
    ... 6 more
2021-04-15T01:18:00.696Z    WARN    mc-server-runner    sub-process failed  {"exitCode": 1}
2021-04-15T01:18:00.697Z    INFO    mc-server-runner    Done

I don't know why its listing that /data permissions error, as the directory has 777 permissions and seems to have populated it just fine. Either way, the server spits out that error and get stuck in CrashLoopBackOff.

Values.yml

ref: https://hub.docker.com/r/itzg/minecraft-server/

image: itzg/minecraft-server
imageTag: multiarch
strategyType: Recreate

resources:
  requests:
    memory: 8192Mi
    cpu: 500m

livenessProbe: {}
readinessProbe: {}

extraEnv:
  FTB_MODPACK_ID: 8
  FTB_MODPACK_VERSION_ID: 142

minecraftServer:
  eula: "TRUE"
  # One of: LATEST, SNAPSHOT, or a specific version (ie: "1.7.9").
  version: "1.12.2"
  # This can be one of "VANILLA", "FORGE", "SPIGOT", "BUKKIT", "PAPER", "FTB", "SPONGEVANILLA"
  type: "FTBA"
  # One of: peaceful, easy, normal, and hard
  difficulty: normal
  # A comma-separated list of player names to whitelist.
  whitelist:
  # A comma-separated list of player names who should be admins.
  ops: cclloyd
  # A server icon URL for server listings. Auto-scaled and transcoded.
  icon:
  maxPlayers: 10
  maxWorldSize: 10000000
  allowNether: true
  announcePlayerAchievements: true
  enableCommandBlock: true
  forcegameMode: false
  generateStructures: true
  hardcore: false
  maxBuildHeight: 256
  # The maximum number of milliseconds a single tick may take before the server watchdog stops the server with the message. -1 disables this entirely.
  maxTickTime: 120000
  spawnAnimals: true
  spawnMonsters: true
  spawnNPCs: true
  # Max view distance (in chunks).
  viewDistance: 18
  # One of: creative, survival, adventure, spectator
  gameMode: survival
  # Message of the Day
  motd: "Sky Odyssey for Casual Try-Hards"
  pvp: true
  # One of: DEFAULT, FLAT, LARGEBIOMES, AMPLIFIED, CUSTOMIZED
  levelType: voidworld
  worldSaveName: world
  # If you adjust this, you may need to adjust resources.requests above to match.
  memory: 8192M
  # General JVM options to be passed to the Minecraft server invocation
  jvmOpts: ""
  # Options like -X that need to proceed general JVM options
  jvmXXOpts: ""

  rcon:
    enabled: false
  query:
    enabled: false

  serviceAnnotations:
    metallb.universe.tf/address-pool: default
  serviceType: LoadBalancer

persistence:
  storageClass: "nfsssd"
  dataDir:
    enabled: true
    Size: 8Gi
itzg commented 3 years ago

Yeah, the chmod error can be safely ignored since you did 777 permissions.

Forge and especially modpacks tend to need Java 8 so try this for the image tag:

imageTag: multiarch-java8
cclloyd commented 3 years ago

Yup that worked, but the image tag is actually java8-multiarch. You might want to put that in the documentation somewhere that many FTBA type servers require either multiarch or java8-multiarch to avoid confusion in the future.

itzg commented 3 years ago

Oops, was typing that from memory. There's a message buried in the logs, but good point that I should clarify that here

https://github.com/itzg/docker-minecraft-server#running-a-server-with-a-feed-the-beast-modpack