My headless server wont start.

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.
ThatFordGuy
Burner Inserter
Burner Inserter
Posts: 5
Joined: Thu Dec 15, 2016 1:05 am
Contact:

My headless server wont start.

Post by ThatFordGuy »

This is the error I keep getting.

0.606 Error Util.cpp:57: Error while reading file data\server-settings.example.json: <unspecified file>(1): expected value

Any Idea? This is my command starting line and it works without the server-settings but I have everything triple checked with the start line.

factorio --start-server Server.zip --server-settings data/server-settings.example.json
pause

please help me lol I have been working on this for 4 hours now.
daniel34
Global Moderator
Global Moderator
Posts: 2761
Joined: Thu Dec 25, 2014 7:30 am
Contact:

Re: My headless server wont start.

Post by daniel34 »

The start line is correct, but your server-settings.example.json has a syntax error or is otherwise misformed. Please post the contents of that file, remember to remove any passwords you've put in there. Also, what text editor did you use to edit it?
quick links: log file | graphical issues | wiki
ThatFordGuy
Burner Inserter
Burner Inserter
Posts: 5
Joined: Thu Dec 15, 2016 1:05 am
Contact:

Re: My headless server wont start.

Post by ThatFordGuy »

daniel34 wrote:The start line is correct, but your server-settings.example.json has a syntax error or is otherwise misformed. Please post the contents of that file, remember to remove any passwords you've put in there. Also, what text editor did you use to edit it?
Main File below. I use Sublime Text & also tried notepad ++

{
"name": "Fact Gaming [Private]",
"description": "something cool here",
"tags": [Modded],

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

"_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": "",

"_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": 15,

"_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": []
}
daniel34
Global Moderator
Global Moderator
Posts: 2761
Joined: Thu Dec 25, 2014 7:30 am
Contact:

Re: My headless server wont start.

Post by daniel34 »

ThatFordGuy wrote: "tags": [Modded],
Tags have to be surrounded by quotes, e.g. "tags": ["Modded"],
quick links: log file | graphical issues | wiki
ThatFordGuy
Burner Inserter
Burner Inserter
Posts: 5
Joined: Thu Dec 15, 2016 1:05 am
Contact:

Re: My headless server wont start.

Post by ThatFordGuy »

daniel34 wrote:
ThatFordGuy wrote: "tags": [Modded],
Tags have to be surrounded by quotes, e.g. "tags": ["Modded"],

I fixed that and I'm getting the same error
Bear86
Manual Inserter
Manual Inserter
Posts: 3
Joined: Sun Jan 22, 2017 5:14 pm
Contact:

Re: My headless server wont start.

Post by Bear86 »

I've got the same problem, deleted the example and reloaded it via steam and tons more. I usually solve my own problems but I'm stuck.

Code: Select all

{
  "name": "NGCFactorio",
  "description": "Description",
  "tags": ["game", "tags"],

  "_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": "removed",
  "password": "removed",

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

  "game_password": "removed",

  "_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": []
}
Error is:
Error while reading file .\data\server-settings3.json: <unspecified file> (1): expected value
daniel34
Global Moderator
Global Moderator
Posts: 2761
Joined: Thu Dec 25, 2014 7:30 am
Contact:

Re: My headless server wont start.

Post by daniel34 »

Bear86 wrote:I've got the same problem, deleted the example and reloaded it via steam and tons more. I usually solve my own problems but I'm stuck.
Error is:
Error while reading file .\data\server-settings3.json: <unspecified file> (1): expected value
Your server-settings3.json is valid json and works for me on my testserver. The only explanation for that error would be that your .json file has a different encoding. If I encode your .json file with UCS-2 for example then I get the same error as you. You could open the .json file with a text editor capable of changing the encoding (e.g. Notepad++ or Sublime) and save it using UTF8 encoding.
quick links: log file | graphical issues | wiki
Bear86
Manual Inserter
Manual Inserter
Posts: 3
Joined: Sun Jan 22, 2017 5:14 pm
Contact:

Re: My headless server wont start.

Post by Bear86 »

Thanks for your reply daniel. UTF-8 and ANSI both get the same error.

Starting parameters are:
D:\Steam\steamapps\common\Factorio\bin\x64\factorio.exe --start-server ./saves/MultiArneNiciPaddy2.zip --server-settings ./data/server-settings3.json
Bear86
Manual Inserter
Manual Inserter
Posts: 3
Joined: Sun Jan 22, 2017 5:14 pm
Contact:

Re: My headless server wont start.

Post by Bear86 »

Got it starting. Deleted AppData\Factorio uninstalled the game. Reinstalled. Seems to work.
Post Reply

Return to “Technical Help”