PaperMC / Paperclip

Bootstrap utility and launcher for the Paper Minecraft server
MIT License
120 stars 51 forks source link

Startup fails with "mmap failed for CEN and END part of zip file" on Linux #38

Closed trwnh closed 3 years ago

trwnh commented 3 years ago

With OpenJDK 16:

[trwnh@home paper]$ java -jar paper-1.16.5-778.jar
mmap failed for CEN and END part of zip file
Exception in thread "main" java.lang.IllegalArgumentException
        at java.instrument/sun.instrument.InstrumentationImpl.appendToClassLoaderSearch0(Native Method)
        at java.instrument/sun.instrument.InstrumentationImpl.appendToSystemClassLoaderSearch(InstrumentationImpl.java:224)
        at io.papermc.paperclip.Agent.addToClassPath(Agent.java:39)
        at io.papermc.paperclip.Paperclip.getMainMethod(Paperclip.java:225)
        at io.papermc.paperclip.Paperclip.main(Paperclip.java:51)
[trwnh@home paper]$ java --version
openjdk 16.0.1 2021-04-20
OpenJDK Runtime Environment (build 16.0.1+9)
OpenJDK 64-Bit Server VM (build 16.0.1+9, mixed mode)
[trwnh@home paper]$ pwd
/storage/data/minecraft/paper
[trwnh@home paper]$

Tried switching to OpenJDK 8 and this happens:

[trwnh@home paper]$ java -jar paper-1.16.5-778.jar
mmap failed for CEN and END part of zip file
Error: An unexpected error occurred while trying to open file paper-1.16.5-778.jar
electronicboy commented 3 years ago

This looks like either a busted jar or an environment issue, I'd suggest googling that error as it turns up a good number of results

trwnh commented 3 years ago

Hmm, it seems to be FUSE-related? I can run the jar from /mnt/disk3/data/minecraft/paper, but I get the above error at /storage/data/minecraft/paper as stated. /mnt/disk3 is a regular mount, while /storage is a mergerfs mount combining /mnt/disk{1,2,3}

Wondering if there's a proper fix for this or at least a less-inconvenient workaround...

electronicboy commented 3 years ago

the error came from the JVM, not paperclip as such, this is something which would need to be taken to the relevant parties for this

DenWav commented 3 years ago

Closing as this is not an issue in paperclip.