Error when starting headless server: Value must be a dictionary in property at ROOT

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.
Jensran
Manual Inserter
Manual Inserter
Posts: 4
Joined: Fri Mar 27, 2020 11:40 pm
Contact:

Error when starting headless server: Value must be a dictionary in property at ROOT

Post by Jensran »

I'm trying to host a headless server. I have run one in the past, but it's been a few years, and I am trying to do a new one now.

In addition, my friend started the game originally, and I am trying to host using his save game. Not sure if that's an issue or not.

The full error is:

Code: Select all

Error
Value must be a dictionary in property tree at ROOT, please check data/server-settings.example.json for correct format.
From what I can tell, there is an issue with my syntax somewhere, buit I'm not exactly sure where. When i run server.bat here is what prints:

Code: Select all

G:\Steam\steamapps\common\Factorio\bin\x64>start /wait Factorio.exe --start-server ../lets_get_stuff_going.zip --server-settings G:\Steam\steamapps\common\Factorio\data\server-settings.json
   0.001 2020-03-27 16:39:13; Factorio 0.17.79 (build 47865, win64, steam)
   0.002 Operating system: Windows 10 (version 1903)
   0.002 Program arguments: "Factorio.exe" "--start-server" "../lets_get_stuff_going.zip" "--server-settings" "G:\Steam\steamapps\common\Factorio\data\server-settings.json"
   0.002 Read data path: G:/Steam/steamapps/common/Factorio/data
   0.002 Write data path: C:/Users/Eric/AppData/Roaming/Factorio [45199/181677MB]
   0.002 Binaries path: G:/Steam/steamapps/common/Factorio/bin
   0.010 System info: [CPU: Intel(R) Core(TM) i5-4460  CPU @ 3.20GHz, 4 cores, RAM: 7616/16335 MB, page: 13664/32719 MB, virtual: 4238/134217727 MB, extended virtual: 0 MB]
   0.010 Running in headless mode
   0.055 Loading mod core 0.0.0 (data.lua)
   0.130 Loading mod base 0.17.79 (data.lua)
   0.416 Loading mod base 0.17.79 (data-updates.lua)
   0.561 Checksum for core: 2035938594
   0.561 Checksum of base: 4156627525
   0.770 Prototype list checksum: 2767119397
   0.806 Info PlayerData.cpp:70: Local player-data.json unavailable
   0.806 Info PlayerData.cpp:75: Cloud player-data.json unavailable
   0.809 Error DebugSettings.cpp:186: Error while loading debug setting: Invalid value "basic" of ItemLevel at ROOT.debug.show-sprite-counts
   0.809 Error DebugSettings.cpp:186: Error while loading debug setting: Invalid value "basic" of ItemLevel at ROOT.debug.show-multiplayer-selection-rectangles
   0.810 Error DebugSettings.cpp:186: Error while loading debug setting: Invalid value "basic" of ItemLevel at ROOT.debug.show-tile-grid
   0.812 Factorio initialised
   0.815 Info ServerMultiplayerManager.cpp:138: Quitting multiplayer connection.   0.816 Info ServerMultiplayerManager.cpp:776: updateTick(4294967295) changing state from(Ready) to(Closed)
   0.874 Goodbye
   0.000 Error Util.cpp:83: Value must be a dictionary in property tree at ROOT, please check data/server-settings.example.json for correct format.
I'm not sure where to find ROOT.debug.show

Here is my server-settings.json file:

Code: Select all

  "name": "lets_get_stuff_going",
  "description": "Let's get this bread.",
  "tags": ["lets", "get" , "stuff" , "going"],

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

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

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

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

  "game_password": "gun",

  "_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_max_upload_slots" : "optional, default value is 5. 0 means unlimited.",
  "max_upload_slots": 5,

  "_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_non_blocking_saving": "Highly experimental feature, enable only at your own risk of losing your saves. On UNIX systems, server will fork itself to create an autosave. Autosaving on connected Windows clients will be disabled regardless of autosave_only_on_server option.",
  "non_blocking_saving": false,

  "_comment_segment_sizes": "Long network messages are split into segments that are sent over multiple ticks. Their size depends on the number of peers currently connected. Increasing the segment size will increase upload bandwidth requirement for the server and download bandwidth requirement for clients. This setting only affects server outbound messages. Changing these settings can have a negative impact on connection stability for some clients.",
  "minimum_segment_size": 25,
  "minimum_segment_size_peer_count": 20,
  "maximum_segment_size": 100,
Let me know if you find anything. I appreciate all of your help!
Jensran
Manual Inserter
Manual Inserter
Posts: 4
Joined: Fri Mar 27, 2020 11:40 pm
Contact:

Re: Error when starting headless server: Value must be a dictionary in property at ROOT

Post by Jensran »

I've made some progress. But getting a new error now. I had an error somewhere in the server-settings.json that I have now fixed and the server runs properly.

However, when I try and run the game through Steam I get a new error:

Code: Select all

Error
Could not move file "factorio-current.log". Another instance of Factorio is probably already running.
I'm trying to follow this post: viewtopic.php?t=42690

About changing my server CONFIG.INI to just some different folder. The folder I want to use is G:\Games\Factorio Server

The server still runs after the changes, but I still can't join the game.
Zavian
Smart Inserter
Smart Inserter
Posts: 1655
Joined: Thu Mar 02, 2017 2:57 am
Contact:

Re: Error when starting headless server: Value must be a dictionary in property at ROOT

Post by Zavian »

From the error message it looks like both client and server are using the same directories for logfile and saves etc. (By default both the .exe installer and the Steam version use the same directories under %APPDATA%). The simplest way to work around that is to download the portable .zip version, and use that for either the client or the server. (The portable .zip version will store saves and logfiles etc in the directory structure that is created when you unzip it).
Jensran
Manual Inserter
Manual Inserter
Posts: 4
Joined: Fri Mar 27, 2020 11:40 pm
Contact:

Re: Error when starting headless server: Value must be a dictionary in property at ROOT

Post by Jensran »

I had guessed that was probably the case. I downloaded the zip standalone last night and will be giving it another shot again today.
Jensran
Manual Inserter
Manual Inserter
Posts: 4
Joined: Fri Mar 27, 2020 11:40 pm
Contact:

Re: Error when starting headless server: Value must be a dictionary in property at ROOT

Post by Jensran »

That did it! I'm able to connect. Though I'm not sure if others can. I trie djoining using my own ip instead of localhost and it can't find it. Is there a way to test if others can join?
Post Reply

Return to “Technical Help”