Page 1 of 1

0.15.3 headless linux server - state InitializationFailed

Posted: Mon Apr 24, 2017 5:55 pm
by 94m3k1n9
[EDIT] This happened so far on 0.15.0, 0.15.1, 0.15.2. and 0.15.3

Hey there,

I just downloaded the headless version, however, it doesn't seem to want to run on my linux machine:

Code: Select all

myuser@myhost ~/factorio15 $ ./create.sh mp003
   0.000 2017-04-24 19:04:12; Factorio 0.15.0 (build 29027, linux64, headless)
   0.000 Operating system: Linux
   0.000 Program arguments: "bin/x64/factorio" "--mod-directory" "mods" "--map-gen-settings" "data/map-gen-settings.json" "--create" "mp003"
   0.000 Read data path: /home/myuser/factorio15/data
   0.000 Write data path: /home/myuser/factorio15
   0.000 Binaries path: /home/myuser/factorio15/bin
   0.006 System info: [CPU: Common KVM processor, 6 cores, RAM: 5971MB]
   0.006 Running in headless mode
   0.010 Loading mod core 0.0.0 (data.lua)
   0.015 Loading mod base 0.15.0 (data.lua)
   0.091 Loading mod base 0.15.0 (data-updates.lua)
   0.144 Checksum for core: 3378387764
   0.144 Checksum of base: 2731413614
   0.255 Info PlayerData.cpp:55: Local player-data.json available, timestamp 1493053384
   0.255 Info PlayerData.cpp:62: Cloud player-data.json unavailable
   0.256 Custom inputs active: 0
   0.257 Factorio initialised
   0.258 Info Main.cpp:684: Creating new map /home/myuser/factorio15/mp003
   3.297 Error FileUtil.cpp:291: Can't remove /home/myuser/factorio15/temp/currently-playing: No such file or directory
   3.323 Loading Level.dat: 958272 bytes.
   3.323 Info Scenario.cpp:133: Map version 0.15.0-99
   3.353 Checksum for script /home/myuser/factorio15/temp/currently-playing/control.lua: 1622069129
Done.
   3.450 Goodbye
myuser@myhost ~/factorio15 $ ./start-server.sh mp003
   0.000 2017-04-24 19:04:30; Factorio 0.15.0 (build 29027, linux64, headless)
   0.000 Operating system: Linux
   0.000 Program arguments: "bin/x64/factorio" "--mod-directory" "mods" "--server-settings" "data/server-settings.json" "--start-server" "mp003"
   0.000 Read data path: /home/myuser/factorio15/data
   0.000 Write data path: /home/myuser/factorio15
   0.000 Binaries path: /home/myuser/factorio15/bin
   0.006 System info: [CPU: Common KVM processor, 6 cores, RAM: 5971MB]
   0.006 Running in headless mode
   0.010 Loading mod core 0.0.0 (data.lua)
   0.014 Loading mod base 0.15.0 (data.lua)
   0.087 Loading mod base 0.15.0 (data-updates.lua)
   0.139 Checksum for core: 3378387764
   0.139 Checksum of base: 2731413614
   0.242 Info PlayerData.cpp:55: Local player-data.json available, timestamp 1493053456
   0.242 Info PlayerData.cpp:62: Cloud player-data.json unavailable
   0.243 Custom inputs active: 0
   0.244 Factorio initialised
   0.244 Info ServerSynchronizer.cpp:27: nextHeartbeatSequenceNumber(0) initialized Synchronizer nextTickClosureTick(0).
   0.244 Info ServerMultiplayerManager.cpp:663: mapTick(-1) changing state from(Ready) to(PreparedToHostGame)
   0.244 Info ServerMultiplayerManager.cpp:663: mapTick(-1) changing state from(PreparedToHostGame) to(CreatingGame)
   0.244 Loading map /home/myuser/factorio15/mp003
   0.244 Error ServerMultiplayerManager.cpp:93: MultiplayerManager failed: "Opening zip /home/myuser/factorio15/mp003 failed: Ok"
   0.244 Info ServerMultiplayerManager.cpp:663: mapTick(-1) changing state from(CreatingGame) to(InitializationFailed)
map-gen-settings.json:

Code: Select all

{
  "_comment": "Sizes can be specified as none, very-low, low, normal, high, very-high",

  "terrain_segmentation": "normal",
  "water": "normal",
  "width": 0,
  "height": 0,
  "starting_area": "normal",
  "peaceful_mode": false,
  "autoplace_controls":
  {
    "coal": {"frequency": "normal", "size": "normal", "richness": "very-high"},
    "copper-ore": {"frequency": "normal", "size": "normal", "richness": "very-high"},
    "crude-oil": {"frequency": "normal", "size": "normal", "richness": "very-high"},
    "enemy-base": {"frequency": "normal", "size": "normal", "richness": "normal"},
    "iron-ore": {"frequency": "normal", "size": "normal", "richness": "very-high"},
    "stone": {"frequency": "normal", "size": "normal", "richness": "very-high"}
  },

  "_comment_seed": "Use null for a random seed, number for a specific seed.",
  "seed": null
}
map-settings.json is copied from map-settings.example.json, nothing modified

