14.19 headless server not starting

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.
warraybe
Manual Inserter
Manual Inserter
Posts: 2
Joined: Sat Jan 07, 2017 3:37 am
Contact:

14.19 headless server not starting

Post by warraybe »

Getting this error while trying to run a headless server:
Error Util.cpp:57: Error while reading the file D:\GoG Games\Factorio\data\server-settings.json: <unspecified file>(20): expected '}' or ','
Running from a server.bat
@echo off
::==============================================================================================================
:: Replace the appropriate entries below to suit your installation (Default install example shown)
::==============================================================================================================

set FactorioExeLocation=D:\GoG Games\Factorio\bin\x64\

set SaveFileName=raymond.zip
set SaveLocation=C:\Users\Raymond\AppData\Roaming\Factorio\saves\

set ServerSettingsFileName=server-settings.json
set ServerSettingsLocation=D:\GoG Games\Factorio\data\
::==============================================================================================================

cd %FactorioExeLocation%

echo.
echo.
echo PREPARING TO LAUNCH FACTORIO SERVER...
echo.
echo Save to be loaded:
echo %SaveLocation%%SaveFileName%
echo.
echo Server Settings to load:
echo %ServerSettingsLocation%%ServerSettingsFileName%
echo.
echo.
echo *** Remember to use Ctrl+C to ensure saving when finished instead of simply closing this of this window ***
echo.
echo.
pause 3

::==============================================================================================================
:: ***NOTE: The line below launches factorio in headless mode with desired server settings, add any other
:: desired arguments to end of the line. Use "factorio.exe --help" for a list of all supported arguments.
::==============================================================================================================
factorio.exe --start-server "%SaveLocation%%SaveFileName%" --server-settings "%ServerSettingsLocation%%ServerSettingsFileName%"



pause 3
And this is the server-settings.json
{

"name": "Name of the game as it will appear in the game listing",

"description": "Description of the game that will appear in the listing",

"tags": ["game", "tags"],





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

"max_players": 15,


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

"visibility": "hidden" {"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": "apple",



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



"_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": ["warraybe", "motimbo"]

}
At a total loss. I have even tried just using the server-settings.example.json and the same error occurs with no edits done.
daniel34
Global Moderator
Global Moderator
Posts: 2761
Joined: Thu Dec 25, 2014 7:30 am
Contact:

Re: 14.19 headless server not starting

Post by daniel34 »

The visibility is set incorrectly, since 0.14.16 there is no hidden field anymore. Use this syntax to get the same results as hidden:

Code: Select all

  "visibility":
  {
    "public": false,
    "lan": false
  },
Only change between true and false in the above example, don't add any extra fields.

You should also update to 0.14.21 as that is the version most people are currently playing.
quick links: log file | graphical issues | wiki
warraybe
Manual Inserter
Manual Inserter
Posts: 2
Joined: Sat Jan 07, 2017 3:37 am
Contact:

Re: 14.19 headless server not starting

Post by warraybe »

Fantastic! That worked perfectly. Looks like the example.json was wrong there as well.
Post Reply

Return to “Technical Help”