Hello all,
If I have setup my signature correctly my NAS box specs should appear, but I am using TrueNAS Scale 24.10.2 Electric eel for reference.
Context:
I’d like to do many things with my NAS, but one main goal is to host a minecraft game server for my friends. I found a docker container app that lets me run modded Minecraft servers using docker. To run this app, I setup a docker compose script inside of a TrueNAS Portainer app. I am using this to run vanilla (unmodified) and modded Minecraft servers.
The problem:
The vanilla game server works perfectly, but there are some regular cases in which the modded game server will crash (I’m not all that surprised by this part). Where I start getting lost though is that Portainer is unable to stop and restart the game server container.
From what I can gather online (I am new to NAS stuff, docker, portainer, etc.) it seems that I should expect a container that receives a stop command to stop gracefully, and anything that doesn’t acknowledge the stop command in a certain timeout period gets given a kill command.
What appears to happen is that a stop command is not obeyed by the container, and when I try to send the container kill command manually via portainer, everything in the portainer hangs (even other stacks/containers) and the TrueNAS WebUI Apps page refuses to display any apps (it should have shown me running instances of Portainer, Emby, and Pi-Hole).
I end up restarting my NAS box with the TrueNAS power>restart menu and everything loads up fine, but of course this is not a real long-term solution.
Obviously I cannot provide instructions to reproduce the error to a seemingly random crash, but I don’t really know how to locate any logfiles that would help me (or any of you helpful forum members) to figure out what went wrong and fix it.
Ideal outcome:
I figure out with your help, how to isolate the modded Minecraft server crashing so that I can restart the game server without having to restart the NAS itself.
Logs that I could find:
On the Apps page, the portainer app didn’t have any logs from the time of the Minecraft game server crash or any logs suggesting that I had tried to use a kill command on an unresponsive container.
Logs from Emby app after I tried to kill the modded minecraft server docker (I think these were captured when I sent the NAS box the restart/halt signal using the TrueNAS WebUI):
2025-02-09 09:27:47.366601+00:00s6-svscanctl: fatal: unable to control /var/run/s6/services: supervisor not listening
2025-02-09 09:27:47.448551+00:00[cont-finish.d] executing container finish scripts...
2025-02-09 09:27:47.486820+00:00[cont-finish.d] done.
2025-02-09 09:27:47.487234+00:00[s6-finish] waiting for services.
2025-02-09 09:27:47.727564+00:00[s6-finish] sending all processes the TERM signal.
2025-02-09 09:27:50.746772+00:00[s6-finish] sending all processes the KILL signal and exiting.
The last entry into the Minecraft server logs inside the docker (from presumably when the game server crash occurred) are an error message says (I don’t think this is helpful for fixing my issue but it’s here anyway):
[08:23:25] [Worker-Main-130/ERROR] [minecraft/StructureTemplateManager]: Couldn't load structure mvs:nature/big_oak_tree
net.minecraft.nbt.ReportedNbtException: Loading NBT data
(... imagine an incomprehensible, long, not-very-readable java traceback message and no further log entries from hereon.)
Thanks in advance for any advice!