Headless server and client on same host

Arrange meetings with other people to play MP, announce your servers.
Post Reply
iterat0r
Burner Inserter
Burner Inserter
Posts: 13
Joined: Thu Sep 01, 2016 5:10 pm
Contact:

Headless server and client on same host

Post by iterat0r »

I want to have a headless server and then have a client on the same machine to connect to it.
Trying this gives an error about log file already being in use.

Is there a way to specify log file name on the command line?
or other way to make this work?

rhox
Manual Inserter
Manual Inserter
Posts: 4
Joined: Thu Apr 27, 2017 12:38 pm
Contact:

Re: Headless server and client on same host

Post by rhox »

Looks like I was able to get it going using

Code: Select all

--console-log my-log.txt --no-log-rotation
Though, I'm not sure where it actually put 'my-log.txt', as I don't see it in the directory I was in, nor in %appdata%\Factorio. But, at least with the --no-log-rotation, that seemed to be enough to get me running both!

iterat0r
Burner Inserter
Burner Inserter
Posts: 13
Joined: Thu Sep 01, 2016 5:10 pm
Contact:

Re: Headless server and client on same host

Post by iterat0r »

Hmm no luck for me - my factorio doesn't have the --console-log option.

ChoMar
Long Handed Inserter
Long Handed Inserter
Posts: 96
Joined: Sun Aug 07, 2016 2:00 am
Contact:

Re: Headless server and client on same host

Post by ChoMar »

I think youre supposed to put the line in the shortcut to the exe.
Mytronix Entertainment

rhox
Manual Inserter
Manual Inserter
Posts: 4
Joined: Thu Apr 27, 2017 12:38 pm
Contact:

Re: Headless server and client on same host

Post by rhox »

iterat0r wrote:Hmm no luck for me - my factorio doesn't have the --console-log option.
Hm, perhaps it's a 0.15.x only switch? I don't have a copy of 0.14 on this machine to check. Can you do --help and see if the option is listed?

iterat0r
Burner Inserter
Burner Inserter
Posts: 13
Joined: Thu Sep 01, 2016 5:10 pm
Contact:

Re: Headless server and client on same host

Post by iterat0r »

I have the logs option in 0.15.2
however i still get the error about inability to move current.log
Ill try to launch the client with a bat file naming a different log file.
This works!

iterat0r
Burner Inserter
Burner Inserter
Posts: 13
Joined: Thu Sep 01, 2016 5:10 pm
Contact:

Re: Headless server and client on same host

Post by iterat0r »

Now I get the error message (when connecting to the server).
Cannot join. The following mod script files are not identical between you and the server:
level

noliVe
Filter Inserter
Filter Inserter
Posts: 327
Joined: Tue May 24, 2016 7:46 am
Contact:

Re: Headless server and client on same host

Post by noliVe »

you need the server and game in different folders

we are running them like this

screen -dmS factorio_port_number_40006 /opt/factorio/factorio/0.14.22/bin/x64/factorio --config /opt/factorio/username_40006/config.ini --port 40006 --server-settings /opt/factorio/username_40006/server-settings.json --start-server /opt/factorio/username_40006/saves/savegame.zip

with each user have a different config. it even says in the config file where to write down temp and logs
see

Code: Select all

; version=2
[path]
read-data=/opt/factorio/factorio/0.15.6/data
write-data=/opt/factorio/nolive_40017

[general]
locale=de
change this file " config.ini " to the path you want to write everything

noliVe
Filter Inserter
Filter Inserter
Posts: 327
Joined: Tue May 24, 2016 7:46 am
Contact:

Re: Headless server and client on same host

Post by noliVe »

iterat0r wrote:Now I get the error message (when connecting to the server).
Cannot join. The following mod script files are not identical between you and the server:
level
copie your mods directly from the server. somehow there are changes between your mods and the servers mods.
only once these are the same the game starts

hooiberg
Burner Inserter
Burner Inserter
Posts: 14
Joined: Mon Jan 22, 2018 7:14 pm
Contact:

Re: Headless server and client on same host

Post by hooiberg »

You even get this error when running a server and a client on the same machine with vanilla factorio. The error message somehow drags mods into it.

Zavian
Smart Inserter
Smart Inserter
Posts: 1641
Joined: Thu Mar 02, 2017 2:57 am
Contact:

Re: Headless server and client on same host

Post by Zavian »

hooiberg wrote:
Thu Nov 29, 2018 11:58 am
You even get this error when running a server and a client on the same machine with vanilla factorio. The error message somehow drags mods into it.
If you want to run 2 copies of Factorio on the same machine, then you need to make sure they aren't both attempting to use the same directories for things like mods/logs/savefiles etc. The easiest way to achieve that is to make sure that they are completely separate installs, and to use the .zip package for at least one of the installs. (The .zip package extracts to a completely self contained copy of Factorio).

hooiberg
Burner Inserter
Burner Inserter
Posts: 14
Joined: Mon Jan 22, 2018 7:14 pm
Contact:

Re: Headless server and client on same host

Post by hooiberg »

Thank you very much.
I copied the default Steam directory some place else, used that to start the server, and run the client from Steam.
It all works like a charm, now.

Post Reply

Return to “Multiplayer”