Raised This Month: $51 Target: $400
 12% 

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
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 05-09-2009 , 16:31   Re: Linux hlds_run not automaticly restarting on crash
Reply With Quote #8

Quote:
Originally Posted by vampire2k View Post
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
Killing a process from another terminal does not "simulate" a crash. The server should restart on a crash not on a forced termination otherwise you wouldn't ever be able to stop the service without getting in to the console .

I would say that what you describe is working correctly.

P.S. I didn't think any HL1 game was still on Protocol 47.
__________________
fysiks is offline
8088
Veteran Member
Join Date: Jan 2008
Old 05-09-2009 , 19:04   Re: Linux hlds_run not automaticly restarting on crash
Reply With Quote #9

Quote:
Originally Posted by fysiks View Post
Killing a process from another terminal does not "simulate" a crash.
I think it does. hlds_i686 (or hlds_i486 or hlds_amd), which is the actual server, is 'monitored' by hlds_run. As long as you don't kill hlds_run, but the server that is being monitored by it, hlds_run should act as if the server crashed.
Quote:
Originally Posted by fysiks View Post
P.S. I didn't think any HL1 game was still on Protocol 47.
It's the 'Linux Server Engine' version. The protocol is indeed version 48, as can be seen in the first post.
__________________
steamID converter with OpenSearch browser plugin
8088 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 05-09-2009 , 23:14   Re: Linux hlds_run not automaticly restarting on crash
Reply With Quote #10

Quote:
Originally Posted by 8088 View Post
I think it does. hlds_i686 (or hlds_i486 or hlds_amd), which is the actual server, is 'monitored' by hlds_run. As long as you don't kill hlds_run, but the server that is being monitored by it, hlds_run should act as if the server crashed.
Interesting, I will have to try that. I didn't realize it was hlds_run that was doing the actual restarting of the server.
__________________
fysiks 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 18:01.


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