You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm attempting to get this running on a M1 mac mini.
The container appears to start and run the setup correctly on the first try and the minecraft server appears to be up and running (I haven't actually attempted to connect to it with a client yet).
The problem is if the container is stopped or restarted for any reason then the next time it tries to start it exits quickly with "Server is already started! Press screen -r minecraftbe to open it"
I tracked this down to a line ~30 in the start.sh file where it checks the "screen -list" for an already running screen. It appears that the previous screen hasn't cleared or timed out.
I added a "screen -wipe" right before the "screen -list" check which allows the container to restart.
I'm not sure if this is a valid fix.
The text was updated successfully, but these errors were encountered:
That makes sense. I'm not sure why I'm even checking for it in the container but I figured it wouldn't be a bad idea to leave that safety check there (I considered removing it and did remove a lot of stuff during the port that 100% for sure has no use in the container) even though it should theoretically be impossible for it to already be running in a container environment like this.
I'm glad I did because I like your solution better than removing the check for previous instances (who knows what kind of bugs this may catch later). Removing the check means that unlimited numbers of dead screens could theoretically pile up and never be seen.
This is genius because the screen -wipe command will only clear dead screens that should already be closed. If the server was actually running somehow (shouldn't be possible) that command wouldn't impact it and the check would actually successfully detect it's already running.
I'm going to implement this exactly as you described for these reasons. Thanks for reporting this!
EDIT: I actually put this in all 4 of my projects. The Bedrock and Java containers and the standalone Linux script versions of them. Thanks again!
I'm attempting to get this running on a M1 mac mini.
The container appears to start and run the setup correctly on the first try and the minecraft server appears to be up and running (I haven't actually attempted to connect to it with a client yet).
The problem is if the container is stopped or restarted for any reason then the next time it tries to start it exits quickly with "Server is already started! Press screen -r minecraftbe to open it"
I tracked this down to a line ~30 in the start.sh file where it checks the "screen -list" for an already running screen. It appears that the previous screen hasn't cleared or timed out.
I added a "screen -wipe" right before the "screen -list" check which allows the container to restart.
I'm not sure if this is a valid fix.
The text was updated successfully, but these errors were encountered: