Dedicated server auto restart

Discuss the Dedicated Server Tools developed by Nadeo Live such as ManiaLive, Trust Circles, Dedicated Manager, Competition Manager and Lobbies

Moderator: NADEO

User avatar
magnetik
Posts: 1673
Joined: 01 Feb 2012, 19:13
Location: Bordeaux
Contact:

Dedicated server auto restart

Post by magnetik »

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.
ManiaPlanet technical documentation portal (Dedicated, ManiaLink, ManiaScript, Titles...) -- contribute!
novationx
Posts: 2723
Joined: 10 Aug 2013, 22:33

Re: Dedicated server auto restart

Post by novationx »

Sweet! This can spare us a lot of problems. :thumbsup:
Last edited by novationx on 22 Jan 2015, 16:49, edited 1 time in total.
The neverending waiting game has to stop.
User avatar
undef.de
Posts: 2095
Joined: 06 Apr 2011, 21:57
Location: Germany, North Sea Coast
Contact:

Re: Dedicated server auto restart

Post by undef.de »

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??
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.
TheBigG.
Posts: 401
Joined: 11 Jun 2011, 16:11

Re: Dedicated server auto restart

Post by TheBigG. »

undef.de wrote: BUT: The best solution would be to have NOT this requirement for restarting. Why not just reset variables that overflow his limits??
+1
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
User avatar
toffe
Posts: 782
Joined: 15 Jun 2013, 10:57
Location: The Netherlands
Contact:

Re: Dedicated server auto restart

Post by toffe »

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.
User avatar
magnetik
Posts: 1673
Joined: 01 Feb 2012, 19:13
Location: Bordeaux
Contact:

Re: Dedicated server auto restart

Post by magnetik »

undef.de wrote:It looks like the dedicated server gets restarted at the given timeout, also when there are Players connected and playing.
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.
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).
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.
That can be done (easily) with server controller like eXpansion or ManiaControl.

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??
At the moment it's not possible for complex reasons.
ManiaPlanet technical documentation portal (Dedicated, ManiaLink, ManiaScript, Titles...) -- contribute!
User avatar
toffe
Posts: 782
Joined: 15 Jun 2013, 10:57
Location: The Netherlands
Contact:

Re: Dedicated server auto restart

Post by toffe »

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. :thumbsup:

Toffe
User avatar
w1lla
Posts: 2287
Joined: 15 Jun 2010, 11:09
Location: Netherlands
Contact:

Re: Dedicated server auto restart

Post by w1lla »

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.

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
Did this with:

Code: Select all

$this->connection->stopServer();
$this->connection->startServerInternet();
And it does seem to work. But i am no expert in this ^^
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
User avatar
magnetik
Posts: 1673
Joined: 01 Feb 2012, 19:13
Location: Bordeaux
Contact:

Re: Dedicated server auto restart

Post by magnetik »

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!
User avatar
sotn0r
Posts: 83
Joined: 13 Mar 2011, 15:57
Contact:

Re: Dedicated server auto restart

Post by sotn0r »

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..!

Image https://nc1.eu/
Image http://facebook.com/nc1.eu/
:arrow: https://twitter.com/nc1eu/
Post Reply

Return to “Dedicated Server Tools”

Who is online

Users browsing this forum: No registered users and 0 guests