GameServerManagers / LinuxGSM

The command-line tool for quick, simple deployment and management of Linux dedicated game servers.
https://linuxgsm.com
MIT License
4.31k stars 820 forks source link

[Bug]: PaperMC: Cant downgrade to 1.20, Java crashes with "NumberFormatException: For input string "default" #4436

Open Elekam opened 10 months ago

Elekam commented 10 months ago

User story

I want to run a PaperMC server with version 1.20

Game

PaperMC

Linux distro

Ubuntu 22.04

Command

command: start

Further information

The server works fine when running "mcversion=1.20.4", but when I change it to "1.20", the server/java crashes on startup with the following error "java.lang.NumberFormatException: For input string: "default"".

I found the "level-type=default" setting in my server.properties and changed it to "minecraft:normal" like it says on the PaperMC website.

My server.properties file is attached. server.properties.txt

Relevant log output

[23:48:43] [ServerMain/INFO]: Environment: authHost='https://authserver.mojang.com', accountsHost='https://api.mojang.com', sessionHost='https://sessionserver.mojang.com', servicesHost='https://api.minecraftservices.com', name='PROD'
[23:48:43] [ServerMain/INFO]: Loaded 7 recipes
[23:48:43] [Server thread/INFO]: Starting minecraft server version 1.20
[23:48:43] [Server thread/INFO]: Loading properties
[23:48:43] [Server thread/INFO]: This server is running Paper version git-Paper-17 (MC: 1.20) (Implementing API version 1.20-R0.1-SNAPSHOT) (Git: c287e92)
[23:48:43] [Server thread/INFO]: Server Ping Player Sample Count: 12
[23:48:43] [Server thread/INFO]: Using 4 threads for Netty based IO
[23:48:44] [Server thread/WARN]: [!] The timings profiler has been enabled but has been scheduled for removal from Paper in the future.
    We recommend installing the spark profiler as a replacement: https://spark.lucko.me/
    For more information please visit: https://github.com/PaperMC/Paper/issues/8948
