Page 1 of 1

Fail to start server with different write-directory

Posted: Sat Oct 15, 2016 11:27 am
by _antipattern_
Hi,

I'm trying to setup factorio-headless on my server. I created a user for it, put the archive in /opt/factorio, config.ini in /etc/factorio and saves/mods in /var/lib/factorio. Also I edited the write-path to point to /var/lib/factorio. When I start the game however, it starts loading the save game and mods (in a previous setup I didn't get this far so I know it finds the savegame), but then fails when trying to access /opt/saves/mysave.zip. I find this weird, since, if at all it should try /opt/factorio/saves/mysave.zip...
Just in case I created symlinks from /opt/factorio/{saves,mods} to /var/lib/factorio/{saves,mods} with no effect (surprise!). I'm running factorio 0.14.13.

This is a log of the server starting.

Do you have an idea what I might be doing wrong?

Best,
_antipattern_

Re: Fail to start server with different write-directory

Posted: Sat Oct 15, 2016 2:43 pm
by posila
Hi,
--start-server expects either save name in <write-path>/saves/ directory, or absolute path to save anywhere (or relative path to working directory)

Code: Select all

   9.444 Error Main.cpp:494: Couldn't load the game for MP: Opening zip /opt/saves/mysave.zip failed: No such file or directory
This seems like your working directory is /opt/, therefore it looks for /opt/saves/mysave.zip first, then it tries /var/lib/factorio/saves/saves/mysave.zip.zip and then it ends with the error.

Re: Fail to start server with different write-directory

Posted: Sun Oct 16, 2016 12:06 am
by _antipattern_
Thanks so much, the prefix "saves/" caused the problem.