Page 5 of 6

Re: [linux] Dedicated server init script

Posted: Mon Sep 05, 2016 6:49 pm
by yfcz
Hello,

thanks for nice tool.

I just wonder. Is STOP command also supposed to save game (if so its missing in command description)? Or is map saved directly by Factorio during shutdown?

I ask coz saving on STOP command doesn't work properly on my server. Every time save operation is unfinished save and file is corrupted.

Is there any timeout for save operation?

Re: [linux] Dedicated server init script

Posted: Tue Sep 06, 2016 5:55 pm
by Bisa
feds wrote:i'm new.
- learning by doing, nice that you got it working, good luck with your server! :D

Re: [linux] Dedicated server init script

Posted: Fri Sep 09, 2016 7:08 pm
by tacgnol
Would it be possible to add a function in the auto complete shell to get the current factorio server version ? like 'factorio --version' something like that ... would be great :)

Re: [linux] Dedicated server init script

Posted: Fri Sep 09, 2016 8:49 pm
by Bisa
tacgnol wrote:Would it be possible to add a function in the auto complete shell to get the current factorio server version ? like 'factorio --version' something like that ... would be great :)
added "version" with the latest commit https://github.com/Bisa/factorio-init/c ... e841cc4371 (checkout the master branch, I did not bother to add a new release yet)

Re: [linux] Dedicated server init script

Posted: Fri Sep 09, 2016 9:59 pm
by tacgnol
$ sudo factorio version
0.14.5


sweet, thanks ! that was quick !

Re: [linux] Dedicated server init script

Posted: Fri Sep 09, 2016 11:52 pm
by Bisa
tacgnol wrote:sweet, thanks ! that was quick !
hehe, yea, no problem :D check the commit - I already had the code for getting the version, all I needed was adding the command for it ;p

Re: [linux] Dedicated server init script

Posted: Sun Oct 02, 2016 2:00 am
by xenotypex
Script fails to start for 14.12 due to the removal of the autosave interval and number parameters.

Re: [linux] Dedicated server init script

Posted: Sun Oct 02, 2016 6:05 am
by tacgnol
xenotypex wrote:Script fails to start for 14.12 due to the removal of the autosave interval and number parameters.
oh that's why ...

I was getting crazy trying to figure out why it wasn't working.

Re: [linux] Dedicated server init script

Posted: Mon Oct 17, 2016 4:24 pm
by Zombo
I also stumbled upon the changes concerning autosave now being configured through server-settings.
Was installing a new Factorio Server on Debian 8 and couldn't get the init script to work.
Thanks for the hint, I changed the files according to the pull requests.

Re: [linux] Dedicated server init script

Posted: Mon Oct 17, 2016 10:51 pm
by tacgnol
Zombo wrote:I also stumbled upon the changes concerning autosave now being configured through server-settings.
Was installing a new Factorio Server on Debian 8 and couldn't get the init script to work.
Thanks for the hint, I changed the files according to the pull requests.

I tried working with the pull request, and it still doesn't work...

i think i will have to do a fresh install....

Re: [linux] Dedicated server init script

Posted: Thu Oct 20, 2016 2:17 am
by mcgoff360
is there any way to make the script auto restart the server after X period of time? I am having desync issues with my server on an ec2 server running with a lot of mods. the only way that it seems to fix the problem is to just issue the "service factorio restart" command every ~12 hours or so. I am not super familiar with linux or ec2 so i am not sure what the best way to get the command to be reissued automatically on a specified timeframe

Re: [linux] Dedicated server init script

Posted: Fri Oct 21, 2016 1:27 pm
by mcgoff360
i think i have it working with crontab, which i just figured out. we will see if it works. side note, i was running out of ram on my ec2 instance and i am not sure if that was causing the desync issues, but we will see if it gets fixed

Re: [linux] Dedicated server init script

Posted: Fri Nov 11, 2016 11:48 pm
by tacgnol
I have an issue when i am using the updater ... the command will freeze, and i have to do a ctrl-c to exit the process.



sudo service factorio update

Checking for updates...
New version core-linux_headless64 0.14.20.
Wrote /tmp/factorio-update/core-linux_headless64-0.14.19-0.14.20-update.zip, apply with `factorio --apply-update /tmp/factorio-update/core-linux_headless64-0.14.19-0.14.20-update.zip`
2016-11-11 18:41:36 [CHAT] <server>: Updating to new Factorio version, be right back
Stopping Factorio: . . cat: /opt/factorio/bin/x64/../../server.pid: No such file or directory
complete!

then i have to ctrl-c to exit the process
^C



someone have an idea to fix this ?

Re: [linux] Dedicated server init script

Posted: Mon Jan 09, 2017 7:28 pm
by Zombo
Stopping Factorio: . . cat: /opt/factorio/bin/x64/../../server.pid: No such file or directory
While the server is running, does the mentioned pid file exist?

Re: [linux] Dedicated server init script

Posted: Tue Jan 17, 2017 7:39 am
by illmaren
Got quite a disturbing bug..

When i write
service factorio help (Services etc. everything added)

i get the following:

Code: Select all

/opt/factorio-init/config: line 2: $'\r': command not found
/opt/factorio-init/config: line 6: $'\r': command not found
/opt/factorio-init/config: line 9: $'\r': command not found
/opt/factorio-init/config: line 14: $'\r': command not found
/opt/factorio-init/config: line 19: $'\r': command not found
/opt/factorio-init/config: line 22: $'\r': command not found
/opt/factorio-init/config: line 27: $'\r': command not found
/opt/factorio-init/config: line 36: $'\r': command not found
/opt/factorio-init/config: line 44: $'\r': command not found
/opt/factorio-init/config: line 54: $'\r': command not found
/bin/x64/factorioctorio binary! /opt/factorio
(if you store your binary some place else, override BINARY='/your/path' in the config)
here he tries to access "/bin/x64/factorioctorio" ? Why does he try that...checked the config and the init script but there is nothing there which could do this...;$

