AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Off-Topic (https://forums.alliedmods.net/forumdisplay.php?f=15)
-   -   Auto restart crashed server ? (https://forums.alliedmods.net/showthread.php?t=141218)

yOou Know Me 10-20-2010 23:58

Auto restart crashed server ?
 
Hello, my server is crashing and the problem can't be fixed. Is there a program that can start the server after he has crashed ? - I've been using serverdoc.exe program to start it, after he has crashed, but now i'm using Linux and that doesn't work on it is there any other way to start server after crash ?

platzpatrone 10-21-2010 02:37

Re: Auto restart crashed server ?
 
u may check if the server response after a timelimit, if not then restart him
check again, if he is up then do nothing.

this can be done with a bash script

another method is to fix under ubuntu/debian the hlds_run bug
open hlds_run search for: DEBUG=0 change to: DEBUG=""
save the file and restart the server.

but this will not restart the server after segmentation faults.

other method is that u check the logs if there is some sort
of $HL_CMD segmentation fault, then restart him

there are many things u may do, but u need at least knownledge
about those stuff and linux also.

oh and just to mention, figure out why the server is crashing. ;)
and after this try to resolve the problem accordingly

Vechta 10-21-2010 02:58

Re: Auto restart crashed server ?
 
Quote:

Originally Posted by platzpatrone (Post 1330723)
but this will not restart the server after segmentation faults.

What this error means?

yOou Know Me 10-21-2010 06:21

Re: Auto restart crashed server ?
 
Well, the server crashes after "Segmentation Fault" yes, but also for missing models, wads i don't know why the files are there, 8 servers are rashing becouse of missing player.mdl, torntexures.wad ,decals.wad and 3-4 more files i have replaced them many but times but they still crash becouse they can't find them i just can't understand it.. my linux is on desktop enviormant debigan GNU 5.0 lenny

"u may check if the server response after a timelimit, if not then restart him
check again, if he is up then do nothing." I don't understand what you ment with this.. ;[

yOou Know Me 10-23-2010 03:54

Re: Auto restart crashed server ?
 
Well from one other forum they told me to use this code, but when i try to start my server with it i says:
Code:

bash: goto: command not found
Can someone tell how to start this or any other way ? I Just need my server's to autorestart by them selfs when they crash isn't anything out there ?

Code:

@echo off
cls
echo Auto-ON.
echo Y_for_exit!
title Auto-Restart-Crash
:hlds
echo (%time%) --[SERVER_ONLINE]--
start /wait/realtime hlds.exe -console -nocrashdialog -game cstrike +maxplayers 10 +map de_dust2 +sys_ticrate 10000 +sv_maxupdaterate 100 +port 27015 +sv_lan 0 -insecure -nomaster +log off
echo (%time%) WARNING: hlds closed or crashed, restarting...
goto hlds


DeLiriuM 10-23-2010 03:59

Re: Auto restart crashed server ?
 
Segmentation faults could be caused by anything. Crash exploits, crappy writen plugins, missing files...

yOou Know Me 10-23-2010 04:09

Re: Auto restart crashed server ?
 
Okey, well i've tried everything, i can't stop the segmentation fault so i need when the server crashes "Stops" to start by him self cuz when i am at work i can't start the server and it stays crashed all day so i need from him to start by him self can it be done please ?

yOou Know Me 11-05-2010 02:38

Re: Auto restart crashed server ?
 
Please tell some way for the server to auto restart it self when it crashes with program with command o any other way PLEASE, if no one knows how here i have 2 commands that told me in one other forum but i can't make them work why ?


With first command:
This one i started the server but i got this error ??
Code:

:HLDS 

echo (%time%) gotovoo

START/Realtime HLDS.EXE -console -game cstrike -insecure -master -noipx -nojoy +sys_ticrate 10000 +sv_maxupdaterate 100 +port 27023 +maxplayers 22 +map surf_ski_2 +rcon_password as53jjg7win531f +log off
goto hlds

echo (%time%) *****HLDS: CRASH, SERVER RESTART****** 

echo (%time%) *****HLDS: RESTARTING CONSOLE...****** 

goto hlds


And it was this that i got why ?:
Code:

user@user:~/Desktop/longjump$ :HLDS 
bash: :HLDS: command not found
user@user:~/Desktop/longjump$
user@user:~/Desktop/longjump$
user@user:~/Desktop/longjump$
user@user:~/Desktop/longjump$ echo (%time%) gotovoo
bash: syntax error near unexpected token `%time%'
user@user:~/Desktop/longjump$
user@user:~/Desktop/longjump$
user@user:~/Desktop/longjump$
user@user:~/Desktop/longjump$ START/Realtime HLDS.EXE -console -game cstrike -insecure -master -noipx -nojoy +sys_ticrate 1000 +sv_maxupdaterate 100 +port 27044 +maxplayers 22 +map kz_longjumps2 +rcon_password afds32sa23a531f +log off
bash: START/Realtime: No such file or directory
user@user:~/Desktop/longjump$
user@user:~/Desktop/longjump$ goto hlds
bash: goto: command not found
user2user:~/Desktop/longjump$
user@user:~/Desktop/longjump$
user@user:~/Desktop/longjump$
user@user:~/Desktop/longjump$ echo (%time%) *****HLDS: CRASH, SERVER RESTART****** 
bash: syntax error near unexpected token `%time%'
user@user:~/Desktop/longjump$
user@user:~/Desktop/longjump$
user@user:~/Desktop/longjump$
user@user:~/Desktop/longjump$ echo (%time%) *****HLDS: RESTARTING CONSOLE...****** 
bash: syntax error near unexpected token `%time%'
user@user:~/Desktop/longjump$
user@user:~/Desktop/longjump$
user@user:~/Desktop/longjump$

I tried with this:
Code:

@echo off
cls
echo Auto-ON.
echo Y_for_exit!
title Auto-Restart-Crash
:hlds
echo (%time%) --[SERVER_ONLINE]--
start /wait/realtime hlds.exe -console -nocrashdialog -game cstrike +maxplayers 10 +map de_dust2 +sys_ticrate 10000 +sv_maxupdaterate 100 +port 27015 +sv_lan 0 -insecure -nomaster +log off
echo (%time%) WARNING: hlds closed or crashed, restarting...
goto hlds

]And i got this:
Code:

bash: goto: command not found

xPaw 11-05-2010 05:43

Re: Auto restart crashed server ?
 
Quote:

Originally Posted by yOou Know Me (Post 1342294)
Please tell some way for the server to auto restart it self when it crashes with program with command o any other way PLEASE, if no one knows how here i have 2 commands that told me in one other forum but i can't make them work why ?

Because that code is for Windows..

yOou Know Me 11-05-2010 07:38

Re: Auto restart crashed server ?
 
Quote:

Originally Posted by xPaw (Post 1342338)
Because that code is for Windows..

Oh... :[ Isen't there a code for Linux, or a program perhabs, i've seen servers under OS Linux, that auto restart when crashed ?


All times are GMT -4. The time now is 00:28.

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