felixklauke / paper-docker

PaperSpigot Docker. Easy to use and clean docker image for running paper spigot servers in docker containers using OpenJDK. WIP
https://www.felix-klauke.com
MIT License
55 stars 29 forks source link

container exits on stops/restarts #50

Closed mbravorus closed 4 years ago

mbravorus commented 4 years ago

Describe the bug

When attempting to stop or restart the server, container exits

To Reproduce Steps to reproduce the behavior:

  1. launch the server with recommended docker run command
  2. wait until server finishes starting up
  3. enter a stop or even better, a restart command
  4. See error:
restart
[12:49:07 INFO]: Startup script './start.sh' does not exist! Stopping server.
[12:49:07 INFO]: Stopping server
[12:49:07 INFO]: Saving players
[12:49:07 INFO]: Saving worlds
[12:49:07 INFO]: Saving chunks for level 'world'/minecraft:overworld
[12:49:08 INFO]: ThreadedAnvilChunkStorage (world): All chunks are saved
[12:49:08 INFO]: Saving chunks for level 'world_nether'/minecraft:the_nether
[12:49:08 INFO]: ThreadedAnvilChunkStorage (DIM-1): All chunks are saved
[12:49:08 INFO]: Saving chunks for level 'world_the_end'/minecraft:the_end
[12:49:08 INFO]: ThreadedAnvilChunkStorage (DIM1): All chunks are saved
[12:49:08 INFO]: ThreadedAnvilChunkStorage (world): All chunks are saved
[12:49:08 INFO]: ThreadedAnvilChunkStorage (DIM-1): All chunks are saved
[12:49:09 INFO]: ThreadedAnvilChunkStorage (DIM1): All chunks are saved
./docker-entrypoint.sh: line 16: exec: serve: not found

Expected behavior Expected behaviour is for server to restart

Additional context FWIW, this is happening on Debian 10 but I don't think it's relevant. I can see two parts here. About start.sh I'm not sure where that is coming from. But about serve not found I'm pretty sure that's because you use CMD+ENTRYPOINT format and thus $@ doesn't contain the name of the script itself, only the serve parameter.

Can we fix this, because otherwise a simple thing such as a server restart becomes quite involved?

mbravorus commented 4 years ago

ok, the line about start.sh not found is coming from default spigot config, so we can ignore that, but the main point remains

Azratosh commented 4 years ago

See #54 for a fix.