mathielo / dst-dedicated-server

Don't Starve Together dedicated server guide for all platforms (Linux, Mac, Windows) with Docker. Extensive documentation covering mods installation, server config and performance, world generation and setting up admins.
MIT License
292 stars 56 forks source link

dst_master exited with code 6 #19

Open JY-Zhou opened 5 years ago

JY-Zhou commented 5 years ago

I always get this in the docker log

dst_master    | [00:00:07]: [CRITICAL] Failed to save file: /home/dst/.klei//DoNotStarveTogether/DSTWhalesCluster/Master/save/saveindex
dst_master    | [00:00:07]: [CRITICAL] Fingerprint:lhrjsjvnukdggkfltioqfhgigfnnnpeipdjlioijlhrjsjvnikdggkflhhoqfhgipgnnnpeijhjlioijkhrjsjvnxkdggkfluioqfhgiofnnnpeiddjlioijlhrjsjvntodggkflmkoqfhgiefnnnpeiifjlioijldrjsjvnijdggkflhjoqfhgipgnnnpeildjlioijgerjsjvnkjdggkflnioqfhgipinnnpeijdjlioijddrjsjvnjkdggkflmhoqfhgilfnnnpeipdjlioijgerjsjvntodggkflmkoqfhgiqinnnpeiogjlioijdcrjsjvnukdggkfljioqfhgihfnnnpeipdjlioijherjsjvnpmdggkfluioqfhgiognnnpeinejlioijaerjsjvnjkdggkflghoqfhgiejnnnpeihfjlioijfdrjsjvnpjdggkflmhoqfhgiofnnnpeimejlioijlhrjsjvnpjdggkfljioqfhgingnnnpeipdjlioijlhrjsjvnpjdggkfljioqfhgingnnnpeipdjlioijndrjsjvnskdggkflmioqfhgiofnnnpeicejlioij.
dst_master    | [00:00:07]: Reset() returning
dst_master    | [00:00:07]: THREAD - started 'WorldSim' (4065327936)
dst_master    | [00:00:07]: WorldSim::SimThread::Main()
dst_master    | [00:00:07]: DoLuaFile scripts/worldgen_main.lua
dst_master    | [00:00:07]: DoLuaFile loading buffer scripts/worldgen_main.lua
dst_master    | [00:00:07]: DLC enabled :       false
dst_master    | [00:00:08]: Mutex unlock failed with err 0x16
dst_master    | [00:00:08]: Mutex unlock failed with err 0x16
dst_master    | [00:00:08]: Mutex unlock failed with err 0x16
dst_master    | [00:00:08]: Mutex unlock failed with err 0x16
...
dst_master    | [00:00:08]: Mutex unlock failed with err 0x16
dst_master exited with code 6
mastrodaro commented 4 years ago

I got similar issue.

mathielo commented 4 years ago

Hey @JY-Zhou and @mastrodaro, sorry for the very late reply.

[CRITICAL] Failed to save file: /home/dst/.klei//DoNotStarveTogether/DSTWhalesCluster/Master/save/saveindex

This looks like a permission error. Does the user that's running docker also have write permissions in the dst-dedicated-server folder? Ideally, the user you use to clone and set up the project should be the same one running the docker containers.

Check the Docker Linux installation in the docs, specially the post-installation steps to grant your user permission to run docker.

Others had problem with this before using one user to git clone and setup the project (e.g. root) and then they try to run this as another user.

Please double check all the above and let me know if you're still having the issue!

ibrohimislam commented 4 years ago

try this command: docker-compose up -d && docker exec -u root -it dst_master bash -c "chown -Rv dst:dst /home/dst/.klei/DoNotStarveTogether"

the problem is the volume mount owner doesn't correct. the command fixes the owner to dst:dst.

uLan08 commented 4 years ago

@ibrohimislam Thanks this worked for me. I also added chown -Rv dst:dst /home/dst/server_dst/mods as I also had some permission errors when I was trying to install mods. This did the trick.

docker-compose up -d && docker exec -u root -it dst_master bash -c "chown -Rv dst:dst /home/dst/.klei/DoNotStarveTogether && chown -Rv dst:dst /home/dst/server_dst/mods"