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

Headless server and client on same host

Post by iterat0r » Thu Apr 27, 2017 7:30 am

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

Re: Headless server and client on same host

Post by rhox » Thu Apr 27, 2017 12:56 pm

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

Re: Headless server and client on same host

Post by iterat0r » Thu Apr 27, 2017 2:36 pm

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

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

Re: Headless server and client on same host

Post by ChoMar » Thu Apr 27, 2017 3:51 pm

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

Re: Headless server and client on same host

Post by rhox » Thu Apr 27, 2017 5:59 pm

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

Re: Headless server and client on same host

Post by iterat0r » Wed May 03, 2017 6:54 pm

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

Re: Headless server and client on same host

Post by iterat0r » Wed May 03, 2017 7:04 pm

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: 325
Joined: Tue May 24, 2016 7:46 am

Re: Headless server and client on same host

Post by noliVe » Thu May 04, 2017 12:08 am

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: 325
Joined: Tue May 24, 2016 7:46 am

Re: Headless server and client on same host

Post by noliVe » Thu May 04, 2017 12:10 am

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

Re: Headless server and client on same host

Post by hooiberg » 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.

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

Re: Headless server and client on same host

Post by Zavian » Thu Nov 29, 2018 12:07 pm

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

Re: Headless server and client on same host

Post by hooiberg » Sat Dec 01, 2018 6:28 pm

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”