[linux] Dedicated server init script
Re: [linux] Dedicated server init script
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?
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
- learning by doing, nice that you got it working, good luck with your server!feds wrote:i'm new.
Hosting a factorio server? Take a look at this || init script ||.
Re: [linux] Dedicated server init script
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
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)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
Hosting a factorio server? Take a look at this || init script ||.
Re: [linux] Dedicated server init script
$ sudo factorio version
0.14.5
sweet, thanks ! that was quick !
0.14.5
sweet, thanks ! that was quick !
Re: [linux] Dedicated server init script
hehe, yea, no problem check the commit - I already had the code for getting the version, all I needed was adding the command for it ;ptacgnol wrote:sweet, thanks ! that was quick !
Hosting a factorio server? Take a look at this || init script ||.
Re: [linux] Dedicated server init script
Script fails to start for 14.12 due to the removal of the autosave interval and number parameters.
Re: [linux] Dedicated server init script
oh that's why ...xenotypex wrote:Script fails to start for 14.12 due to the removal of the autosave interval and number parameters.
I was getting crazy trying to figure out why it wasn't working.
Re: [linux] Dedicated server init script
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.
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
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
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
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
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 ?
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
While the server is running, does the mentioned pid file exist?Stopping Factorio: . . cat: /opt/factorio/bin/x64/../../server.pid: No such file or directory
Re: [linux] Dedicated server init script
Got quite a disturbing bug..
When i write
service factorio help (Services etc. everything added)
i get the following:
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
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)
Server is ubuntu 15
Re: [linux] Dedicated server init script
illmaren wrote:Got quite a disturbing bug..
When i write
service factorio help (Services etc. everything added)
i get the following: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...;$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)
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?)
Hosting a factorio server? Take a look at this || init script ||.
Re: [linux] Dedicated server init script
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:
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
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.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:
Hosting a factorio server? Take a look at this || init script ||.
Re: [linux] Dedicated server init script
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.
Hosting a factorio server? Take a look at this || init script ||.
Re: [linux] Dedicated server init script
What's the deal with the ../../ in the path configs? Isthere a reason this is there?