Closed Jim-Bar closed 4 years ago
What verion of Factorio are you running? Might be important.
The save comes from a 0.17.74 and the server is in 0.17.74 too.
I think I've found the problem and I'm surprised this hasn't come up earlier. When the Factorio container stops, it autosaves. So basically by doing Step 2 in your description - a save of the current server is created and thus gets priority when the container is restarted. Note: I also found restarting the container by this method is a terrible idea, as ECS loses track of the container. I've updated the readme to reflect this (and have documented the right way to restart the container).
Can you please try the following and I'll update the doco to suit:
This will ensure the container doesn't keep trying to restart itself.
Now, please place your save in the /opt/factorio/saves (delete anything else in that folder).
Finally, repeat the steps above, setting Number of tasks to 1.
Report back so I can update doco - hopefully it works now.
This worked although I had some trouble finding where the right ECS AWS console was.
So, just to be sure, now what's the right way to pause the server when not using it? Still by updating the CloudFormation stack (changing the server state parameter from "Running" to "Stopped") or by setting the number of tasks for the cluster?
A big thanks!
There is still a misleading instruction for restarting the container in the documentation under "How can I change map settings, server settings etc."
Thanks I'll update the doco and fix that misleading instruction.
Setting number of tasks in the cluster will only stop the container from running - NOT the underlying EC2 instance (so you'll still be paying for the VM, you just won't be using it).
The way to turn it off when not in use is still via the CloudFormation parameter.
All right, thank you for the explanations.
Have updated readme. Thank you for reporting this.
On a new instance of the server I'm trying to load an existing save.
/opt/factorio/saves
Each time the save is ignored. I tried cheating by giving my save the name of an autosave (something like
_autosave1.zip
), but then everytime it got replaced (looking at its size) and the server starts a new world.The doc at factoriotool states that I should just have to leave a single save in there for the server to load it. Maybe it's something related to EFS or the way the container is started? I'm familiar with Linux and Docker but not AWS.