Headless WinServer2012 Crash on load (SteamCMD)

Bugs that are actually features.
Post Reply
Blackraz0r
Inserter
Inserter
Posts: 49
Joined: Sun Dec 28, 2014 1:03 pm
Contact:

Headless WinServer2012 Crash on load (SteamCMD)

Post by Blackraz0r »

Hey Mates,

when i try to download the experimental release via SteamCMD, i got some funny behavior from the headless server.
I run my Server on a Root-Server, WinSRV_2012_x64

When I dl the experimental from the Website, i dont have any problems, but when i do via SteamCMD.
Factorio tries to load the map from the "\bin\x64" directory. :|

so i tried it both.
My Batches are the same for both installations. The Website-one and the SteamCMD-one

Sart/Update-Batch

Code: Select all

echo off


cd steam
steamcmd.exe +runscript ../update_script_factorio_de.txt
cd ..

cd de\bin\x64\
Factorio.exe --start-server-load-latest --latency-ms 150 --autosave-interval 10 --autosave-slots 6 --allow-commands admin-only --server-settings server-settings.json

pause
SteamCMD UpdateScript

Code: Select all

@ShutdownOnFailedCommand 1
@NoPromptForPassword 1
login ****** ******
force_install_dir ../de
app_update 427520 -beta experimental validate
quit
Log from the Server

Code: Select all


C:\Games\Factorio-Server_TEST>echo off
Redirecting stderr to 'C:\Games\Factorio-Server_TEST\steam\logs\stderr.txt'
[  0%] Checking for available updates...
[----] Verifying installation...
Steam Console Client (c) Valve Corporation
-- type 'quit' to exit --
Loading Steam API...OK.
@ShutdownOnFailedCommand 1
"@ShutdownOnFailedCommand" = "1"
@NoPromptForPassword 1
"@NoPromptForPassword" = "1"
login ***** *****

Logging in user '*****' to Steam Public...Logged in OK
Waiting for license info...OK
force_install_dir ../de
app_update 427520 -beta experimental validate
 Update state (0x3) reconfiguring, progress: 0.00 (0 / 0)
 Update state (0x5) validating, progress: 43.56 (210073003 / 482263429)
Success! App '427520' fully installed.
quit
   0.001 2016-08-17 15:29:26; Factorio 0.13.16 (build 23939, win64, steam)
   0.001 Operating system: Windows 8.1
   0.002 Program arguments: "Factorio.exe" "--start-server-load-latest" "--latency-ms" "150" "--autosave-interval" "10" "--autosave-slots" "6" "--allow-commands" "admin-only" "--server-settings" "server-settings.json"
   0.002 Read data path: C:/Games/Factorio-Server_TEST/de/data
   0.002 Write data path: C:/Users/Blackraz0r/AppData/Roaming/Factorio
   0.002 Binaries path: C:/Games/Factorio-Server_TEST/de/bin
   0.027 Running in headless mode
   0.034 Loading mod core 0.0.0 (data.lua)
   0.042 Loading mod base 0.13.16 (data.lua)
   0.266 Checksum for core: 2228900852
   0.266 Checksum for mod base: 2069790529
   0.788 Info PlayerData.cpp:47: Local player-data.json unavailable
   0.788 Info PlayerData.cpp:52: Cloud player-data.json unavailable
   0.798 Custom inputs active: 0
   0.801 Factorio initialised
   0.802 Info HttpSharedState.cpp:44: Downloading https://auth.factorio.com/api-login
   1.366 Info HttpSharedState.cpp:108: Status code: 200
   1.366 Info AuthServerConnector.cpp:160: Got token from auth server for username(Blackraz0r).
   1.372 Info Router.cpp:558: Router peerID(65535) shutting down.
   1.373 Info Router.cpp:594: Router state -> Disconnected
   1.374 Info MultiplayerManager.cpp:1000: networkTick(0) mapTick(-1) changing state from(Ready) to(PreparedToHostGame)
   1.374 Info MultiplayerManager.cpp:1000: networkTick(0) mapTick(-1) changing state from(PreparedToHostGame) to(CreatingGame)
   1.375 Loading map C:\Games\Factorio-Server_TEST\de\bin\x64
   1.395 Error MultiplayerManager.cpp:129: MultiplayerManager failed: "Error when opening C:\Games\Factorio-Server_TEST\de\bin\x64\info.json for reading: No such file or directory"
   1.395 Info MultiplayerManager.cpp:1000: networkTick(0) mapTick(-1) changing state from(CreatingGame) to(InitializationFailed)
   1.396 Error Main.cpp:446: Couldn't load the game for MP: Error when opening C:\Games\Factorio-Server_TEST\de\bin\x64\info.json for reading: No such file or directory
Press any key to continue . . .
So you see the last three lines of the log?
it is looking for the map/save in the "\bin\x64" folder of the game instead of the "\saves" folder of the game.
why does factorio do this?

And if i download the game from the website, and simply delete everything except the save,config, and server-settings files, then it works like a charm with the same batch. (an extra one with the same text for server w/o SteamCMD)

Wierd. ^^

Would be awesome if we can fix this, so i never had to update manually again. ^^

Blackraz0r
Inserter
Inserter
Posts: 49
Joined: Sun Dec 28, 2014 1:03 pm
Contact:

Re: Headless WinServer2012 Crash on load (SteamCMD)

Post by Blackraz0r »

Oh and if i unzip the save in the x64 folder, it works also.
so how to teach factorio to use the save folder again, and not the one of the executrive?

Oxyd
Former Staff
Former Staff
Posts: 1428
Joined: Thu May 07, 2015 8:42 am
Contact:

Re: Headless WinServer2012 Crash on load (SteamCMD)

Post by Oxyd »

I see no crash in your log. Did you post the correct log?

As for loading the incorrect file, what's in your C:/Users/Blackraz0r/AppData/Roaming/Factorio? Is that somehow symlinked to C:/Games/Factorio-Server_TEST/de/bin or something like that?

Blackraz0r
Inserter
Inserter
Posts: 49
Joined: Sun Dec 28, 2014 1:03 pm
Contact:

Re: Headless WinServer2012 Crash on load (SteamCMD)

Post by Blackraz0r »

Yeah, i found out right now that SteamCmd pulls a config-path.cfg everytime from the steambuild
problem is that this cfg tells the server to look for the save files in the %appdata% directory.

so i build in something like

cd de
copy /y config-path_BKP.cfg config-path.cfg
cd ..

so i have a copy of the "right" config" that would be overwritten everytime the server starts to enshure the server is picking the right directory.

so its maybe not a bug but simply a feature. ^^

Post Reply

Return to “Not a bug”