Raised This Month: $ Target: $400
 0% 

Linux hlds_run not automaticly restarting on crash


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
vampire2k
SourceMod Donor
Join Date: Oct 2005
Location: Germany
Old 05-07-2009 , 22:58   Linux hlds_run not automaticly restarting on crash
Reply With Quote #1

I recently installed a fresh HL1 dedicated server for a Natural-Selection public server.
Everything works smoothly except for one annoying problem: The server does not restart itself if it happens to crash

Code:
Auto-restarting the server on crash

Console initialized.
scandir failed:/home/ublood/hl1/./platform/SAVE
Protocol version 48
Exe version 1.1.2.1/Stdio (valve)
Exe build: 18:05:13 Oct 24 2008 (4383)
STEAM Auth Server
couldn't exec language.cfg
Server IP address 78.143.28.20:27015

   Metamod version 1.19p32 Copyright (c) 2001-2006 Will Day
     Patch: Metamod-P (mm-p) v32 Copyright (c) 2004-2007 Jussi Kivilinna
   Metamod comes with ABSOLUTELY NO WARRANTY; for details type `meta gpl'.
   This is free software, and you are welcome to redistribute it
   under certain conditions; type `meta gpl' for details.


   AMX Mod X version 1.8.1.3711 Copyright (c) 2004-2006 AMX Mod X Development Team
   AMX Mod X comes with ABSOLUTELY NO WARRANTY; for details type `amxx gpl'.
   This is free software and you are welcome to redistribute it under
   certain conditions; type 'amxx gpl' for details.

scandir failed:/home/ublood/hl1/./platform/SAVE
L 05/08/2009 - 04:45:55: -------- Mapchange to co_faceoff --------
L 05/08/2009 - 04:45:55: [GEOIP] Database info: GEO-106FREE 20060901 Build 1 Copyright (c) 2006 MaxMind LLC All Rights Reserved
[COMM ICON] Error: Can not find icon "gfx/vgui/640_comfg.tga" for precache.
[S_API FAIL] SteamAPI_Init() failed; unable to update local steamclient. Continuing with current version anyway.

Adding master server 68.142.72.250:27010
Adding master server 72.165.61.189:27010
Executing AMX Mod X Configuration File
[AMXX] Loaded 32 admins from database
Connection to Steam servers successful.
   VAC secure mode is activated.
(Notice the first line)
For testing purposes, i kill the hlds_i686 thread from another terminal; This is the output on the server console:
Code:
./hlds_run: line 321: 12630 Killed                 $HL_CMD
It just freezes there.. No restart after hours :/

My hlds_run parameters (the -binary parameter does not affect it, tested it.):
Code:
./hlds_run -binary ./hlds_i686 -game ns -ip 78.143.28.20 +ip 78.143.28.20 -maxplayers 32 -pingboost 1 +map co_faceoff -timeout 6
According to the steam update utility i have the latest "'Linux Server Engine' version 47".
I am running Debian 5.0.1 (Lenny)

Any help will be greatly appreciated

Last edited by vampire2k; 05-08-2009 at 01:05. Reason: Forgot start parameters
vampire2k is offline
alexinno
Senior Member
Join Date: Mar 2007
Location: C:\
Old 05-08-2009 , 09:14   Re: Linux hlds_run not automaticly restarting on crash
Reply With Quote #2

what is this ?
... -ip 78.143.28.20 +ip 78.143.28.20 ...
__________________

[IMG]http://img188.**************/img188/5787/banner2rcw.png[/IMG]
alexinno is offline
vampire2k
SourceMod Donor
Join Date: Oct 2005
Location: Germany
Old 05-08-2009 , 09:18   Re: Linux hlds_run not automaticly restarting on crash
Reply With Quote #3

The system has multiple interfaces and i need to specify the listening ip
vampire2k is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 05-08-2009 , 09:20   Re: Linux hlds_run not automaticly restarting on crash
Reply With Quote #4

You don't need to define both. Figure out which one is used and just define that one
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
vampire2k
SourceMod Donor
Join Date: Oct 2005
Location: Germany
Old 05-08-2009 , 09:34   Re: Linux hlds_run not automaticly restarting on crash
Reply With Quote #5

Sadly that still doesn't solve my problem, with or without -/+ip..

Seems noone else has this kind of problem, im thinking about bypassing hlds_run completely and write my own bash script when i find some time.
vampire2k is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 05-08-2009 , 09:59   Re: Linux hlds_run not automaticly restarting on crash
Reply With Quote #6

Add -autoupdate
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
vampire2k
SourceMod Donor
Join Date: Oct 2005
Location: Germany
Old 05-09-2009 , 01:25   Re: Linux hlds_run not automaticly restarting on crash
Reply With Quote #7

-autoupdate didn't work either but i got around to write that script, if anyones interested:
Code:
#! /bin/bash
export LD_LIBRARY_PATH=".:$LD_LIBRARY_PATH"

while [ true ]; do
        ./hlds_i686 -game ns -maxplayers 32 -pingboost 1 +map co_faceoff +ip 78.143.28.20
        echo "Server crashed at '`date`' - Restarting"
        echo "Server crashed at '`date`' - Restarting" >> crash.log
        sleep 5
done
This seems to work, thread can be closed
vampire2k is offline
X-5173
Member
Join Date: Dec 2006
Location: Bucharest, Romania
Old 10-17-2009 , 22:41   Re: Linux hlds_run not automaticly restarting on crash
Reply With Quote #8

Quote:
Originally Posted by vampire2k View Post
-autoupdate didn't work either but i got around to write that script, if anyones interested:
Code:
#! /bin/bash
export LD_LIBRARY_PATH=".:$LD_LIBRARY_PATH"

while [ true ]; do
        ./hlds_i686 -game ns -maxplayers 32 -pingboost 1 +map co_faceoff +ip 78.143.28.20
        echo "Server crashed at '`date`' - Restarting"
        echo "Server crashed at '`date`' - Restarting" >> crash.log
        sleep 5
done
This seems to work, thread can be closed
Thanks for sharing this mate!
__________________
X-5173 is offline
6inki
Junior Member
Join Date: Nov 2009
Old 12-01-2009 , 20:11   Re: Linux hlds_run not automaticly restarting on crash
Reply With Quote #9

Quote:
Originally Posted by vampire2k View Post
-autoupdate didn't work either but i got around to write that script, if anyones interested:
Code:
#! /bin/bash
export LD_LIBRARY_PATH=".:$LD_LIBRARY_PATH"

while [ true ]; do
        ./hlds_i686 -game ns -maxplayers 32 -pingboost 1 +map co_faceoff +ip 78.143.28.20
        echo "Server crashed at '`date`' - Restarting"
        echo "Server crashed at '`date`' - Restarting" >> crash.log
        sleep 5
done
This seems to work, thread can be closed
I didn't understand where to put this script ????
6inki is offline
tulga
Junior Member
Join Date: May 2010
Old 05-21-2010 , 08:35   Re: Linux hlds_run not automaticly restarting on crash
Reply With Quote #10

Quote:
Originally Posted by vampire2k View Post
-autoupdate didn't work either but i got around to write that script, if anyones interested:
Code:
#! /bin/bash
export LD_LIBRARY_PATH=".:$LD_LIBRARY_PATH"

while [ true ]; do
        ./hlds_i686 -game ns -maxplayers 32 -pingboost 1 +map co_faceoff +ip 78.143.28.20
        echo "Server crashed at '`date`' - Restarting"
        echo "Server crashed at '`date`' - Restarting" >> crash.log
        sleep 5
done
This seems to work, thread can be closed
That's not good idea. The hanged ./hlds always exist in memory. First we must check ./hlds is running or not. if not runnig try to kill hanged hlds then we must hlds.
tulga is offline
Reply



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 09:33.


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