server-settings.json:

Code: Select all

{
  "name": "94m3k1n9's 0.15 game",
  "description": "Private game",
  "tags": ["private"],

  "_comment_max_players": "Maximum number of players allowed, admins can join even a full server. 0 means unlimited.",
  "max_players": 20,

  "_comment_visibility": ["public: Game will be published on the official Factorio matching server",
                          "lan: Game will be broadcast on LAN"],
  "visibility":
  {
    "public": true,
    "lan": false
  },

  "_comment_credentials": "Your factorio.com login credentials. Required for games with visibility public",
  "username": "94m3k1n9",
  "password": "",

  "_comment_token": "Authentication token. May be used instead of 'password' above.",
  "token": "mytoken",

  "game_password": "",

  "_comment_require_user_verification": "When set to true, the server will only allow clients that have a valid Factorio.com account",
  "require_user_verification": true,

  "_comment_max_upload_in_kilobytes_per_second" : "optional, default value is 0. 0 means unlimited.",
  "max_upload_in_kilobytes_per_second": 0,

  "_comment_minimum_latency_in_ticks": "optional one tick is 16ms in default speed, default value is 0. 0 means no minimum.",
  "minimum_latency_in_ticks": 0,

  "_comment_ignore_player_limit_for_returning_players": "Players that played on this map already can join even when the max player limit was reached.",
  "ignore_player_limit_for_returning_players": false,

  "_comment_allow_commands": "possible values are, true, false and admins-only",
  "allow_commands": "admins-only",

  "_comment_autosave_interval": "Autosave interval in minutes",
  "autosave_interval": 10,

  "_comment_autosave_slots": "server autosave slots, it is cycled through when the server autosaves.",
  "autosave_slots": 5,

  "_comment_afk_autokick_interval": "How many minutes until someone is kicked when doing nothing, 0 for never.",
  "afk_autokick_interval": 0,

  "_comment_auto_pause": "Whether should the server be paused when no players are present.",
  "auto_pause": true,

  "only_admins_can_pause_the_game": true,

  "_comment_autosave_only_on_server": "Whether autosaves should be saved only on server or also on all connected clients. Default is true.",
  "autosave_only_on_server": true,

  "_comment_admins": "List of case insensitive usernames, that will be promoted immediately",
  "admins": ["94m3k1n9"]
}

Re: 0.15 headless linux server - state InitializationFailed

Posted: Mon Apr 24, 2017 9:35 pm
by SilentDecode

Code: Select all

user@factorio:~$ /opt/factorio/bin/x64/factorio --start-server-load-latest
   0.000 2017-04-24 23:32:02; Factorio 0.15.0 (build 29027, linux64, headless)
   0.052 Operating system: Linux (Ubuntu 16.04)
   0.052 Program arguments: "/opt/factorio/bin/x64/factorio" "--start-server-load-latest"
   0.052 Read data path: /opt/factorio/data
   0.052 Write data path: /opt/factorio
   0.052 Binaries path: /opt/factorio/bin
   0.062 System info: [CPU: Intel(R) Xeon(R) CPU           E5540  @ 2.53GHz, 2 cores, RAM: 1991MB]
   0.062 Running in headless mode
   0.068 Loading mod core 0.0.0 (data.lua)
   0.074 Loading mod base 0.15.0 (data.lua)
   0.193 Loading mod base 0.15.0 (data-updates.lua)
   0.290 Checksum for core: 3378387764
   0.290 Checksum of base: 2731413614
   0.445 Info PlayerData.cpp:55: Local player-data.json available, timestamp 1493060906
   0.445 Info PlayerData.cpp:62: Cloud player-data.json unavailable
   0.447 Custom inputs active: 0
   0.448 Factorio initialised
   0.449 Info ServerMultiplayerManager.cpp:139: Quitting multiplayer connection.
   0.449 Info ServerMultiplayerManager.cpp:663: mapTick(-1) changing state from(Ready) to(Closed)
   0.459 Goodbye
   0.000  Error Util.cpp:58: Invalid value

user@factorio:~$

I've got that same issue.

I've tried:
  • - Removing Mods
    - Removing Save games
    - Reinstalling
    - Redownload and reinstall
None of these works and I've given up hope.
Let's hope it will be resolved in a next release.

Re: 0.15 headless linux server - state InitializationFailed

Posted: Tue Apr 25, 2017 6:50 am
by 94m3k1n9
SilentDecode wrote:

Code: Select all

   0.000  Error Util.cpp:58: Invalid value
