ULX

Author Topic: Proper Shutdown/restart of a ULX server  (Read 5861 times)

0 Members and 1 Guest are viewing this topic.

Offline Shalmendo

  • Newbie
  • *
  • Posts: 36
  • Karma: 1
Proper Shutdown/restart of a ULX server
« on: November 24, 2014, 03:20:54 PM »
I'm trying to get a clear answer here;

The owner of the server I'm working on is using a management script system, found here: http://danielgibbs.co.uk/lgsm/gmodserver/

He insists that we SSH into the server and use the restart command via the manager to do so because doing otherwise 'corrupts files'.

Now, since we started folllowing this procedure ULX and various modules/addons in it have started forgetting information (or seeming to)

Is there a proper way to stop the server so that it can save all of it's information? Killing it with the manager's restart command seems to just outright kill the server instead of shutting it down properly. Is the data loss a sign of this? Should I use 'killserver' in the console first?
« Last Edit: November 24, 2014, 04:46:08 PM by Shalmendo »

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: Proper Shutdown/restart of a ULX server
« Reply #1 on: November 24, 2014, 03:31:09 PM »
Off the top of my head, I remember that some of Garry's cvars don't save unless there's a graceful shutdown; otherwise, I can't think of any problems.
Experiencing God's grace one day at a time.

Offline Shalmendo

  • Newbie
  • *
  • Posts: 36
  • Karma: 1
Re: Proper Shutdown/restart of a ULX server
« Reply #2 on: November 24, 2014, 03:57:28 PM »
I should probably elaborate a bit:

URS is losing restrictions I've set to keep guests (people new to the server) from spawning the more powerful Garry's Bombs 5 explosives, like nukes and such.

Awarn2 is losing warnings. I've had people get on the server I KNOW I issued warnings to because of their behavior (Who usually start it again) but have no warnings saved.

I can't remember any other problems.

What are the proper ways of doing a 'graceful shutdown'? _Restart? killserver?

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: Proper Shutdown/restart of a ULX server
« Reply #3 on: November 24, 2014, 04:19:45 PM »
I believe quit, exit, and killserver are all graceful ways of shutting down the server.
Experiencing God's grace one day at a time.

Offline Avoid

  • Full Member
  • ***
  • Posts: 142
  • Karma: 42
Re: Proper Shutdown/restart of a ULX server
« Reply #4 on: November 25, 2014, 07:49:43 AM »
I believe quit, exit, and killserver are all graceful ways of shutting down the server.
I am not sure if that helps, but you could also change map before you make a shutdown, as I had some issues with GM:ShutDown being called.
If you do not want your administrator to use the Linux Server Manager write a shell script instead that forces a map change, shuts down the server once finished and finally restart the srcds.

Offline Shalmendo

  • Newbie
  • *
  • Posts: 36
  • Karma: 1
Re: Proper Shutdown/restart of a ULX server
« Reply #5 on: November 25, 2014, 08:14:39 AM »
I am not sure if that helps, but you could also change map before you make a shutdown, as I had some issues with GM:ShutDown being called.
If you do not want your administrator to use the Linux Server Manager write a shell script instead that forces a map change, shuts down the server once finished and finally restart the srcds.

Oh that's a good suggestion!

Thank you to both of you for your input. It's not really a matter of the owner not using the script, it works really well! IT has a monitoring feature and stuff to kick the server back into running if it fails and such, but the shutdown on it seems to just kill the process, which is mildly surprising, as I would expect a maanger of this grade to offer a graceful shutdown instead of a process kill. It's just a matter of shutting the server down gracefully first, here.

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2728
  • Karma: 430
    • |G4P| Gman4President
Re: Proper Shutdown/restart of a ULX server
« Reply #6 on: November 25, 2014, 10:58:59 AM »
AWarn 2 uses the SQLite sv.db file. It should save no matter what.

Unless the file is not written to in real time and only when the server shuts down. I don't know how that works.

Offline Shalmendo

  • Newbie
  • *
  • Posts: 36
  • Karma: 1
Re: Proper Shutdown/restart of a ULX server
« Reply #7 on: November 25, 2014, 09:22:56 PM »
AWarn 2 uses the SQLite sv.db file. It should save no matter what.

Unless the file is not written to in real time and only when the server shuts down. I don't know how that works.

I thought that was the case with Awarn 2 which is why I was so confused about why the warnings I KNEW I had given to someone disappeared. I suppose I could have dreamed those people and giving them warnings only to have them show up for real and need real warnings, but that's highly unlikely, and I doubt my sanity is in need of questioning.

I did an experiment and tried a graceful shutdown after making some noticable changes, and they saved properly. So I'm going to assume that the manager script is killing the process, which is interfering with proper saving etc. Lesson learned, shutdown from rcon, or console, first, before letting the script hammer things.