AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   HL1 Servers (HLDS) (https://forums.alliedmods.net/forumdisplay.php?f=131)
-   -   Linux hlds_run not automaticly restarting on crash (https://forums.alliedmods.net/showthread.php?t=91951)

vampire2k 05-07-2009 22:58

Linux hlds_run not automaticly restarting on crash
 
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 :)

alexinno 05-08-2009 09:14

Re: Linux hlds_run not automaticly restarting on crash
 
what is this ?
... -ip 78.143.28.20 +ip 78.143.28.20 ...

vampire2k 05-08-2009 09:18

Re: Linux hlds_run not automaticly restarting on crash
 
The system has multiple interfaces and i need to specify the listening ip :wink:

YamiKaitou 05-08-2009 09:20

Re: Linux hlds_run not automaticly restarting on crash
 
You don't need to define both. Figure out which one is used and just define that one

vampire2k 05-08-2009 09:34

Re: Linux hlds_run not automaticly restarting on crash
 
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.:)

YamiKaitou 05-08-2009 09:59

Re: Linux hlds_run not automaticly restarting on crash
 
Add -autoupdate

vampire2k 05-09-2009 01:25

Re: Linux hlds_run not automaticly restarting on crash
 
-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 :)

fysiks 05-09-2009 16:31

Re: Linux hlds_run not automaticly restarting on crash
 
Quote:

Originally Posted by vampire2k (Post 823278)
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.

8088 05-09-2009 19:04

Re: Linux hlds_run not automaticly restarting on crash
 
Quote:

Originally Posted by fysiks (Post 824442)
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 (Post 824442)
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.

fysiks 05-09-2009 23:14

Re: Linux hlds_run not automaticly restarting on crash
 
Quote:

Originally Posted by 8088 (Post 824539)
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.


All times are GMT -4. The time now is 03:16.

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