Hi,
You may know that the script in the dedicated server will misbehave after a little more than 12 days.
In order to have your server running for longer period, you have to restart it.
I've crafted a little script that can be used for such purpose: https://gist.github.com/magnetik/83e144959a73e9ce8b50
Before adding it into the debian package, I would like to have some feedback on it.
Feel free to use it, and report bugs about it.
Dedicated server auto restart
Moderator: NADEO
Dedicated server auto restart
ManiaPlanet technical documentation portal (Dedicated, ManiaLink, ManiaScript, Titles...) -- contribute!
Re: Dedicated server auto restart
Sweet! This can spare us a lot of problems.
Last edited by novationx on 22 Jan 2015, 16:49, edited 1 time in total.
The neverending waiting game has to stop.
Re: Dedicated server auto restart
It looks like the dedicated server gets restarted at the given timeout, also when there are Players connected and playing.
A better (imho) solution would be a script which can communicate with the dedicated server and can restart the dedicated server (after the given timeout has reached) when there are no Players connected.
I know that some dedicated servers are never without connected Players, in this case this script can restart then after a hardlimit.
BUT: The best solution would be to have NOT this requirement for restarting. Why not just reset variables that overflow his limits??
A better (imho) solution would be a script which can communicate with the dedicated server and can restart the dedicated server (after the given timeout has reached) when there are no Players connected.
I know that some dedicated servers are never without connected Players, in this case this script can restart then after a hardlimit.
BUT: The best solution would be to have NOT this requirement for restarting. Why not just reset variables that overflow his limits??
Developer of UASECO, a controller with support of the Modescript Gamemodes for TM².
Visit the official website for more: UASECO.org
Developer of various plugins for XAseco/XAseco2 and MPAseco, visit my lab: www.undef.name
You like what I do? Then award a ManiaStar.
Visit the official website for more: UASECO.org
Developer of various plugins for XAseco/XAseco2 and MPAseco, visit my lab: www.undef.name
You like what I do? Then award a ManiaStar.
Re: Dedicated server auto restart
+1undef.de wrote: BUT: The best solution would be to have NOT this requirement for restarting. Why not just reset variables that overflow his limits??
That would be the best, there is no reason that you have to restart a server.
Client:
OS: Win10/Debian CPU: Intel 9900k GPU: NVIDIA 1080TI Display: 3x Acer Predator XB271HUbmiprz 1440p@165 Hz
Server:
OS: Debian Stable @ Backports Kernel CPU: Intel 6700k RAM: 32 GB Storage: 2x 256 GB NVMe SSD@Raid 1
OS: Win10/Debian CPU: Intel 9900k GPU: NVIDIA 1080TI Display: 3x Acer Predator XB271HUbmiprz 1440p@165 Hz
Server:
OS: Debian Stable @ Backports Kernel CPU: Intel 6700k RAM: 32 GB Storage: 2x 256 GB NVMe SSD@Raid 1
- toffe
- Posts: 782
- Joined: 15 Jun 2013, 10:57
- Manialink: maniaflash?toffe
- Location: The Netherlands
- Contact:
Re: Dedicated server auto restart
Auto restart may not occur when any player is on the server. That's my opninion.
And indeed, when making things more efficient you can prevent restarts.
Toffe.
And indeed, when making things more efficient you can prevent restarts.
Toffe.
ManiaCalendar: http://maniacalendar.com / manialink
ManiaCDN: topic
PyPlanet: Python Server Controller
ManiaCDN: topic
PyPlanet: Python Server Controller
Re: Dedicated server auto restart
Indeed. It's only a way to ensure that started server will still works. I should put the exact number of seconds (instead of day) to be as a last resort.undef.de wrote:It looks like the dedicated server gets restarted at the given timeout, also when there are Players connected and playing.
You should use a server controller in order to do something more complex (like restarting the day before as soon as the server is empty).
That can be done (easily) with server controller like eXpansion or ManiaControl.undef.de wrote: A better (imho) solution would be a script which can communicate with the dedicated server and can restart the dedicated server (after the given timeout has reached) when there are no Players connected.
At the moment it's not possible for complex reasons.undef.de & others wrote: BUT: The best solution would be to have NOT this requirement for restarting. Why not just reset variables that overflow his limits??
ManiaPlanet technical documentation portal (Dedicated, ManiaLink, ManiaScript, Titles...) -- contribute!
- toffe
- Posts: 782
- Joined: 15 Jun 2013, 10:57
- Manialink: maniaflash?toffe
- Location: The Netherlands
- Contact:
Re: Dedicated server auto restart
Maybe an option to only restart during a time period (like between 00:00 and 06:00 AM) would be enough for the simple work and use without a controller.
And maybe an extra option to also start another script when restarting.
Toffe
And maybe an extra option to also start another script when restarting.
Toffe
ManiaCalendar: http://maniacalendar.com / manialink
ManiaCDN: topic
PyPlanet: Python Server Controller
ManiaCDN: topic
PyPlanet: Python Server Controller
- w1lla
- Posts: 2396
- Joined: 15 Jun 2010, 11:09
- Manialink: maniaplanetblog
- Location: Netherlands
- Contact:
Re: Dedicated server auto restart
Option is also using a server controller.
I did a test where the server did show in logs it disconnected and reconnected. However ingame players will get a notice after a while of 10054 error connection.
Did this with:
And it does seem to work. But i am no expert in this ^^
I did a test where the server did show in logs it disconnected and reconnected. However ingame players will get a notice after a while of 10054 error connection.
Code: Select all
Starting ManiaPlanet date=2014-11-24_12_34 GameVersion=3.3.0...
Initializing...
Configuration file : dedicated_cfg.default.txt
Loading system configuration...
...system configuration loaded
Loading cache...
...OK
Listening for xml-rpc commands on port 4999.
WARNING:
* The xml-rpc connection is open to any ip,
* but the Admin / SuperAdmin password hasn't been changed!
* Anybody can remotely control the server.
Loading dedicated server configuration...
...Dedicated server configuration loaded
Connecting to master server...
...OK
Identifying on master server...
...OK
Please wait, loading...
Please wait...
URL: maniaplanet://#join=w1llaelite@Trackmania_2@nadeolabs
Match settings file : MatchSettings\TMValley1.txt
Loading match settings...
Map "Campaigns\TMCanyon\White\A08.Map.Gbx" not found.
...Match settings loaded
Autostart server on internet
Starting server...
- Warning! -
You seem to be on a private network.
Unless you have configured your NAT,
other players on internet will not be
able to join in...
Loading map A01.Map.Gbx (NrnZpfRPTjYxh6wSJ6DSLN7Oq2n)...
...Load succeeds
Starting Match...
...Synchronization
...Play
Connection of a new player: w1lla(84.29.75.107:2350)
...Exit
Disconnection of w1lla(84.29.75.107:2350)
Disconnection of w1llaelite(84.29.75.107:2351)
Loading map A01.Map.Gbx (NrnZpfRPTjYxh6wSJ6DSLN7Oq2n)...
...Load succeeds
Starting Match...
...Synchronization
...Play
Connection of a new player: w1lla(84.29.75.107:2350)
...Exit
Disconnection of w1lla(84.29.75.107:2350)
Disconnection of w1llaelite(84.29.75.107:2351)
Loading map A01.Map.Gbx (NrnZpfRPTjYxh6wSJ6DSLN7Oq2n)...
...Load succeeds
Starting Match...
...Synchronization
...Play
Code: Select all
$this->connection->stopServer();
$this->connection->startServerInternet();
TM² Info
SM Info
QM Info
OS: Windows 10 x64 Professional
MB: MSI 970A-G46
Processor: AMD FX-6300 3500 mHz
RAM Memory: 16 GB DDR3
Video: SAPPHIRE DUAL-X R9 280X 3GB GDDR5
KB: Logitech G510s
Mouse: Logitech G300s
Mode Creation
ManiaScript Docs
SM Info
QM Info
OS: Windows 10 x64 Professional
MB: MSI 970A-G46
Processor: AMD FX-6300 3500 mHz
RAM Memory: 16 GB DDR3
Video: SAPPHIRE DUAL-X R9 280X 3GB GDDR5
KB: Logitech G510s
Mouse: Logitech G300s
Mode Creation
ManiaScript Docs
Re: Dedicated server auto restart
I've modified the script to be an "ultimate" restart: if you haven't done anything before, it will restart it to prevent your server from being frozen.
ManiaPlanet technical documentation portal (Dedicated, ManiaLink, ManiaScript, Titles...) -- contribute!
Re: Dedicated server auto restart
Sorry for being a bit off-topic, but can you give me a hint at which version of the mp server this "12 days" bug has started to occur and what it's effects are?
nc1.eu - TMF, TM² and ShootMania servers with first class support, control panel, FTP access and more..!
https://nc1.eu/
http://facebook.com/nc1.eu/
https://twitter.com/nc1eu/
https://nc1.eu/
http://facebook.com/nc1.eu/
https://twitter.com/nc1eu/
Who is online
Users browsing this forum: No registered users and 1 guest