That's a different error, which is resolved in 0.15.1

Re: 0.15 headless linux server - state InitializationFailed

Posted: Tue Apr 25, 2017 9:13 am
by Maja153
SilentDecode wrote:

Code: Select all

user@factorio:~$ /opt/factorio/bin/x64/factorio --start-server-load-latest
   0.000 2017-04-24 23:32:02; Factorio 0.15.0 (build 29027, linux64, headless)
   0.052 Operating system: Linux (Ubuntu 16.04)
   0.052 Program arguments: "/opt/factorio/bin/x64/factorio" "--start-server-load-latest"
   0.052 Read data path: /opt/factorio/data
   0.052 Write data path: /opt/factorio
   0.052 Binaries path: /opt/factorio/bin
   0.062 System info: [CPU: Intel(R) Xeon(R) CPU           E5540  @ 2.53GHz, 2 cores, RAM: 1991MB]
   0.062 Running in headless mode
   0.068 Loading mod core 0.0.0 (data.lua)
   0.074 Loading mod base 0.15.0 (data.lua)
   0.193 Loading mod base 0.15.0 (data-updates.lua)
   0.290 Checksum for core: 3378387764
   0.290 Checksum of base: 2731413614
   0.445 Info PlayerData.cpp:55: Local player-data.json available, timestamp 1493060906
   0.445 Info PlayerData.cpp:62: Cloud player-data.json unavailable
   0.447 Custom inputs active: 0
   0.448 Factorio initialised
   0.449 Info ServerMultiplayerManager.cpp:139: Quitting multiplayer connection.
   0.449 Info ServerMultiplayerManager.cpp:663: mapTick(-1) changing state from(Ready) to(Closed)
   0.459 Goodbye
   0.000  Error Util.cpp:58: Invalid value

user@factorio:~$

I've got that same issue.

I've tried:
  • - Removing Mods
    - Removing Save games
    - Reinstalling
    - Redownload and reinstall
None of these works and I've given up hope.
Let's hope it will be resolved in a next release.
I noticed that it said you have 2GB RAM available. That csnt be enough, can it?

Re: 0.15 headless linux server - state InitializationFailed

Posted: Tue Apr 25, 2017 9:23 am
by 94m3k1n9
Maja153 wrote:
SilentDecode wrote:...
I noticed that it said you have 2GB RAM available. That csnt be enough, can it?
Should be fine on a headless server: viewtopic.php?p=138073#p138073
Please try to stick to the topic though

Re: 0.15 headless linux server - state InitializationFailed

Posted: Tue Apr 25, 2017 2:04 pm
by SilentDecode
Maja153 wrote:
SilentDecode wrote:

Code: Select all

user@factorio:~$ /opt/factorio/bin/x64/factorio --start-server-load-latest
   0.000 2017-04-24 23:32:02; Factorio 0.15.0 (build 29027, linux64, headless)
   0.052 Operating system: Linux (Ubuntu 16.04)
   0.052 Program arguments: "/opt/factorio/bin/x64/factorio" "--start-server-load-latest"
   0.052 Read data path: /opt/factorio/data
   0.052 Write data path: /opt/factorio
   0.052 Binaries path: /opt/factorio/bin
   0.062 System info: [CPU: Intel(R) Xeon(R) CPU           E5540  @ 2.53GHz, 2 cores, RAM: 1991MB]
   0.062 Running in headless mode
   0.068 Loading mod core 0.0.0 (data.lua)
   0.074 Loading mod base 0.15.0 (data.lua)
   0.193 Loading mod base 0.15.0 (data-updates.lua)
   0.290 Checksum for core: 3378387764
   0.290 Checksum of base: 2731413614
   0.445 Info PlayerData.cpp:55: Local player-data.json available, timestamp 1493060906
   0.445 Info PlayerData.cpp:62: Cloud player-data.json unavailable
   0.447 Custom inputs active: 0
   0.448 Factorio initialised
   0.449 Info ServerMultiplayerManager.cpp:139: Quitting multiplayer connection.
   0.449 Info ServerMultiplayerManager.cpp:663: mapTick(-1) changing state from(Ready) to(Closed)
   0.459 Goodbye
   0.000  Error Util.cpp:58: Invalid value

user@factorio:~$

I've got that same issue.

I've tried:
  • - Removing Mods
    - Removing Save games
    - Reinstalling
    - Redownload and reinstall
None of these works and I've given up hope.
Let's hope it will be resolved in a next release.
I noticed that it said you have 2GB RAM available. That csnt be enough, can it?
2GB RAM is enough. My previous Factorio servers ran with 2GB aswell. Never had issues there.

On topic:
My server runs 0.15.1 now without issues. My problem is resolved!

Re: [Fixed] 0.15 headless linux server - state InitializationFai

