[SPIGOT-7465] Fresh installations print NoSuchFileException for server.properties Created: 22/Aug/23  Updated: 25/Dec/24  Resolved: 22/Aug/23

Status: Resolved
Project: Spigot
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: mfnalex Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None

Version: CraftBukkit version 3857-Spigot-94e187b-8ef7afe (MC: 1.20.1) (Implementing API version 1.20.1-R0.1-SNAPSHOT)
Guidelines Read: Yes

 Description   

When starting the server for the first time, it prints a stacktrace about server.properties not existing (albeit it creates that file just fine afterwards), which is a bit weird as the file is expected to not exist on first run.

 

minecraft@gameservers-cli:~/servers/lobby$ rm server.properties eula.txt 
minecraft@gameservers-cli:~/servers/lobby$ ./start.sh 
Unbundling libraries to /home/minecraft/servers/lobby/bundler
Starting server
Loading libraries, please wait...
[10:39:25] [ServerMain/ERROR]: Failed to load properties from file: server.properties
java.nio.file.NoSuchFileException: server.properties
        at sun.nio.fs.UnixException.translateToIOException(UnixException.java:92) ~[?:?]
        at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106) ~[?:?]
        at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111) ~[?:?]
        at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:218) ~[?:?]
        at java.nio.file.Files.newByteChannel(Files.java:380) ~[?:?]
        at java.nio.file.Files.newByteChannel(Files.java:432) ~[?:?]
        at java.nio.file.spi.FileSystemProvider.newInputStream(FileSystemProvider.java:422) ~[?:?]
        at java.nio.file.Files.newInputStream(Files.java:160) ~[?:?]
        at net.minecraft.server.dedicated.PropertyManager.b(PropertyManager.java:56) ~[spigot-1.20.1-R0.1-SNAPSHOT.jar:3857-Spigot-94e187b-8ef7afe]
        at net.minecraft.server.dedicated.DedicatedServerProperties.fromFile(DedicatedServerProperties.java:172) ~[spigot-1.20.1-R0.1-SNAPSHOT.jar:3857-Spigot-94e187b-8ef7afe]
        at net.minecraft.server.dedicated.DedicatedServerSettings.<init>(DedicatedServerSettings.java:19) ~[spigot-1.20.1-R0.1-SNAPSHOT.jar:3857-Spigot-94e187b-8ef7afe]
        at net.minecraft.server.Main.main(Main.java:131) ~[spigot-1.20.1-R0.1-SNAPSHOT.jar:3857-Spigot-94e187b-8ef7afe]
        at org.bukkit.craftbukkit.Main.main(Main.java:225) ~[spigot-1.20.1-R0.1-SNAPSHOT.jar:3857-Spigot-94e187b-8ef7afe]
        at org.bukkit.craftbukkit.bootstrap.Main.lambda$1(Main.java:60) ~[spigot-1.20.1.jar:?]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]
[10:39:25] [ServerMain/WARN]: Failed to load eula.txt
[10:39:25] [ServerMain/INFO]: You need to agree to the EULA in order to run the server. Go to eula.txt for more info.
minecraft@gameservers-cli:~/servers/lobby$ 

Note: This also happens on vanilla. Hence I've also reported this to Mojang but don't expect them to fix this until 1.20.2 or 1.21, that's why I think fixing this in Spigot would be a good idea until then: https://bugs.mojang.com/browse/MC-264979


Generated at Sat Dec 13 11:43:35 UTC 2025 using Jira 10.3.13#10030013-sha1:56dd970ae30ebfeda3a697d25be1f6388b68a422.