Donations
|
If you wish to make a donation you can by clicking the image below.
|
|
|
|
|
3rd July, 2004, 04:09 PM
|
|
Killing Spree
|
|
Join Date: Jun 2004
Posts: 18
|
|
Server not starting when using screen "signal: SIGHUP [hangup]"
just installed Fedora core 2 x86_64 on my new server (dual opteron 242)
i configured a ut2k4server on it.. when i start these servers without a screen session everything is ok.. but when i add screen -S <name> to the start script, the server wants to start and while starting it puts out the following:
Code:
issing Class Class Editor.TransBuffer
Browse: CTF-Drunklet-PRO?game=XGame.xCTFGame?mutator=XGame.MutInstaGib,XGame.MutNoAdrenaline
ProcMesh 0 shared verts.
Collecting garbage
Purging garbage
Garbage: objects: 35791->35782; refs: 400143
Game class is 'xCTFGame'
Bringing Level CTF-Drunklet-PRO.myLevel up for play (40) appSeconds: 9.165968...
Loading Admins & Groups
Kick and Ban Privileges Loaded
Maps & Game Privileges Loaded
Admins & Groups Management Loaded
Extra Privileges Loaded
Mutators XGame.MutInstaGib,XGame.MutNoAdrenaline
GameInfo::InitGame : bEnableStatLogging False
Spawning Anti Bypass Tool
UdpServerQuery(crt): Port 7787 successfully bound.
Resolving master0.gamespy.com...
MasterServerUplink: MasterServerGameStats not found - stats uploading disabled.
Signal: SIGHUP [hangup]
Requesting Exit.
appRequestExit(0)
Resolving ut2004master1.epicgames.com...
Loading Available Maps
Loading Game Types
Mutator exported successfully: SpiderSteroids.MutSpiderSteroidReplacer
Weapon exported successfully: SpiderSteroids.SpiderSteroidLayer
XWebAdmin.UTServerAdmin Initialized on port 7780
Success - 0 error(s), 1 warning(s)
when i start the server without a screen session in the script it works fine.
would b nice if some1 knows why it's exiting with:
Code:
Signal: SIGHUP [hangup]
Requesting Exit.
appRequestExit(0)
never seen it before
|
3rd July, 2004, 05:47 PM
|
|
Killing Spree
|
|
Join Date: Jun 2004
Posts: 18
|
|
btw, i tried to make a new config.. but this 1 had the same error.. and it doesnt matter what patch i'm installing.
any1 know's what's wrong?
|
6th July, 2004, 03:21 AM
|
Forum Newcomer
|
|
Join Date: Mar 2004
Posts: 8
|
|
Trulli,
What is the command you're using to start screen? I use:
screen -dmS myserver ./ucc-bin ......
That starts the screen in 'detached' mode. Hope that helps.
Brian
|
6th July, 2004, 12:47 PM
|
|
Killing Spree
|
|
Join Date: Jun 2004
Posts: 18
|
|
well i tried serveral things.. the first thing i used was idd "-dmS" that didnt work so i tried "-S".. neither of these work.. but the strange thing is.. when i start a screen session manually and start a server in it.. and detach it... the server stays up.
Last edited by trulli : 9th July, 2004 at 04:45 PM.
|
10th July, 2004, 03:31 PM
|
Killing Spree
|
|
Join Date: Jul 2004
Location: Holland, Eindhoven
Posts: 21
|
|
Hmz i have the same problem with fedora 1
2.6.6 kernel.
Then it runs but i cant enter the server etc.
When i start it with a manuel screen -S 2k4 ./ucc etc it runs good.
But i also cant use any other start/stop scripts from these forums.
This wasnt when i had the 2.4.x kernel so i think there is some problem in the new kernel.
|
16th July, 2004, 04:54 AM
|
|
Rampage
|
|
Join Date: Jul 2004
Location: Atlanta, GA
Posts: 69
|
|
I have encountered this problem as well. What is happening is screen is sending SIGHUP because the terminal is hanging up. See http://www.wlug.org.nz/SIGHUP for more info.
Sadly, I have not been able to get ucc-bin to ignore this signal and continue loading. I am unsure why it doesn't receive the signal when the session is detached manually because it should be being sent then as well.
I filed this bug https://bugzilla.icculus.org/show_bug.cgi?id=1861 but I don't really know if it is a fault of ucc-bin or not.
|
16th July, 2004, 10:06 AM
|
|
Holy Shit!!
|
|
Join Date: Jun 2003
Location: .gif
Posts: 584
|
|
Quote:
Originally Posted by jsumners
I have encountered this problem as well. What is happening is screen is sending SIGHUP because the terminal is hanging up. See http://www.wlug.org.nz/SIGHUP for more info.
|
I get this too under 2.6 but my ucc-bin just terminates, no mention of SIGHUP. And screen should *not* send a SIGHUP when detatching, the sole purpose of screen is to isolate the application from the controlling terminal. If you have verified that screen actually does send a SIGHUP you should report that to the screen developers.
Quote:
Originally Posted by jsumners
Sadly, I have not been able to get ucc-bin to ignore this signal and continue loading. I am unsure why it doesn't receive the signal when the session is detached manually because it should be being sent then as well.
I filed this bug https://bugzilla.icculus.org/show_bug.cgi?id=1861 but I don't really know if it is a fault of ucc-bin or not.
|
ucc-bin probably shouldn't ignore the SIGHUP signal so ucc-bin isn't at fault. Since this appeared under 2.6 kernels while 2.4 works just fine I believe this is a problem with screen and the kernel.
|
16th July, 2004, 03:23 PM
|
|
Rampage
|
|
Join Date: Jul 2004
Location: Atlanta, GA
Posts: 69
|
|
If you run it through strace and trace the signals you will see that the last signal sent is SIGHUP (`strace -e trace=signal screen -dmS ut2004 ./ucc-bin server <...>`). I am seeking further assistance on the screen mailing list and will keep this thread updated as I figure out more about it.
It is terribly annoying that I got everything configured the way I want and my script written only to find out that ucc-bin refuses to work properly with screen.
|
16th July, 2004, 06:27 PM
|
|
Rampage
|
|
Join Date: Jul 2004
Location: Atlanta, GA
Posts: 69
|
|
Okay folks, I have a solution. I am just going to paste the script I have written to run my server(s) and you can take from it what you will. I designed it so that it can be run from a crontab every thirty minutes or so to make sure the server is running without me having to do anything. What I found the problem to be is that ucc-bin was getting the hangup signal too early, i.e. before the main program loop, and was thusly shutting down. This script also fixes an issue with Debian (Woody) not being able to run it because the binary is linked with gcc3.2.
Enjoy.
Code:
#!/bin/sh
#
# This script was written by James Sumners <[email protected]>.
# No guarantees are made as to its function.
#
# This script requires the 'screen' utility to be installed and in
# the scripts PATH. Sure, it could have been done with pid files
# but I like to be able to attach to the server and watch it.
#
# This script was written and test on Debian (Woody).
#
#
# Modify these variables as you wish.
# The INI_FILE and LOG_FILE variables are relative to ~/.ut2004/System/
# So, the default setup will use the ini file:
# ~/.ut2004/System/00deathmatch.ini
# This is a limit of Unreal that I do not know how to over come.
#
DATE=`date +"%d_%B_%Y"` # Used to name the log file
SESSION_NAME="deathmatch" # Used to identify if this script has already been run (useful if you run more than one server)
GAME_DIR="/usr/games/ut2004/System" # Path to the UT2004 "System" directory
GAME="DM-CBP2-KillbillyBarn?game=XGame.xDeathMatch?Mutator=XGame.MutUDamageReward" # Basic game options (Gametype, Mutators, extra options, etc.)
PORT="7777" # The port that the server will use
INI_FILE="00deathmatch.ini" # The ini file you wish to use with this server
LOG_FILE="logs/deathmatch/ut2004.log" # The log file for this server
# The following line is useful on Debian Woody using this package:
# http://icculus.org/updates/cod/gcc3-libs.tar.bz2
# Modify it to suit your system if need be.
LD_LIBRARY_PATH=${HOME}/gcc3:$LD_LIBRARY_PATH
### YOU SHOULD NOT HAVE TO MODIFY ANYTHING BELOW THIS LINE ###
# Determine if the server is already running.
screen -list | grep ${SESSION_NAME} > /dev/null
case $? in
[0]*)
# The server is already running so we don't need to run it again.
echo "Error: Server already running. Script exiting."
exit 1
;;
[1]*)
# Start the server in the background.
cd ${GAME_DIR}
screen -dmS ${SESSION_NAME} bash -c ""LD_LIBRARY_PATH=${LD_LIBRARY_PATH}" ./ucc-bin server ${GAME} "port=${PORT}" "ini=${INI_FILE}" "log=${LOG_FILE}"; sleep 30"
;;
esac
|
16th July, 2004, 07:30 PM
|
|
Killing Spree
|
|
Join Date: Jun 2004
Posts: 18
|
|
Quote:
# Modify these variables as you wish.
# The INI_FILE and LOG_FILE variables are relative to ~/.ut2004/System/
# So, the default setup will use the ini file:
# ~/.ut2004/System/00deathmatch.ini
# This is a limit of Unreal that I do not know how to over come.
#
|
just add "-nohomedir" to the end of your "$GAME" line. then it will use the ini file in ur standard directory
and btw, the scripts works fine when i'm logged in as root, but not as user. it isn't starting a screen session but only the bash and ./ucc-bin. think it's just my fault tho ;p
|
16th July, 2004, 07:43 PM
|
|
Rampage
|
|
Join Date: Jul 2004
Location: Atlanta, GA
Posts: 69
|
|
I specifically designed the script to NOT use '-nohomedir' though you can if you wish. I run the server with an unprivileged user. There is absolutely no way in hell I will run the server as root. This is a VERY public service and can be exploited; I will not give the exploiter root permissions on a silver platter. When I say that I can not overcome it using "~/.ut2004/System/<whatever>.ini" I mean that I want to be able to specify an arbitray ini in an arbitrary location such as "~/server_inis/deathmatch.ini". If you can tell me how to do that I would appreciate it.
|
24th November, 2004, 10:33 PM
|
Killing Spree
|
|
Join Date: Aug 2004
Posts: 15
|
|
Any progress on this?
screen -mdS test bash -c ""LD_LIBRARY_PATH=../libs" ./ucc-bin server CTF-BridgeOfFate?game=XGame.xCTFGame port=7777 ini=server.ini -nohomedir"
Doesnt work, even with full path to the libs.
Is it related the version of screen or the kernel itself?
Why is it even sighuping?
|
24th November, 2004, 11:47 PM
|
|
Rampage
|
|
Join Date: Jul 2004
Location: Atlanta, GA
Posts: 69
|
|
Did you look at the script?
|
25th November, 2004, 12:02 AM
|
Killing Spree
|
|
Join Date: Aug 2004
Posts: 15
|
|
I've looked at the script, cant use an entire script.. I need the screen line to start it.
Is this not fixed in the new patch of unreal 3323? Sucks that I have to dl a torrent and upload 50x more then I download to get it directly
|
25th November, 2004, 04:45 AM
|
Godlike
|
|
Join Date: Mar 2004
Location: Colorado
Posts: 258
|
|
Screen is nice, but not necessary. Just nohup the process(es).
NOHUP=/usr/bin/nohup
GAMEDIR=/usr/local/games/ut2k4server
LOGDIR=${GAMEDIR}/logs
LOG=${GAMEDIR}/ut2004-server.log
SERVER=${GAMEDIR}/System/ucc-bin
INIFILE=${GAMEDIR}/System/ut2004.ini
ADMINNAME='AdminName=ChangeMeBeforeUsing'
ADMINPASS='AdminPassword=ChangeMeBeforeUsing'
MUTATORS='Mutator=XGame.MutQuadJump,XGame.MutFastW eapSwitch,Onslaught.MutOnslaughtWeapons'
GAMETYPE=$1 (paraphrased)
${NOHUP} ${SERVER} server "${GAMETYPE}?${ADMINNAME}?${ADMINPASS}?${MUTAT ORS} -ini=${INIFILE} -nohomedir" >> ${LOG} 2>&1
(From a start script which I wrote, as a UID other than root.)
__________________
A few ut2004 resources can be found here.
|
25th November, 2004, 04:45 AM
|
Godlike
|
|
Join Date: Mar 2004
Location: Colorado
Posts: 258
|
|
-ini=/some/nondescript/path/to/some_ini_file
Quote:
Originally Posted by jsumners
When I say that I can not overcome it using "~/.ut2004/System/<whatever>.ini" I mean that I want to be able to specify an arbitray ini in an arbitrary location such as "~/server_inis/deathmatch.ini". If you can tell me how to do that I would appreciate it.
|
__________________
A few ut2004 resources can be found here.
|
25th November, 2004, 05:15 AM
|
Killing Spree
|
|
Join Date: Aug 2004
Posts: 15
|
|
I have to use screen, weird that unreal would be the ONLY game ive found that wont work in screen on 2.6 kernels, hm.
|
25th November, 2004, 06:38 AM
|
|
Holy Shit!!
|
|
Join Date: Jun 2003
Location: .gif
Posts: 584
|
|
meth, I can't remeber what I did to fix this but I'm running UT2k4 with a 2.6.x kernel (Debian GNU/Linux /w custom kernel) just fine. Are you still having problems?
|
25th November, 2004, 02:59 PM
|
Killing Spree
|
|
Join Date: Aug 2004
Posts: 15
|
|
yup
|
25th November, 2004, 10:51 PM
|
Godlike
|
|
Join Date: Mar 2004
Location: Colorado
Posts: 258
|
|
Why do you have to use screen, just out of curiosity?
__________________
A few ut2004 resources can be found here.
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|