Raised This Month: $32 Target: $400
 8% 

How to auto on server if The server crashed


Post New Thread Reply   
 
Thread Tools Display Modes
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 05-06-2019 , 21:48   Re: How to auto on server if The server crashed
Reply With Quote #11

Quote:
Originally Posted by SomewhereLost View Post
Try what Ive suggested.
"-debug" is not needed (it restarts on it's own assuming it doesn't kill the entire process like a seg fault) and also won't recover from a seg fault.

E1_531G gave the most common general answer that will work even for seg faults.
__________________

Last edited by fysiks; 05-06-2019 at 21:49.
fysiks is offline
SomewhereLost
AlliedModders Donor
Join Date: Mar 2014
Location: Tomorrowland
Old 05-06-2019 , 22:02   Re: How to auto on server if The server crashed
Reply With Quote #12

It won't recover from segmentation fault, nothing will help that except if you find the problem yourself, but for other insignificant crashes it definitely would do the trick.
__________________
SomewhereLost is offline
Send a message via Skype™ to SomewhereLost
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 05-08-2019 , 11:26   Re: How to auto on server if The server crashed
Reply With Quote #13

Quote:
Originally Posted by zomby1 View Post
Can`t find ....
[Linux] HLDSWatch - hl/srcds monitoring and auto restarter script

Auto-restarting the server on crash shows with out with or without -debug.

-debug Enabling debug mode
Debug is not the autostart function.

Does your hlds automatically start on VPS reboot? Then do you have anything to continue to monitor the hlds state already?
__________________
DJEarthQuake is offline
SomewhereLost
AlliedModders Donor
Join Date: Mar 2014
Location: Tomorrowland
Old 05-08-2019 , 12:15   Re: How to auto on server if The server crashed
Reply With Quote #14

Quote:
Originally Posted by DJEarthQuake View Post
[Linux] HLDSWatch - hl/srcds monitoring and auto restarter script

-debug Enabling debug mode
Debug is not the autostart function.
Again, it does restart it on crash.
__________________

Last edited by SomewhereLost; 05-08-2019 at 12:16.
SomewhereLost is offline
Send a message via Skype™ to SomewhereLost
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 05-08-2019 , 12:31   Re: How to auto on server if The server crashed
Reply With Quote #15

Quote:
Originally Posted by SomewhereLost View Post
Again, it does restart it on crash.
Start up a server now without -debug.

Auto-restarting the server on crash

Console initialized.
Using breakpad crash handler
Setting breakpad minidump AppID = 70
Forcing breakpad minidump interfaces to load
Looking up breakpad interfaces from steamclient
Calling BreakpadMiniDumpSystemInit
Protocol version 48
Exe version 1.1.2.2/Stdio (valve)
Exe build: 15:52:40 Apr 3 2019 (8196)
STEAM Auth Server


With -debug

Enabling debug mode
Auto-restarting the server on crash

Console initialized.
Using breakpad crash handler
Setting breakpad minidump AppID = 70
Forcing breakpad minidump interfaces to load
Looking up breakpad interfaces from steamclient
Calling BreakpadMiniDumpSystemInit
Protocol version 48
Exe version 1.1.2.2/Stdio (valve)
Exe build: 15:52:40 Apr 3 2019 (8196)
STEAM Auth Server


Now where is the proof that Auto-restarting the server on crash only works if debug is toggled also?

By the way are you aware your plugin request is ready?
__________________
DJEarthQuake is offline
SomewhereLost
AlliedModders Donor
Join Date: Mar 2014
Location: Tomorrowland
Old 05-08-2019 , 14:46   Re: How to auto on server if The server crashed
Reply With Quote #16

I am aware of that. We had a discussion on steam about that thread.

Spoiler


I do not know how it works for you, but for me I've been using -debug for ages now on Linux and thats the only method as far as I know for restarting the server on crash, excluding when its a seg fault.
__________________

Last edited by SomewhereLost; 05-08-2019 at 14:46.
SomewhereLost is offline
Send a message via Skype™ to SomewhereLost
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 05-11-2019 , 12:32   Re: How to auto on server if The server crashed
Reply With Quote #17

Why then does it state "Auto-restarting the server on crash" without -debug? lsof shows same files in memory with or without debug.

I meant the OP but that is cool you shared the startup link. Do you use that in a script? Do you have more information on the parameters please?

https://developer.valvesoftware.com/...e_parameters_6

Quote:
-nobreakpad - Let plugin authors still get old style minidumps if they need it (win32 only)
I do not believe the win32 comment to be true once libsteam.so is copied. Has anybody else verified this? I was able to copy the file and use -nobreakpad on Linux.

Quote:
dlopen failed trying to load:
/home/steam/.steam/sdk32/libsteam.so
with error:
/home/steam/.steam/sdk32/libsteam.so: cannot open shared object file: No such file or directory
Reproducible evidence server will restart without debug.
Spoiler
__________________
DJEarthQuake is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 05-13-2019 , 10:20   Re: How to auto on server if The server crashed
Reply With Quote #18

The server application (hlds_linux) will automatically restart if you run it through the hlds_run script, unless you also specify -norestart while running it. -debug only tells it to run it through a debugger software, like GDB.
__________________

Last edited by klippy; 05-13-2019 at 10:21.
klippy is offline
zomby1
AlliedModders Donor
Join Date: Jun 2017
Location: Annie Are You Okay ?!
Old 05-18-2019 , 14:00   Re: How to auto on server if The server crashed
Reply With Quote #19

So to add "-debug" in the end and when the server crashed it will be re-on?
Thanks for all !!!
__________________
Url shortener
Hide.link

zomby1 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 05-18-2019 , 14:13   Re: How to auto on server if The server crashed
Reply With Quote #20

Quote:
Originally Posted by zomby1 View Post
So to add "-debug" in the end and when the server crashed it will be re-on?
Thanks for all !!!
No! It seems you're not reading all of the posts. "-debug" has nothing to do with the server restarting itself.

If you're using Linux and you use the provide method (hlds_run) for starting your server, it will restart on its own in most cases. However, there are some fatal crashes that the hlds_run script will actually also fail which then will mean it won't restart (e.g. a seg fault). To handle this, you have to use some external process to manage the running of the server. Two options have already been posted in this thread.

If you're using Windows, you should still probably use some sort of external program to manage running the server.
__________________
fysiks is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 06:36.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode