Headless dedicated server issue!

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.
supernet2
Long Handed Inserter
Long Handed Inserter
Posts: 98
Joined: Tue Jun 28, 2016 1:18 am
Contact:

Re: Headless dedicated server issue!

Post by supernet2 »

No shit dude i just figured it out, i have absolutely no idea why it just decided to work now.

Heres the command line arguments for my .bat file

Code: Select all

Factorio.exe --start-server "C:\Users\repub\Downloads\Factorio_x64_0.13.0\Factorio_0.13.0\saves\F1.zip"
Then my directory is pretty much 100% pre-configured, although i need to unmuck some things. One thing i cannot understand is why i cannot enable disallow commands anymore (is this defined elsewhere now?)

So step one, windows OR linux

Redownload the .zip or headerless version for your os build.

From their step 2

Generate new world (it doesn't matter if its from a .zip instance, a steam install instance, or install directory instance)

Step 3

Copy that world .zip into the save folder (IE: Save/F1.zip)

Step 4

In the bin directory of your build (ill use windows for this example but linux is identical), you will create the .bat using code i provided earlier

Step 5

On windows the server should load up, all yays, technically step 5 should be to configure your ports, and your config.ini port, if thats done then step 5 should just work.
Bluelight wrote:If you don't have the full path in the start-server thing then it will try to load the save called F1.zip in the same dir as the bat file is..
And if you don't have the folder called save inside the "C:/Users/repub/Downloads/Factorio_x64_0.13.0/Factorio_0.13.0/" -folder it will not work either.. Sorry for messing around, I'm editing as I go.. lol

My server is running fine except for the damn port.. I can connect directly and play but not with the server browser, which I have waited weeks for to test and now it won't work.. How annoying!
Alrighty just figured out your problem on your end. Okay throw away like 95% of what you did, and rework it as per my prior step by steps. The rest for configurations can be in the .bat file no crazy configs needed for the server file you mentioned other than your factorio.com username, password, and then from their your title for your server instance, if its public or not (if its public or hidden or password protected YOU WILL need the factorio.com username/password filled out)

The login for connecting to your server (im assuming your on the host machine playing), if your hosting the server in the background, and then you try to connect, you will need to connect under 127.0.0.1:4444 (so you connect on host machine through feedbackloop IP but your also self identifying as admin with 4444 it should prompt you for username/password) from their to login

If your connecting to the server remotely you can do the EXTERNALIP:4444 to connect as admin
If your connecting to the server on LAN (your on same network server is on same network but different machine), you can do it as SERVER LAN IP:4444 and same as prior description. PHeeewww glad i figured out my problem though, hopefully my explanation helps you, thanks to our pow wowing i was able to figure it all out now. Feel free to break it down step by step what went wrong and ill help you fix your instance to
User avatar
Bluelight
Inserter
Inserter
Posts: 42
Joined: Wed Mar 23, 2016 12:13 am
Contact:

Re: Headless dedicated server issue!

Post by Bluelight »

I can try to post it on here.. Though it's gonna get messy!


I just made a folder on my remote server's drive called Factorio, inside there I put all the stuff that was generated by the game that I first ran on my computer.. Just to find out where the folders where supposed to go.. and how the configs was made, so I had a new folder called "config" with "config.ini" inside:

Code: Select all

[path]
read-data=__PATH__executable__\..\..\data
write-data=__PATH__executable__\..\..
[general]
locale=en
[controls]
editor-show-hard-difficulty=F11
editor-show-normal-difficulty=F10
editor-show-easy-difficulty=F9
editor-show-all-difficulties=F8
editor-edit-entity-details=T
editor-remove-entity=X
editor-tool-secondary-action=mouse-button-2
editor-tool-primary-action=mouse-button-1
cancel-craft-all=SHIFT + mouse-button-1
cancel-craft-5=mouse-button-2
cancel-craft=mouse-button-1
craft-all=SHIFT + mouse-button-1
craft-5=mouse-button-2
craft=mouse-button-1
drag-map=mouse-button-1
toggle-console=KEY60
focus-search=CONTROL + F
smaller-terrain-building-area=PAD -
larger-terrain-building-area=PAD +
pause-game=SHIFT + SPACE
disconnect-train=V
connect-train=G
confirm-message=TAB
toggle-map=M
production-statistics=P
toggle-menu=ESCAPE
zoom-out=mouse-wheel-down
zoom-in=mouse-wheel-up
cycle-blueprint-backwards=SHIFT + mouse-wheel-down
cycle-blueprint-forwards=SHIFT + mouse-wheel-up
toggle-driving=ENTER
shoot-selected=C
shoot-enemy=SPACE
pick-items=F
rotate=R
drop-cursor=Z
clean-cursor=Q
quickbar-10=SHIFT + 5
quickbar-9=SHIFT + 4
quickbar-8=SHIFT + 3
quickbar-7=SHIFT + 2
quickbar-6=SHIFT + 1
change-active-quickbar=X
fast-entity-split=CONTROL + mouse-button-2
inventory-split=CONTROL + mouse-button-2
stack-split=SHIFT + mouse-button-2
cursor-split=mouse-button-2
quickbar-5=5
quickbar-4=4
quickbar-3=3
quickbar-2=2
quickbar-1=1
toggle-filter=mouse-button-3
fast-entity-transfer=CONTROL + mouse-button-1
inventory-transfer=CONTROL + mouse-button-1
stack-transfer=SHIFT + mouse-button-1
pick-item=mouse-button-1
next-weapon=Q
show-info=ALT
open-gui=mouse-button-1
select-for-cancel-deconstruct=SHIFT + mouse-button-1
select-for-blueprint=mouse-button-1
paste-entity-settings=SHIFT + mouse-button-1
copy-entity-settings=SHIFT + mouse-button-2
remove-pole-cables=SHIFT + mouse-button-1
build-ghost=SHIFT + mouse-button-1
build=mouse-button-1
mine=mouse-button-2
close-gui=E
open-technology-gui=T
open-character-gui=E
move-down=S
move-left=A
move-right=D
move-up=W
[debug]
show_fps=basic
show_detailed_info=basic
show_time_used_percent=basic
show_multiplayer_waiting_icon=basic
show_multiplayer_waiting_statistics=basic
show_tile_grid=full
show_collision_rectangles=detailed
show_selection_rectangles=detailed
show_paths=full
show_next_waypoint_bb=full
show_target=full
show_unit_group_info=full
show_unit_behavior_info=full
show_last_path_detail=full
show_path_cache=full
show_path_cache_paths=full
show_rail_paths=full
show_rolling_stock_count=full
show_rail_connections=detailed
show_rail_segments=detailed
show_rail_joints=detailed
show_train_stop_point=detailed
show_train_braking_distance=full
show_train_signals=full
show_network_connected_entities=detailed
show_circuit_network_numbers=detailed
show_energy_sources_networks=detailed
show_active_state=detailed
show_pollution_values=full
show_active_entities_on_chunk_counts=full
show_active_chunks=full
show_enemy_expansion_candidate_chunks=full
show_enemy_expansion_candidate_chunk_values=full
show_tile_variations=full
show_raw_tile_transitions=never
show_tile_correction_previews=never
show_fluid_box_fluid_info=basic
show_environment_sound_info=basic
show_logistic_robot_targets=full
show_fire_info=full
show_sticker_info=full
[graphics]
lights-render-quality=0.200000003
custom-ui-scale=1
multisampling-level=0
preferred-screen-index=255
screenshots_queue_size=10
screenshots_threads_count=1
max-texture-size=0
fullscreen=false
system-ui-scale=true
show-minimap=true
show-pollution-on-minimap=false
show-pollution-on-large-map=true
show-turret-radius-when-blueprinting=false
show-grid-when-paused=true
show-smoke=true
show-clouds=true
show-inserter-shadows=true
show-inserter-arrows-when-selected=true
show-inserter-arrows-when-detailed-info-is-on=false
show-mining-drill-arrows-when-detailed-info-is-on=true
show-combinator-settings-when-detailed-info-is-on=false
force-opengl=false
cache-sprite-atlas=false
v-sync=true
trilinear-filtering=true
skip-vram-detection=false
graphics-quality=normal
video-memory-usage=high
texture-compression=false
disable-fma3=auto
[sound]
master_volume=0.600000024
ambient_volume=0.400000006
game_effects_volume=0.699999988
gui_effects_volume=0.699999988
walking_volume=0.300000012
environment_volume=0.449999988
alert_volume=0.550000012
audible_distance=40
environment_audible_distance=15
maximum_environment_sounds=15
active_gui_volume_modifier=1.29999995
active_gui_environment_volume_modifier=0.600000024
ambient_music_pause_mean_seconds=45
ambient_music_pause_variance_seconds=30
ambient_music_mode=interleave-main-tracks-with-interludes
[other]
tooltip_delay=0.0395000018
max_threads=2
force_default_logistic_filter_count_to_one=false
show_tips_and_tricks=true
autosort_inventory=true
research_finished_stops_game=true
use_item_groups=true
use_item_subgroups=true
output_console_delay=1200
autosave_interval=8
autosave_slots=3
enable_latency_hiding=true
enable_new_mods=true
port=34197
server_game_heartbeat_in_seconds=30
lan_game_heartbeat_in_seconds=2
check_updates=false
enable_experimental_updates=false
proxy=
verbose-logging=false

Then I found a folder called "mods" that where empty and all of these folders is in the dir I get from unpacking the zip file I get from https://www.factorio.com/download/experimental , so then after that I found the next folder called "saves" where the game saved the world files (so on the server I put my server world file). A folder called "temp" was generated, with picture from the save and autocreated stuff like MP download file. Then I had a file in root factorio folder (where all the other mentioned folders are) called "config-path.cfg" which contains:

Code: Select all

config-path=__PATH__executable__/../../config

#This value specifies the way the aplication generates default values for path.read-data and path.write-data
#When set to true, it will use system directories (Users/Name/AppData/Roaming/Factorio on windows), this is set to true
#for the installer versions of Factorio, as people will usualy install it in program files, and the aplication can't write
#to program files by default (without UAC turned off), similar with osx/linux packages.
#When set to false (default value for zip package), it will use application root directory, this is usable to create self-sustainable
#Factorio directory that can be copied anywhere needed (on usb etc), also for people, who don't like to manipulate saves
#in the windows users directory structure (as me, kovarex).
#Note, that once the values in config are generated, this value has no effects (unless you delete config, or the path.read-data/path.write-data values)
use-system-read-write-data-directories=false

And then there is the log files and some other minor files that I didn't change.. They are auto generated. And then there is the bat file to start the server which looks like this:

Code: Select all

START /wait factorio.exe --server-settings "F:/user's Mappe/Factorio_0.13.0/data/server-settings.json" --rcon-port 4444 --rcon-password passhere --start-server-load-latest --latency-ms 200 --autosave-interval 10 --autosave-slots 20 --allow-commands admins-only

Then I changed the "../Factorio_0.13.0/data/server-settings.json" to:

Code: Select all

{
  "name": "Bluelights Server",
  "description": "Bluelights Vanilla Factorio Server",
  "tags": ["vanilla", "game", "co", "op"],
  "max_players": "6",

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

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

  "game_password": ""
}

And this is the original example one:

Code: Select all

{
  "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"],
  "max_players": "0",

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

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

  "game_password": ""
}

And that's pretty much it!
Last edited by Bluelight on Tue Jun 28, 2016 4:20 am, edited 2 times in total.
Bluelight
User avatar
Bluelight
Inserter
Inserter
Posts: 42
Joined: Wed Mar 23, 2016 12:13 am
Contact:

Re: Headless dedicated server issue!

Post by Bluelight »

Well you can use "--allow-commands admins-only"
Bluelight
supernet2
Long Handed Inserter
Long Handed Inserter
Posts: 98
Joined: Tue Jun 28, 2016 1:18 am
Contact:

Re: Headless dedicated server issue!

Post by supernet2 »

Code: Select all

START /wait factorio.exe --server-settings "F:/user's Mappe/Factorio_0.13.0/data/server-settings.json" --rcon-port 4444 --rcon-password passhere --start-server-load-latest --latency-ms 200 --autosave-interval 10 --autosave-slots 20 --allow-commands admins-only
From what i understand your telling the .bat to pause or wait after loading factorio.exe which will then attempt to run server-settings at target directory, where your settings for the server... are not in the server-settings.json (?)

For me where ever i tell my server to load now i need to do the same commands but within a separate file, in this instance your defining it as server-settings.json

I attempted mimicing your build, and ran into the same error your running into, but i haven't tested the theory of applying those same settings within the server-settings.json aspect, ill give it a go, but that would make the most sense to me as its choking up on the server-settings.json which the rest of the argument is considered null (at least thats what i got) out of the error, and on my own.

Thats what i ment when i said i can no longer allow --disallow-commands argument anymore, it keeps throwing out the same error about unreadable data (at least on my end)

Edit::

Code: Select all

Factorio.exe --start-server C:\Users\repub\Downloads\Factorio_x64_0.13.0\Factorio_0.13.0\saves\F1.zip --rcon-port 4444 --rcon-password passwordhere --start-server-load-latest --latency-ms 200 --autosave-interval 10 --autosave-slots 20 --allow-commands admins-only
Okay so i basically used your settings and kept spamming it till it worked. The settings i enabled work for my server, and it runs fine, with same settings as yours, it will have identical settings, now im gonna rebuild my file to be to my settings now that i understand how to disable admin command line. And just lock it out to random passwords or something absurd as well as swapping out the password.

Okaysolved. Lulz god that was confusing

Okay so basically everything i said here makes more sense than my past statement give it a go and tell me what happens (Where your settings are point it to a world save file it doesn't matter what just make sure that world save is present and is identical to your target directory, IE where your telling the .bat to load the .zip with what settings parameters afterwards (all that crap afterwards)

And... i now see what your talking about, i am only able to do a broadcasting server name/description etc... for people to select when i host it on my linux box vs my windows box. Not sure what im doing differently, now i get where your coming from, the rest of all that you put into your file work but the broadcasting aspect, where it broadcasts when the proper loading is done from. Cant figure that last tidbit out on the windows platform, anyone else figure it out, regarding how to make your multiplayer server broadcast to those who legitly bought factorio and have logged in to factorio.com to syncronize and play online (IE to access the factorio public servers)?
User avatar
Bluelight
Inserter
Inserter
Posts: 42
Joined: Wed Mar 23, 2016 12:13 am
Contact:

Re: Headless dedicated server issue!

Post by Bluelight »

It does not help, well I didn't remove the settings string but I need that! But surely this is an error from the developers part, they have added the detection of the port and the port will always change when you use that methood of connecting! The port on the servers side remains the same default port though! Only thing I can think of now is the order of which the arguments are executed, but that should not matter!
Bluelight
supernet2
Long Handed Inserter
Long Handed Inserter
Posts: 98
Joined: Tue Jun 28, 2016 1:18 am
Contact:

Re: Headless dedicated server issue!

Post by supernet2 »

Yeah thats pretty much the conclusion i came to. The arguments out of order causes issues, and that is the case so far. Then the execution of arguments runs into a landslide of bugs, should just be one configuration file that gives all the instructions, and thats it. Nothing complicated like how they have it setup right now. Just makes it confusing to trace down everything within the log file, and figuring out what choked up what at what points. I know getting my server to work took a while but they are all with out showing on the list when everythings configured correctly. Not sure what to say on my part. Other than to ask those who have working servers on linux boxes, and take apart how they setup their setups. Haven't had any success getting any answers on that one though.

Just being lazy but heres some food for thought, for the server directory string, why not add in the save file directory just like its a .bat but within the server settings? I didn't tinker with it solely because it required me to spam and constantly try different setups until the arguments would push through the server.json file
User avatar
Bluelight
Inserter
Inserter
Posts: 42
Joined: Wed Mar 23, 2016 12:13 am
Contact:

Re: Headless dedicated server issue!

Post by Bluelight »

I don't think that is my issue.. The problem here is that the pingpong servers get different port numbers.. The server port is still the default one on my end, but the pingpongs check methood isn't! They are changing every time they check! I find it weird.. But it's also quite odd that we are the only two complaining and there are thousands of people playing this game.. Are they all asleep or what? The activity on this forum is extremely low and almost none-existent! :-(
Bluelight
supernet2
Long Handed Inserter
Long Handed Inserter
Posts: 98
Joined: Tue Jun 28, 2016 1:18 am
Contact:

Re: Headless dedicated server issue!

Post by supernet2 »

I know they pay attention to the forums so i can only wonder. For port configuration i see what you mean as i see attempt connects on different ports, but i always seen that when i set the server to only accept connections from specified port for inbound traffic. Yeah makes me wonder, still tinkering with it myself.

Edit" my problems been resolved viewtopic.php?f=49&t=27787

As for your issue... sounds like its on your end, the pingpong server just intercepts and takes another port traffic to forward still to your default port, at least thats what i was getting out of it, ill monitor inbound traffic on my end and see if its related to network configuration on your end, a router issue, or if its the pingpong server itself. I'll know shortly within the next day or two
User avatar
Bluelight
Inserter
Inserter
Posts: 42
Joined: Wed Mar 23, 2016 12:13 am
Contact:

Re: Headless dedicated server issue!

Post by Bluelight »

Has nobody found a solution for this so far? I'm still in the dark over here..!
Bluelight
Post Reply

Return to “Technical Help”