[23:48:44] [Server thread/INFO]: [ChunkTaskScheduler] Chunk system is using 1 I/O threads, 5 worker threads, and gen parallelism of 5 threads
[23:48:44] [Server thread/ERROR]: Encountered an unexpected exception
org.spongepowered.configurate.serialize.SerializationException: [entities, spawning, monster-spawn-max-light-level] of type java.lang.Integer: java.lang.NumberFormatException: For input string: "default"
    at org.spongepowered.configurate.serialize.NumericSerializers.parseNumber(NumericSerializers.java:346) ~[configurate-core-4.1.2.jar:?]
    at org.spongepowered.configurate.serialize.NumericSerializers.lambda$static$9(NumericSerializers.java:254) ~[configurate-core-4.1.2.jar:?]
    at org.spongepowered.configurate.serialize.FunctionScalarSerializer.deserialize(FunctionScalarSerializer.java:40) ~[configurate-core-4.1.2.jar:?]
    at org.spongepowered.configurate.serialize.ScalarSerializer.deserialize(ScalarSerializer.java:115) ~[configurate-core-4.1.2.jar:?]
    at org.spongepowered.configurate.objectmapping.ObjectMapperImpl.load0(ObjectMapperImpl.java:64) ~[configurate-core-4.1.2.jar:?]
    at org.spongepowered.configurate.objectmapping.ObjectMapperImpl.load(ObjectMapperImpl.java:48) ~[configurate-core-4.1.2.jar:?]
    at org.spongepowered.configurate.objectmapping.ObjectMapperFactoryImpl.deserialize(ObjectMapperFactoryImpl.java:204) ~[configurate-core-4.1.2.jar:?]
    at org.spongepowered.configurate.objectmapping.ObjectMapperImpl.load0(ObjectMapperImpl.java:64) ~[configurate-core-4.1.2.jar:?]
    at org.spongepowered.configurate.objectmapping.ObjectMapperImpl.load(ObjectMapperImpl.java:48) ~[configurate-core-4.1.2.jar:?]
    at org.spongepowered.configurate.objectmapping.ObjectMapperFactoryImpl.deserialize(ObjectMapperFactoryImpl.java:204) ~[configurate-core-4.1.2.jar:?]
    at org.spongepowered.configurate.objectmapping.ObjectMapperImpl.load0(ObjectMapperImpl.java:64) ~[configurate-core-4.1.2.jar:?]
    at org.spongepowered.configurate.objectmapping.ObjectMapperImpl.load(ObjectMapperImpl.java:48) ~[configurate-core-4.1.2.jar:?]
    at org.spongepowered.configurate.objectmapping.ObjectMapperFactoryImpl.deserialize(ObjectMapperFactoryImpl.java:204) ~[configurate-core-4.1.2.jar:?]
    at org.spongepowered.configurate.AbstractConfigurationNode.get(AbstractConfigurationNode.java:151) ~[configurate-core-4.1.2.jar:?]
    at org.spongepowered.configurate.ConfigurationNode.get(ConfigurationNode.java:520) ~[configurate-core-4.1.2.jar:?]
    at org.spongepowered.configurate.ConfigurationNode.require(ConfigurationNode.java:407) ~[configurate-core-4.1.2.jar:?]
    at io.papermc.paper.configuration.Configurations.initializeWorldDefaultsConfiguration(Configurations.java:154) ~[paper-1.20.jar:git-Paper-17]
    at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:210) ~[paper-1.20.jar:git-Paper-17]
    at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1101) ~[paper-1.20.jar:git-Paper-17]
    at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:318) ~[paper-1.20.jar:git-Paper-17]
    at java.lang.Thread.run(Thread.java:840) ~[?:?]
    Suppressed: org.spongepowered.configurate.serialize.SerializationException: [entities, behavior, zombie-villager-infection-chance] of type java.lang.Double: java.lang.NumberFormatException: For input string: "default"
        at org.spongepowered.configurate.serialize.NumericSerializers.lambda$static$3(NumericSerializers.java:144) ~[configurate-core-4.1.2.jar:?]
        at org.spongepowered.configurate.serialize.FunctionScalarSerializer.deserialize(FunctionScalarSerializer.java:40) ~[configurate-core-4.1.2.jar:?]
        at org.spongepowered.configurate.serialize.ScalarSerializer.deserialize(ScalarSerializer.java:115) ~[configurate-core-4.1.2.jar:?]
        at org.spongepowered.configurate.objectmapping.ObjectMapperImpl.load0(ObjectMapperImpl.java:64) ~[configurate-core-4.1.2.jar:?]
        at org.spongepowered.configurate.objectmapping.ObjectMapperImpl.load(ObjectMapperImpl.java:48) ~[configurate-core-4.1.2.jar:?]
        at org.spongepowered.configurate.objectmapping.ObjectMapperFactoryImpl.deserialize(ObjectMapperFactoryImpl.java:204) ~[configurate-core-4.1.2.jar:?]
        at org.spongepowered.configurate.objectmapping.ObjectMapperImpl.load0(ObjectMapperImpl.java:64) ~[configurate-core-4.1.2.jar:?]
        at org.spongepowered.configurate.objectmapping.ObjectMapperImpl.load(ObjectMapperImpl.java:48) ~[configurate-core-4.1.2.jar:?]
        at org.spongepowered.configurate.objectmapping.ObjectMapperFactoryImpl.deserialize(ObjectMapperFactoryImpl.java:204) ~[configurate-core-4.1.2.jar:?]
        at org.spongepowered.configurate.objectmapping.ObjectMapperImpl.load0(ObjectMapperImpl.java:64) ~[configurate-core-4.1.2.jar:?]
        at org.spongepowered.configurate.objectmapping.ObjectMapperImpl.load(ObjectMapperImpl.java:48) ~[configurate-core-4.1.2.jar:?]
        at org.spongepowered.configurate.objectmapping.ObjectMapperFactoryImpl.deserialize(ObjectMapperFactoryImpl.java:204) ~[configurate-core-4.1.2.jar:?]
        at org.spongepowered.configurate.AbstractConfigurationNode.get(AbstractConfigurationNode.java:151) ~[configurate-core-4.1.2.jar:?]
        at org.spongepowered.configurate.ConfigurationNode.get(ConfigurationNode.java:520) ~[configurate-core-4.1.2.jar:?]
        at org.spongepowered.configurate.ConfigurationNode.require(ConfigurationNode.java:407) ~[configurate-core-4.1.2.jar:?]
        at io.papermc.paper.configuration.Configurations.initializeWorldDefaultsConfiguration(Configurations.java:154) ~[paper-1.20.jar:git-Paper-17]
        at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:210) ~[paper-1.20.jar:git-Paper-17]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1101) ~[paper-1.20.jar:git-Paper-17]
        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:318) ~[paper-1.20.jar:git-Paper-17]
        at java.lang.Thread.run(Thread.java:840) ~[?:?]
    Caused by: java.lang.NumberFormatException: For input string: "default"
        at jdk.internal.math.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2054) ~[?:?]
        at jdk.internal.math.FloatingDecimal.parseDouble(FloatingDecimal.java:110) ~[?:?]
        at java.lang.Double.parseDouble(Double.java:651) ~[?:?]
        at org.spongepowered.configurate.serialize.NumericSerializers.lambda$static$3(NumericSerializers.java:142) ~[configurate-core-4.1.2.jar:?]
        ... 19 more
Caused by: java.lang.NumberFormatException: For input string: "default"
    at java.lang.NumberFormatException.forInputString(NumberFormatException.java:67) ~[?:?]
    at java.lang.Integer.parseInt(Integer.java:668) ~[?:?]
    at org.spongepowered.configurate.serialize.NumericSerializers.parseNumber(NumericSerializers.java:344) ~[configurate-core-4.1.2.jar:?]
    ... 20 more
[23:48:44] [Server thread/ERROR]:   Cause of unexpected exception was
java.lang.NumberFormatException: For input string: "default"
    at java.lang.NumberFormatException.forInputString(NumberFormatException.java:67) ~[?:?]
    at java.lang.Integer.parseInt(Integer.java:668) ~[?:?]
    at org.spongepowered.configurate.serialize.NumericSerializers.parseNumber(NumericSerializers.java:344) ~[configurate-core-4.1.2.jar:?]
    at org.spongepowered.configurate.serialize.NumericSerializers.lambda$static$9(NumericSerializers.java:254) ~[configurate-core-4.1.2.jar:?]
    at org.spongepowered.configurate.serialize.FunctionScalarSerializer.deserialize(FunctionScalarSerializer.java:40) ~[configurate-core-4.1.2.jar:?]
    at org.spongepowered.configurate.serialize.ScalarSerializer.deserialize(ScalarSerializer.java:115) ~[configurate-core-4.1.2.jar:?]
    at org.spongepowered.configurate.objectmapping.ObjectMapperImpl.load0(ObjectMapperImpl.java:64) ~[configurate-core-4.1.2.jar:?]
    at org.spongepowered.configurate.objectmapping.ObjectMapperImpl.load(ObjectMapperImpl.java:48) ~[configurate-core-4.1.2.jar:?]
    at org.spongepowered.configurate.objectmapping.ObjectMapperFactoryImpl.deserialize(ObjectMapperFactoryImpl.java:204) ~[configurate-core-4.1.2.jar:?]
    at org.spongepowered.configurate.objectmapping.ObjectMapperImpl.load0(ObjectMapperImpl.java:64) ~[configurate-core-4.1.2.jar:?]
    at org.spongepowered.configurate.objectmapping.ObjectMapperImpl.load(ObjectMapperImpl.java:48) ~[configurate-core-4.1.2.jar:?]
    at org.spongepowered.configurate.objectmapping.ObjectMapperFactoryImpl.deserialize(ObjectMapperFactoryImpl.java:204) ~[configurate-core-4.1.2.jar:?]
    at org.spongepowered.configurate.objectmapping.ObjectMapperImpl.load0(ObjectMapperImpl.java:64) ~[configurate-core-4.1.2.jar:?]
    at org.spongepowered.configurate.objectmapping.ObjectMapperImpl.load(ObjectMapperImpl.java:48) ~[configurate-core-4.1.2.jar:?]
    at org.spongepowered.configurate.objectmapping.ObjectMapperFactoryImpl.deserialize(ObjectMapperFactoryImpl.java:204) ~[configurate-core-4.1.2.jar:?]
    at org.spongepowered.configurate.AbstractConfigurationNode.get(AbstractConfigurationNode.java:151) ~[configurate-core-4.1.2.jar:?]
    at org.spongepowered.configurate.ConfigurationNode.get(ConfigurationNode.java:520) ~[configurate-core-4.1.2.jar:?]
    at org.spongepowered.configurate.ConfigurationNode.require(ConfigurationNode.java:407) ~[configurate-core-4.1.2.jar:?]
    at io.papermc.paper.configuration.Configurations.initializeWorldDefaultsConfiguration(Configurations.java:154) ~[paper-1.20.jar:git-Paper-17]
    at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:210) ~[paper-1.20.jar:git-Paper-17]
    at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1101) ~[paper-1.20.jar:git-Paper-17]
    at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:318) ~[paper-1.20.jar:git-Paper-17]
    at java.lang.Thread.run(Thread.java:840) ~[?:?]
[23:48:44] [Server thread/ERROR]: This crash report has been saved to: /home/pmcserver/serverfiles/./crash-reports/crash-2024-01-03_23.48.44-server.txt
[23:48:44] [Server thread/INFO]: Stopping server
[23:48:44] [Server thread/INFO]: Saving players
[23:48:44] [Server thread/INFO]: Saving worlds
[23:48:44] [Server thread/INFO]: ThreadedAnvilChunkStorage: All dimensions are saved
[23:48:44] [Server thread/INFO]: Flushing Chunk IO
[23:48:44] [Server thread/INFO]: Closing Thread Pool
[23:48:44] [Server thread/INFO]: Closing Server

Steps to reproduce

  1. Run a PaperMC 1.20.4 server
  2. Add "mcserver=1.20" to the pmcserver.cfg
  3. Reinstall with ./pmcserver install
  4. Start the server
  5. Crash
LoudStank commented 5 months ago

has this been fixed? i also need to run a 1.20 server

h3o66 commented 5 months ago

this was not fixed yet. Does someone know what version does change this ?

ref to the config what is used: https://github.com/GameServerManagers/Game-Server-Configs/blob/main/pmc/server.properties

I can change this, but we cannot change easily existing installations.

h3o66 commented 5 months ago

should be fixed now with NEW installations at least: https://github.com/GameServerManagers/Game-Server-Configs/commit/aed9c46837540dfec588ec3abf91d0420321eb82