PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : CS-Server läuft nicht weiter wenn Putty geschlossen



d@tenmaulwurf
20.09.03, 20:29
Hi,

ich administriere meinen CS-Server via putty, und starte ihn mit:
./hlds_run -game cstrike +maxplayers 8 +map fy_pool_day2

Wenn ich jedoch putty schließe, iss der CS-Server-Prozess auch geschlossen. Wie kann ich dem Server sagen, dass er CS auch laufen haben soll, wenn keine SSH-Verbindung besteht?

THX im voraus,

d@tenmaulwurf

Jasper
20.09.03, 21:58
Original geschrieben von d@tenmaulwurf

ich administriere meinen CS-Server via putty, und starte ihn mit:
./hlds_run -game cstrike +maxplayers 8 +map fy_pool_day2

Wenn ich jedoch putty schließe, iss der CS-Server-Prozess auch geschlossen. Wie kann ich dem Server sagen, dass er CS auch laufen haben soll, wenn keine SSH-Verbindung besteht?


nohup <program> &

oder besser

screen <optionen> <program>

vorher aber gründlich die manpage von screen lesen. die bedienung ist nicht selbsterklärend.

-j

d@tenmaulwurf
20.09.03, 22:12
screen: bash, habe keine root-rechte

nohup ./hlds_run -game cstrike +maxplayers 20 +map cs_assault
nohup: appending output to `nohup.out'

da bleibt er hängen

d@tenmaulwurf
20.09.03, 22:31
Das Script hlds_run siehst so aus, vllt. hilft es ja:

#!/bin/sh
#
# Copyright (c) 2002, Valve LLC. All rights reserved.
#
# a wrapper script for the main hl dedicated server binary.
# Performs auto-restarting of the server on crash. You can
# extend this to log crashes and more.
#

HL=./hlds
TIMEOUT=10 # time to wait after a crash (in seconds)
CRASH_DEBUG_MSG="email debug.log to sdk@valvesoftware.com"
GDB="gdb" # the gdb binary to run
DEBUG_LOG="debug.log"

# uncomment this line if you want ctrl-c ignored
#trap "" SIGINT

# setup the libraries, local dir first!
export LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH
if test -n "`echo $* | grep "\-norestart"`" ; then
RESTART=""; # norestart defined, do do restarts
else
RESTART="yes";
fi

DEBUG=`echo $* | grep "\-debug"`

if test -n "$DEBUG" ; then
#turn on core dumps :) (if possible)
echo "Enabling debug mode"
if test "`ulimit -c`" -eq 0; then
ulimit -c 2000
fi
GDB_TEST=`$GDB -v`
if test -z "$GDB_TEST"; then
echo "Please install gdb first."
echo "goto http://www.gnu.org/software/gdb/ "
DEBUG="" # turn off debugging cause gdb isn't installed
fi

fi

if test -n "$RESTART" ; then
echo "Auto-restarting the server on crash"

#loop forever
while true
do

# run the server :) the $* passes all the arguments provided to the script
# to the server binary
$HL $*

if test $? -eq 0; then
break; # the binary exited properly, usually due to a "quit"
fi

if test -n "$DEBUG" ; then
if test -f core ; then # check a core was dumped
echo "bt" > debug.cmds;
echo "info locals" >> debug.cmds;
echo "info sharedlibrary" >> debug.cmds
echo "info frame" >> debug.cmds; # works, but gives an error... must be last
echo "----------------------------------------------" >> $DEBUG_LOG
echo "CRASH: `date`" >> $DEBUG_LOG
$GDB $HL core -x debug.cmds -batch >> $DEBUG_LOG
echo "End of crash report" >> $DEBUG_LOG
echo "----------------------------------------------" >> $DEBUG_LOG
echo $CRASH_DEBUG_MSG
rm debug.cmds
fi
else
echo "Add \"-debug\" to the $0 command line to generate a debug.log to help with solving this problem"
fi

echo "`date`: Server Died"
sleep $TIMEOUT # don't thrash the hard disk if the server dies, wait a little

done # while true
else
exec $HL $*
fi

echo "`date`: Server Quit"

DieQuh
20.09.03, 23:00
Original geschrieben von d@tenmaulwurf
screen: bash, habe keine root-rechte

nohup ./hlds_run -game cstrike +maxplayers 20 +map cs_assault
nohup: appending output to `nohup.out'

da bleibt er hängen
dann hat doch alles geklappt ;)
mach tail -f nohup.out wenn du den output sehen willst

Jasper
20.09.03, 23:04
Original geschrieben von d@tenmaulwurf
screen: bash, habe keine root-rechte

nohup ./hlds_run -game cstrike +maxplayers 20 +map cs_assault
nohup: appending output to `nohup.out'

da bleibt er hängen

für screen braucht man keine root-rechte.
zu nohup: sieh dir mal mein posting genau an. da steht ein & am ende.

-j

d@tenmaulwurf
20.09.03, 23:09
Es gibt andere probs:

WARNING: UDP_OpenSocket: port: 27015 bind: Address already in use
FATAL ERROR (shutting down): Couldn't allocate dedicated server IP port

das kommt nur mit nohup.

derRichard
20.09.03, 23:28
hallo!

du musst nur am ende vom befehl ein "&" machen, dann geht es.

//richard

d@tenmaulwurf
21.09.03, 09:15
Das Prob betshet trotzdem weiterhin:

nohup ./hlds_run -game cstrike +maxplayers 10 +map cs_dust2 &
nohup: appending output to `nohup.out'
[1] 4967
datenmaulwurf@linux:~/HL3110+CS1.5_Server/hlds_l> tail -f nohup.out Host_Init
Added packfile /home/datenmaulwurf/HL3110+CS1.5_Server/hlds_l/valve/pak0.pak (985 files)
Protocol version 46
Exe version 3.1.1.0
Exe build: 14:46:34 Jun 11 2002 (2056)
WON Auth Server
WARNING: UDP_OpenSocket: port: 27015 bind: Address already in use
FATAL ERROR (shutting down): Couldn't allocate dedicated server IP port
Add "-debug" to the /home/datenmaulwurf/HL3110+CS1.5_Server/hlds_l/hlds_run command line to generate a debug.log to help with solving this problem
Sun Sep 21 09:58:29 CEST 2003: Server Died

Svenny
21.09.03, 09:33
steht doch da

bind: Address already in use

d@tenmaulwurf
21.09.03, 09:56
und das heißt?
Was muss cih anders machen?

d@tenmaulwurf
21.09.03, 10:03
ARGH!

SORRY @ ALLE die so viel Geduld mit mir hatten :)

Ich habe es nochmal ohne nohup versucht, da kam der gleiche Fehler...
musste erst den Prozess killen mit killall.

THX

N1Md4
28.09.03, 20:28
hi starte mal den server damit...

screen -A -m -d -S 16test ./hlds_run -game cstrike +maxplayers 10 +ip 217.160.216.139 -port 27016 +map de_dust -pingboost 3 -noipx -tos +sys_ticrate 1000 +exec server.cfg

erklärung für einzelne befehle...

pingboost versteht sich von selbst
noipx ist für keine ipx unterstützung bewirkt eine kleine erhöhung der fps des server
tos ist eigentlich nur fürs netzwerk
sys_ticrate 1000 bewirkt das dein cs server anstatt mit ca 50 fps mit satten 500 - 750 fps flitzt was sich auswirkt auf weniger lags usw.

der rest sollte klar sein

die screen parameter sind über man screen abrufbar : )

mfg

N1Md4

und zu deinem bind error probier nen anderen port +port 27016 z.b.