Server is ubuntu 15

Re: [linux] Dedicated server init script

Posted: Wed Feb 15, 2017 6:28 pm
by Bisa
illmaren wrote:Got quite a disturbing bug..

When i write
service factorio help (Services etc. everything added)

i get the following:

Code: Select all

/opt/factorio-init/config: line 2: $'\r': command not found
/opt/factorio-init/config: line 6: $'\r': command not found
/opt/factorio-init/config: line 9: $'\r': command not found
/opt/factorio-init/config: line 14: $'\r': command not found
/opt/factorio-init/config: line 19: $'\r': command not found
/opt/factorio-init/config: line 22: $'\r': command not found
/opt/factorio-init/config: line 27: $'\r': command not found
/opt/factorio-init/config: line 36: $'\r': command not found
/opt/factorio-init/config: line 44: $'\r': command not found
/opt/factorio-init/config: line 54: $'\r': command not found
/bin/x64/factorioctorio binary! /opt/factorio
(if you store your binary some place else, override BINARY='/your/path' in the config)
here he tries to access "/bin/x64/factorioctorio" ? Why does he try that...checked the config and the init script but there is nothing there which could do this...;$

Server is ubuntu 15

Hi, not sure if you resolved this already (I'm not visiting these forums much lately - please use the github issue tracker if you run into this issue still, have you tried a fresh install of the script?)

Re: [linux] Dedicated server init script

Posted: Tue Feb 28, 2017 9:15 pm
by Hovel
Bisa,

Please help me out. I'm running a ubuntu server at home and I'm trying to setup a headless server. I'm still new to linux, but I know how to run a headless server. But I read everywhere I should use your init script in combination with the updater from narc0tiq. I can see why an updater would help me, because I manually have to unpack new versions now. But I don't fully understand what your init script helps me with. It will start my factorio server on boot. But is seems to run as a service? how do i manage my server then?

Currently I'm stuck, I can run the script, but it tells me the following:

Code: Select all

thomas@tfdserver:/opt/factorio/factorio-init$ sudo systemctl daemon-reload
thomas@tfdserver:/opt/factorio/factorio-init$ sudo systemctl start factorio
thomas@tfdserver:/opt/factorio/factorio-init$ sudo systemctl status -l factorio
● factorio.service - Factorio Server
   Loaded: loaded (/etc/systemd/system/factorio.service; disabled; vendor preset: enabled)
   Active: activating (auto-restart) (Result: exit-code) since di 2017-02-28 21:56:30 CET; 7s ago
  Process: 28606 ExecStop=/opt/factorio/factorio-init/factorio stop (code=exited, status=0/SUCCESS)
  Process: 28577 ExecStart=/opt/factorio/factorio-init/factorio start (code=exited, status=0/SUCCESS)
 Main PID: 28597 (code=exited, status=1/FAILURE)

feb 28 21:56:30 tfdserver systemd[1]: factorio.service: Unit entered failed state.
feb 28 21:56:30 tfdserver systemd[1]: factorio.service: Failed with result 'exit-code'.
thomas@tfdserver:/opt/factorio/factorio-init$ sudo systemctl enable factorio
Created symlink from /etc/systemd/system/multi-user.target.wants/factorio.service to /etc/systemd/system/factorio.service.
thomas@tfdserver:/opt/factorio/factorio-init$ sudo systemctl status -l factorio
● factorio.service - Factorio Server
   Loaded: loaded (/etc/systemd/system/factorio.service; enabled; vendor preset: enabled)
   Active: activating (auto-restart) (Result: exit-code) since di 2017-02-28 21:57:52 CET; 11s ago
 Main PID: 28795 (code=exited, status=1/FAILURE)
   CGroup: /system.slice/factorio.service

feb 28 21:57:52 tfdserver systemd[1]: factorio.service: Unit entered failed state.
feb 28 21:57:52 tfdserver systemd[1]: factorio.service: Failed with result 'exit-code'.

Re: [linux] Dedicated server init script

Posted: Sun Mar 05, 2017 7:55 am
by Bisa
Hovel wrote:Bisa,

Please help me out. I'm running a ubuntu server at home and I'm trying to setup a headless server. I'm still new to linux, but I know how to run a headless server. But I read everywhere I should use your init script in combination with the updater from narc0tiq. I can see why an updater would help me, because I manually have to unpack new versions now. But I don't fully understand what your init script helps me with. It will start my factorio server on boot. But is seems to run as a service? how do i manage my server then?

Currently I'm stuck, I can run the script, but it tells me the following:
Hi, (sorry for not responding sooner) - it would be helpful for others that debug your problem if you gave us the output of your factorio-current.log (you might even be able to find the problem yourself in it) if I may suggest you could always upload the log to pastebin or attach it here.

Re: [linux] Dedicated server init script

Posted: Wed Mar 15, 2017 4:54 pm
by Bisa
Shameless bump as version 2.5.0 now includes the ability to download the latest headless server from Wube to effortlessly install factorio on your linux server.

Re: [linux] Dedicated server init script

Posted: Tue Mar 21, 2017 5:23 pm
by Blaster
What's the deal with the ../../ in the path configs? Isthere a reason this is there?