Page 1 of 1

Error on Headless Server when Save-game attempted

Posted: Wed Feb 01, 2017 4:28 pm
by ChurchOrganist
I'm running a headless server on an Ubuntu Studio Linux VM using Virtual Box to host it on my i3 Intel PC.

Everything is working fine apart from whenever I invoke the save-game command from the terminal I get this error.....

Code: Select all

michael@FactorioServer:~$ sudo service factorio save-game fred
[sudo] password for michael: 
2017-01-25 08:38:19 [CHAT] <server>: Stopping server to save game
Stopping Factorio: . . . . cat: /opt/factorio/bin/x64/../../server.pid: No such file or directory
I get the same error message when logged in as root......

Code: Select all

root@FactorioServer:/opt/factorio/saves# service factorio save-game fred
2017-02-01 16:07:03 [CHAT] <server>: Stopping server to save game
Stopping Factorio: . . . . . cat: /opt/factorio/bin/x64/../../server.pid: No such file or directory
complete!
Do I have the syntax wrong? I have tried supplying the full path - /opt/factorio/saves/fred

But that doesn't seem to work either.

The system does save the game, but using the filename of the last save (not the autosave) in this case SaveGame28Jan17.zip

So my current workaround is to copy the save and rename it. The Server then overwrited the copy instead of using the fred filename.

Can you shed some light as to what may be awry?

Re: Error on Headless Server when Save-game attempted

Posted: Thu Feb 02, 2017 12:50 am
by DaveMcW
You should ask the author of your factorio service for help.

Re: Error on Headless Server when Save-game attempted

Posted: Thu Feb 02, 2017 1:47 am
by Neemys
your service script is not part of the game provided by the devs, Try reaching the author of said script. He seem to having trouble exiting factorio. either the path is wrong of the executable don't have necessary privileges to write in it.

Factorio do save automatically on exit (on normal exit, not crash) overwriting the save the launching command gave him so having a command that save the game is unecessary, if you indeed need to save not using autosave, just restart the service using either

Code: Select all

service factorio restart
(if it exist on your script) OR a combination of

Code: Select all

service factorio stop
, and

Code: Select all

service factorio start

Re: Error on Headless Server when Save-game attempted

Posted: Thu Feb 02, 2017 4:25 pm
by ChurchOrganist
OK thanks :)

Re: Error on Headless Server when Save-game attempted

Posted: Thu Feb 02, 2017 6:53 pm
by Neemys
But you should let factorio save himself with autosave. You can change their frequencies and number in the config file for your server.