docker-minecraft-server icon indicating copy to clipboard operation
docker-minecraft-server copied to clipboard

modrinth pull - java won't start

Open SirBastol opened this issue 1 year ago • 4 comments

Describe the problem

fresh docker install - using portioner to push it as a stack ( it just launches the yml with a web editor) sometimes fails because modrinth kills downloads on repeated fast try (causing missing modpacks) but the issue is java is broken

changed PID AND GID. to 0. or the docker container user.. made no diffrence

added JAVA VERSION env and it dint fix it.

and im stumped.. google the error didn't give me anything useful. ( mostly reddit users trolling noobs with rm-rf stuff)

trying to migrate the container and world to a new machine... fresh install and just copy the world folder.

can add container def to examples if you like

Container definition

version: "3.8"

networks:
  default:

services:
  Minecraft4a:
    image: itzg/minecraft-server
    hostname: mcround4
    tty: true
    stdin_open: true
    ports:
      - "25565:25565"
      - "8123:8100"
      - "8100:8100"
    environment:
      MOD_PLATFORM: MODRINTH
      MODRINTH_MODPACK: https://modrinth.com/modpack/hermitcreateflavors
      OVERRIDE_SERVER_PROPERTIES: TRUE
      MOTD: Respectful - do not steal ask first - friendly play
      SPAWN_PROTECTION: 0
      RCON_PORT: 25575
      TZ: America/Vancouver
      DIFFICULTY: HARD
      ALLOW_FLIGHT: TRUE
      RCON_PASSWORD: rconrodney
      PVP: TRUE
      MAX_PLAYERS: 6
      OPS: 37a79502-60ce-4115-b8d3-ddec19516c46
      MAX_TICK_TIME: 0
      EULA: TRUE
      SERVER_NAME: Hermit Create Flavors - Round4A
      JVM_OPTS: "-XX:+UseG1GC -Dsun.rmi.dgc.server.gcInterval: 600000 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:G1NewSizePercent: 20 -XX:G1ReservePercent: 20 -XX:MaxGCPauseMillis: 50 -XX:G1HeapRegionSize: 32"
      MEMORY: 4G
      REMOVE_FILES_SPEC: ._*
      LOG_LEVEL: info
    volumes:
      - /Volume1/public1/DockerStuff/Minecraft/backups:/backups:rw
      - /Volume1/public1/DockerStuff/Minecraft/mcround6:/data:rw
    restart: unless-stopped    

Container logs

[mc-image-helper] 20:39:02.981 INFO  : Modpack hermitcreateflavors version 4.1 is already installed
[mc-image-helper] 20:39:07.760 INFO  : The file ./ops.json already exists, so no changes will be made
[init] Setting initial memory to 4G and max to 4G
[init] Using Forge supplied run.sh script...
Error: Could not find or load main class 600000
Caused by: java.lang.ClassNotFoundException: 600000
2023-09-17T20:39:14.156-0700    WARN    mc-server-runner    Minecraft server failed. Inspect logs above for errors that indicate cause. DO NOT report this line as an error.    {"exitCode": 1}

SirBastol avatar Sep 18 '23 03:09 SirBastol

seems related to java options line -XX:+UseG1GC -Xmx4G -Xms4G -Dsun.rmi.dgc.server.gcInterval=600000 -XX: +UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32. seems to work better.. there was a space in the wrong place.. !!!

am testing.. need a better way to tune th settings for the memory allocated to reduce overhead on GC and determining size for install dmodpucks needed for estimated users.. and system hardware... am just guessing here... any suggestions ?

now get

error: could not load java virtual machine
error: a fatal exception error occurred. program will exit

SirBastol avatar Sep 18 '23 18:09 SirBastol

removing the jam options got it going .. this can be closed its not your problem ill figure out what options are good for the memory optimization .. stage this tho because I have a mother machine on linux that has no problem with these exact options..

this machine is windows.. so somethings diffrent

ALSO : just a thought.. is there abetter way to reduce log generations. down to show only warns and errors.. so it doesn't spam logs with all the info ..

SirBastol avatar Sep 18 '23 18:09 SirBastol

ALSO : just a thought.. is there abetter way to reduce log generations. down to show only warns and errors.. so it doesn't spam logs with all the info ..

I feel your pain especially since as a developer for 30+ years I hate useless logs. That's an issue to report to Mojang and every mod author. Their logs produce 5000 times more lines than my container startup logs.

itzg avatar Sep 18 '23 23:09 itzg

I thought that’s just how Java is. I can almost never figure out Java errors. So much big dump

On Mon, Sep 18, 2023 at 4:13 PM Geoff Bourne @.***> wrote:

ALSO : just a thought.. is there abetter way to reduce log generations. down to show only warns and errors.. so it doesn't spam logs with all the info ..

I feel your pain especially since as a developer for 30+ years I hate useless logs. That's an issue to report to Mojang and every mod author. Their logs produce 5000 times more lines than my container startup logs.

— Reply to this email directly, view it on GitHub https://github.com/itzg/docker-minecraft-server/issues/2386#issuecomment-1724588055, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQBDDOEMWZTBM6WISH7HLDX3DISDANCNFSM6AAAAAA44DDTMU . You are receiving this because you authored the thread.Message ID: @.***>

SirBastol avatar Sep 19 '23 01:09 SirBastol