GameServerManagers / docker-gameserver

Dockerised Game Servers using LinuxGSM
MIT License
199 stars 21 forks source link

mcserver docker-compose (java version too old) #69

Open Linuxy95 opened 6 months ago

Linuxy95 commented 6 months ago

Unfortunately the java version is too old!

[ FAIL ] Starting mcserver: Unable to start LinuxGSM

Tail log files
=================================
==> /data/log/console/mcserver-console.log <==
Error: LinkageError occurred while loading main class net.minecraft.bundler.Main
    java.lang.UnsupportedClassVersionError: net/minecraft/bundler/Main has been compiled by a more recent version of the Java Runtime (class file version 65.0), this version of the Java Runtime only recognizes class file versions up to 61.0
==> /data/log/script/mcserver-script.log <==
May 05 07:33:56.650 mcserver: START: FATAL: Unable to start LinuxGSM
May 05 07:33:56.659 mcserver: START: INFO: LinuxGSM version: v24.2.0
May 05 07:33:56.661 mcserver: START: FATAL: core_exit.sh exiting with code: 1
May 05 07:34:02.086 mcserver: DETAILS: PASS: Using cached IP as public IP address
May 05 07:34:02.413 mcserver: DETAILS: PASS: Using cached IP as public IP address
tail: cannot open '/data/log/console/*script.log' for reading: No such file or directory
tail: cannot open '/data/log/script/*console.log' for reading: No such file or directory
May 05 07:34:02.586 mcserver: DETAILS: INFO: LinuxGSM version: v24.2.0
May 05 07:34:02.588 mcserver: DETAILS: PASS: core_exit.sh exiting with code: 0
May 05 07:34:48.499 mcserver: MONITOR: PASS: Using cached IP as public IP address
May 05 07:34:48.674 mcserver: MONITOR: PASS: Using cached IP as public IP address
May 05 07:34:50.268 mcserver: MONITOR: INFO: Checking session: CHECKING
May 05 07:34:50.486 mcserver: MONITOR: FATAL: Checking session: FAIL
May 05 07:34:50.492 mcserver: MONITOR: INFO: Sending alert: mcserver is not running. Game server has been restarted
May 05 07:34:50.686 mcserver: MONITOR: PASS: Using cached IP as public IP address
May 05 07:34:51.425 mcserver: MONITOR: INFO: Checking session: Monitor is restarting mcserver
May 05 07:34:51.477 mcserver: RESTART: PASS: Using cached IP as public IP address
May 05 07:34:52.171 mcserver: STOP: PASS: Using cached IP as public IP address
May 05 07:34:52.826 mcserver: STOP: PASS: Using cached IP as public IP address
May 05 07:34:53.009 mcserver: STOP: INFO: LinuxGSM is already stopped
May 05 07:34:54.164 mcserver: START: PASS: Checking ubuntu-22.04.csv
May 05 07:34:54.410 mcserver: START: PASS: Using cached IP as public IP address
May 05 07:34:54.788 mcserver: START: PASS: Using cached IP as public IP address
May 05 07:34:55.400 mcserver: START: INFO: Rotating log files
tail: '/data/log/script/mcserver-script.log' has become inaccessible: No such file or directory
tail: '/data/log/console/mcserver-console.log' has become inaccessible: No such file or directory
tail: '/data/log/console/mcserver-console.log' has appeared;  following new file
==> /data/log/console/mcserver-console.log <==
Error: LinkageError occurred while loading main class net.minecraft.bundler.Main
    java.lang.UnsupportedClassVersionError: net/minecraft/bundler/Main has been compiled by a more recent version of the Java Runtime (class file version 65.0), this version of the Java Runtime only recognizes class file versions up to 61.0
tail: '/data/log/script/mcserver-script.log' has appeared;  following new file
==> /data/log/script/mcserver-script.log <==
May 05 07:34:56.558 mcserver: START: FATAL: Unable to start LinuxGSM
May 05 07:34:56.581 mcserver: START: INFO: LinuxGSM version: v24.2.0
May 05 07:34:56.584 mcserver: START: FATAL: core_exit.sh exiting with code: 1
version: "3.8"
services:
  linuxgsm-mc-volume:
    image: gameservermanagers/gameserver:mc
    container_name: mcserver
    restart: unless-stopped
    volumes:
      - linuxgsm-mc:/data
    ports:
      - "25565:25565"

volumes:
  linuxgsm-mc:
dgibbs64 commented 6 months ago

thanks. I will get this fixed

dgibbs64 commented 6 months ago

Do we know which version of java is now required?

Linuxy95 commented 6 months ago

https://minecraft.fandom.com/wiki/Tutorials/Update_Java#:~:text=From%20Java%20Edition%201.17(21w19a,requires%20Java%2017%20or%20newer.

dgibbs64 commented 6 months ago

The installed version if Java on Ubuntu 22.04 is build 17.0.10+7-Ubuntu-122.04.1 which should be supported. I am also getting the issue. Maybe Mojang has bumped the java version or compiled the build wrong...

PlayMTL commented 6 months ago

I think it need to be Java 21. We also have a PR on non docker images: https://github.com/GameServerManagers/LinuxGSM/pull/4562

Linuxy95 commented 6 months ago

https://docs.mcserversoft.com/advanced/java-version

dgibbs64 commented 6 months ago

@PlayMTL Once that PR has all the distros updated that will hopfully fix the issue

Linuxy95 commented 6 months ago

image

MicLieg commented 6 months ago

@PlayMTL Once that PR has all the distros updated that will hopfully fix the issue

I don't think all distros support Java 21 by default, and i'm unsure how to verify this efficiently.

Linuxy95 commented 6 months ago

@PlayMTL Once that PR has all the distros updated that will hopfully fix the issue

I don't think all distros support Java 21 by default, and i'm unsure how to verify this efficiently.

How long does it take for ubuntu 22.04? I can create the MC server.

dgibbs64 commented 6 months ago

@MicLieg https://pkgs.org/ is a good site to find out 👍🏻