Running 2 containers with one docker-compose file causes 'WARN mc-server-runner sub-process failed {"exitCode": -1}' -error #1302
-
When running a single docker container, there is no problems whatsoever at least to this point, but when running 2 parallel server containers launched with docker-compose, either one container dies with 'WARN mc-server-runner sub-process failed {"exitCode": -1}' -error message. VM has 2/16gb of allocated RAM(2 minimum, 16 max) and 10 xeon cores(yeah minecraft is single core but still) https://pastebin.com/h6bafUXR That much i have gathered, that this probably has something to do with Docker memory handling. I am running MC server with default memory settings, using 1G min 1G max(?) of RAM. Excerpt from container logs when starting the server: [init] Resolved version given LATEST into 1.18.1 [init] Resolving type given VANILLA [init] server.properties already created, skipping [init] Checking for JSON files. [init] Setting initial memory to 1G and max to 1G [init] Starting the Minecraft server... Folder contents: minecraft-server1 and 2 are folders that are mounted on containers' /data, they should be also backed up from here in the undeniably unsure future when my servers actually work... Any ideas where to go next? I was burning midnight oil with this last night already. |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 11 replies
-
Your mc2 port mapping should be |
Beta Was this translation helpful? Give feedback.
-
@taeraeyttaejae were you able to just run 1 of the servers? The exit code seems interesting because it's still in world gen mode. So you've passed all the setup scripts. So is it trying to write the world data files and failing? I guess it'd be nice to verify it is something with 2 containers vs. 1 container. |
Beta Was this translation helpful? Give feedback.
-
just tried two and one and its giving a corrupted world file in all cases. |
Beta Was this translation helpful? Give feedback.
-
I'm thinking it's the health check timing out since two containers both building two world datas from scratch gets pretty intensive. I adjusted the compose file to use relative paths and default rcon settings, but increased the health check allowance and they eventually started:
|
Beta Was this translation helpful? Give feedback.
-
I had to change Also, probably ports are still wrong or something, "mc2" does not allow connecting to it yet. I am not 100% sure about this yet, i will mark this solved when i can get both servers rollin' STILL, thanks a bunch man, couldn't have came up with the health check! |
Beta Was this translation helpful? Give feedback.
-
I think i found the root cause for all my troubles, it was memory -related most probably. It seems this was not image-related, docker-related or OS -related issue, but underlying virtual environment -related problem. Thank you all for your support in this issue! |
Beta Was this translation helpful? Give feedback.
I think i found the root cause for all my troubles, it was memory -related most probably.
https://imgur.com/a/uosyMwr <-- screencap of my Proxmox memory settings. I changed minimum memory from 2048 to 4096 and it looks like there are no more problems with running 2 servers. I have experience over 15 minutes of running but will update here if things change.
It seems this was not image-related, docker-related or OS -related issue, but underlying virtual environment -related problem. Thank you all for your support in this issue!