Fail to start server with different write-directory

Anything that prevents you from playing the game properly. Do you have issues playing for the game, downloading it or successfully running it on your computer? Let us know here.
_antipattern_
Manual Inserter
Manual Inserter
Posts: 2
Joined: Sat Oct 15, 2016 11:19 am
Contact:

Fail to start server with different write-directory

Post 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_
posila
Former Staff
Former Staff
Posts: 5448
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: Fail to start server with different write-directory

Post 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.
_antipattern_
Manual Inserter
Manual Inserter
Posts: 2
Joined: Sat Oct 15, 2016 11:19 am
Contact:

Re: Fail to start server with different write-directory

Post by _antipattern_ »

Thanks so much, the prefix "saves/" caused the problem.
Post Reply

Return to “Technical Help”