Posted: Tue Apr 25, 2017 7:28 pm
by ker
I have the same issue on 0.15.1 on a clean server.

Code: Select all

 0.000 2017-04-25 21:27:31; Factorio 0.15.1 (build 29050, linux64, headless)
   0.039 Operating system: Linux (Debian 8.7)
   0.039 Program arguments: "bin/x64/factorio" "--start-server" "main"
   0.039 Read data path: /root/factorio/data
   0.039 Write data path: /root/factorio
   0.039 Binaries path: /root/factorio/bin
   0.051 System info: [CPU:        Intel(R) Xeon(R) CPU E5-2620 0 @ 2.00GHz, 1 core, RAM: 1991MB]
   0.052 Running in headless mode
   0.060 Loading mod core 0.0.0 (data.lua)
   0.069 Loading mod base 0.15.1 (data.lua)
   0.239 Loading mod base 0.15.1 (data-updates.lua)
   0.369 Checksum for core: 530912544
   0.369 Checksum of base: 2731413614
   0.590 Info PlayerData.cpp:55: Local player-data.json available, timestamp 1493147958
   0.590 Info PlayerData.cpp:62: Cloud player-data.json unavailable
   0.592 Custom inputs active: 0
   0.593 Factorio initialised
   0.594 Info ServerSynchronizer.cpp:27: nextHeartbeatSequenceNumber(0) initialized Synchronizer nextTickClosureTick(0).
   0.594 Info ServerMultiplayerManager.cpp:663: mapTick(-1) changing state from(Ready) to(PreparedToHostGame)
   0.594 Info ServerMultiplayerManager.cpp:663: mapTick(-1) changing state from(PreparedToHostGame) to(CreatingGame)
   0.598 Loading map /root/factorio/main
   0.598 Error ServerMultiplayerManager.cpp:93: MultiplayerManager failed: "Opening zip /root/factorio/main failed: Ok"
   0.598 Info ServerMultiplayerManager.cpp:663: mapTick(-1) changing state from(CreatingGame) to(InitializationFailed)

Re: [Fixed] 0.15 headless linux server - state InitializationFai

Posted: Tue Apr 25, 2017 8:13 pm
by 94m3k1n9
can you create a copy of the save and delete it, then generate a new map to test if that fixes it? might be something that is only randomly appearing on some fresh saves in that case

Re: 0.15.1/.2 headless linux server - state InitializationFailed

Posted: Tue Apr 25, 2017 10:49 pm
by ker
I have generated quite some saves now, but I'll create some more and check.

Re: 0.15.1/.2 headless linux server - state InitializationFailed

Posted: Wed Apr 26, 2017 8:23 am
by 94m3k1n9
I just had it again, and I think I found the problem.
For some reason it fails to unzip the archive with the game.
If you unzip the save game yourself and rename the zip you can still start the game using the folder name of the extracted files.
That way the game will load up and the save should be usable.
The fact that it was working for a while was probably because I had unzipped the save next to the zip file and I missed the error while loading. After updating to 0.15.2 the map appeared to have reset. When I loaded an autosaved save and removed my zip + folder of the original save it threw the same error again I was having in my original post.
After I extracted the zip and renamed it to not share the same name as the folder of the save I tried again and it started up fine.

Re: 0.15.2 headless linux server - state InitializationFailed

Posted: Wed Apr 26, 2017 8:34 am
by 94m3k1n9
Can a moderator please move this to bug reports?

Re: 0.15.3 headless linux server - state InitializationFailed

Posted: Fri Apr 28, 2017 1:41 pm
by 94m3k1n9
Still same issue on 0.15.3

Re: 0.15.3 headless linux server - state InitializationFailed

Posted: Fri Apr 28, 2017 2:12 pm
by quyxkh
It looks like the `--create` switch doesn't append "saves/" on the front of the save file name, try moving the save file there or explicitly saying `create saves/main`

Also, `--start-server` seems to be doing something funny, if I move the main.zip to saves, `--start-server main` complains it can't find what I asked for but finds it in the saves directory, `--start-server saves/main` hangs. `--start-server saves/main.zip` works.

`--start-server-load-latest` works real nice for anything in the saves directory, you could just touch the save you want.

Re: 0.15.3 headless linux server - state InitializationFailed

Posted: Fri Apr 28, 2017 4:50 pm
by Oxyd
--start-server expects a path to the save, so if you run it as --start-server main, it'll try to load file called ./main. There's a few heuristics to try different filenames when it can't find that one, so I made it so it'll try ./main.zip as well. That should fix the issue, if I understand this thread right. Let me know if this is still a problem in 0.15.4 once it's released.

Re: 0.15.3 headless linux server - state InitializationFailed

Posted: Sat Apr 29, 2017 1:45 pm
by ker
works on 0.15.3 if I create it with .zip ending and move it to the saves folder

Thanks