itzg / docker-minecraft-server

Docker image that provides a Minecraft Server that will automatically download selected version at startup
https://docker-minecraft-server.readthedocs.io/
Apache License 2.0
9.49k stars 1.55k forks source link

Issue getting Paper server started, nmap failed #515

Closed Dirt-Nasty closed 2 years ago

Dirt-Nasty commented 4 years ago

Here is my start command

docker run -d -v /mnt/storage/minecraft/data:/data -e TYPE=PAPER -p 25565:25565 -e EULA=TRUE -e DEBUG_MEMORY=true --name mc itzg/minecraft-server

and I get this output in the container

[init] Checking for JSON files.

[init] Setting initial memory to 1G and max to 1G

[init] Memory usage and availability (in MB)

Linux 6b570a7992ba 4.9.0-8-amd64 #1 SMP Debian 4.9.130-2 (2018-10-27) x86_64 Linux

             total       used       free     shared    buffers     cached

Mem:         15923      10564       5359        127        687       5623

-/+ buffers/cache:       4253      11670

Swap:         3813       1546       2267

[init] Starting the Minecraft server...

mmap failed for CEN and END part of zip file

Error: An unexpected error occurred while trying to open file paper_server-1.15.2-latest.jar

2020-04-30T17:46:53.418Z    INFO    mc-server-runner    Done
itzg commented 4 years ago

It sounds like the paper_server-1.15.2-latest.jar got corrupted or failed to download all the way. Can you manually delete that file from your host directory /mnt/storage/minecraft/data and try the container again?

Dirt-Nasty commented 4 years ago

@itzg I tried and I still get the same error

44240898 Apr 30 15:15 paper_server-1.15.2-latest.jar

itzg commented 4 years ago

Doing a search for that error message, I found this solution which sounds very likely to help:

https://stackoverflow.com/a/41915139

That'll be something you adjust on the host rather than in/with the container itself.

Dirt-Nasty commented 4 years ago

@itzg I really appreciate you looking into this. I've tried that and i am still receiving the same error. Is there any prerequisites I need on the host before deploying the container?

Dirt-Nasty commented 4 years ago

@itzg I've gotten it to run fine without using a volume mapping. Can it be a permission issue?

Dirt-Nasty commented 4 years ago

@itzg in addition this also seems related https://github.com/itzg/docker-minecraft-server/issues/105 the volume path is set to a mergerfs mount. Is there anyway to use it as a path?

itzg commented 4 years ago

Are you using a mergerfs volume on your host also? I hadn't even heard of that filesystem type until the other issue you referenced, so I'm not sure how that interacts with Docker or the mmap that is used by the JVM at that point.

ddellspe commented 4 years ago

I just ran into this myself. This appears to potentially be an issue with the way that mergerfs deals with programs that need slightly different access to the data disks, you can see how to fix it here. Basically, if your mergerfs mount has direct_io you have to remove that from your mount directive (/etc/fstab)

itzg commented 4 years ago

Thanks for the info @ddellspe. That will help others that come across this issue.

iam4x commented 4 years ago

You just saved my night @ddellspe thanks <3

github-actions[bot] commented 2 years ago

This issue is stale because it has been open 30 days with no activity. Please add a comment describing the reason to keep this issue open.