[15.18] [Headless] Socket closing instantly

Things that we don't consider worth fixing at this moment.
wurstlaugen
Manual Inserter
Manual Inserter
Posts: 1
Joined: Tue Apr 25, 2017 3:39 pm
Contact:

[15.18] [Headless] Socket closing instantly

Post by wurstlaugen »

I tried to run Factorio on Bash on Ubuntu on Windows. (this https://msdn.microsoft.com/en-us/commandline/wsl/about)

It looks like the socket is not opening. The output is the same for every save file.

Code: Select all

  0.000 2017-06-03 19:57:33; Factorio 0.15.18 (build 30150, linux64, headless)
   0.052 Operating system: Linux (Ubuntu 14.04)
   0.052 Program arguments: "./bin/x64/factorio" "--start-server" "./saves/janeike.zip"
   0.053 Read data path: /home/kenny/factorio/data
   0.053 Write data path: /home/kenny/factorio
   0.054 Binaries path: /home/kenny/factorio/bin
   0.061 System info: [CPU: Intel(R) Core(TM) i7-4790K CPU @ 4.00GHz, 8 cores, RAM: 16327MB]
   0.063 Running in headless mode
   0.068 Loading mod core 0.0.0 (data.lua)
   0.074 Loading mod base 0.15.18 (data.lua)
   0.166 Loading mod base 0.15.18 (data-updates.lua)
   0.191 Checksum for core: 368996287
   0.191 Checksum of base: 3838408653
   0.274 Info PlayerData.cpp:58: Local player-data.json unavailable
   0.275 Info PlayerData.cpp:63: Cloud player-data.json unavailable
   0.280 Custom inputs active: 0
   0.281 Factorio initialised
   0.282 Info ServerSynchronizer.cpp:27: nextHeartbeatSequenceNumber(0) initialized Synchronizer nextTickClosureTick(0).
   0.282 Info ServerMultiplayerManager.cpp:670: mapTick(-1) changing state from(Ready) to(PreparedToHostGame)
   0.283 Info ServerMultiplayerManager.cpp:670: mapTick(-1) changing state from(PreparedToHostGame) to(CreatingGame)
   0.288 Loading map /home/kenny/factorio/./saves/janeike.zip: 44708218 bytes.
   0.461 Loading Level.dat: 109518592 bytes.
   0.466 Info Scenario.cpp:134: Map version 0.15.12-0
   4.728 Info BlueprintLibrary.cpp:190: Loaded library shelves:
   4.729 Info BlueprintLibrary.cpp:679: Game shelf: playerIndex = 65535, nextRecordID = 1; timestamp = 1493062080; records: (id: 65535, 0; label: "", preview: false, empty: false; single)
   4.729 Info BlueprintLibrary.cpp:681: Player shelf: playerIndex = 1, nextRecordID = 19; timestamp = 1494277547; records: (id: 1, 10; label: "", preview: false, empty: false; single) (id: 1, 12; label: "", preview: false, empty: false;$   4.730 Info BlueprintLibrary.cpp:681: Player shelf: playerIndex = 0, nextRecordID = 0; timestamp = 1494449827; records:
   4.731 Info BlueprintLibrary.cpp:681: Player shelf: playerIndex = 4, nextRecordID = 0; timestamp = 1494676575; records:
   5.572 Info BlueprintLibrary.cpp:47: Loaded external blueprint storage: playerIndex = 65535, nextRecordID = 0; timestamp = 1496512658; records:
   5.579 Loading script.dat: 190 bytes.
   5.583 Checksum for script /home/kenny/factorio/temp/currently-playing/control.lua: 282129324
   5.790 Info UDPSocket.cpp:27: Opening socket at (0.0.0.0:34197)
   5.790 Info UDPSocket.cpp:234: Socket closed
   5.791 Error ServerMultiplayerManager.cpp:94: MultiplayerManager failed: "Setting socket ttl failed: Invalid argument"
   5.791 Info ServerMultiplayerManager.cpp:670: mapTick(26899980) changing state from(CreatingGame) to(InitializationFailed)
  15.962 Received SIGINT, shutting down
  17.015 Received second SIGINT, terminating immediately
Rseding91
Factorio Staff
Factorio Staff
Posts: 14720
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [15.18] [Headless] Socket closing instantly

Post by Rseding91 »

Just use the windows binary to run the server on windows if you're using windows.

I don't consider this worth looking into due to the strange setup.
If you want to get ahold of me I'm almost always on Discord.
TheWhoAreYouPerson
Manual Inserter
Manual Inserter
Posts: 1
Joined: Sun Aug 06, 2017 9:04 pm
Contact:

Re: [15.18] [Headless] Socket closing instantly

Post by TheWhoAreYouPerson »

I just wanted to note, for the people googling and wondering if Factorio headless works under WSL, that the latest current versions of both (Factorio Headless 0.16.12) and (Windows Insiders build 17063) works just fine. I haven't done much testing with it, but starting the server in WSL, and logging in from a windows client on the same machine works fine. The issue that OP had was probably fixed in some of the recent WSL/Windows builds.

As a side note, last time I tested the full Factorio client on WSL it didn't work. If I had to guess that was probably due to the indirect GL calls through vcXsrv taking too long to copy data buffers and such through the TCP connection. I doubt it will ever work until Microsoft implements a 'native' X server for WSL.
Post Reply

Return to “Won't fix.”