You are an unregistered user, you can register here
Navigation

Information

Site

Donations
If you wish to make a donation you can by clicking the image below.


 
Go Back   The Unreal Admins Page > Forums > Unreal Admins > Unreal Tournament 2003/2004 > UT2003/4 Server - Linux Specific

Reply
Thread Tools Display Modes
  #1  
Unread 3rd July, 2004, 04:09 PM
trulli's Avatar
trulli trulli is offline
Killing Spree
 
Join Date: Jun 2004
Posts: 18
Exclamation 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
Reply With Quote
  #2  
Unread 3rd July, 2004, 05:47 PM
trulli's Avatar
trulli trulli is offline
Killing Spree
 
Join Date: Jun 2004
Posts: 18
Default

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?
Reply With Quote
  #3  
Unread 6th July, 2004, 03:21 AM
Korben Korben is offline
Forum Newcomer
 
Join Date: Mar 2004
Posts: 8
Arrow

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
Reply With Quote
  #4  
Unread 6th July, 2004, 12:47 PM
trulli's Avatar
trulli trulli is offline
Killing Spree
 
Join Date: Jun 2004
Posts: 18
Default

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.
Reply With Quote
  #5  
Unread 10th July, 2004, 03:31 PM
Undy Undy is offline
Killing Spree
 
Join Date: Jul 2004
Location: Holland, Eindhoven
Posts: 21
Default

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.
Reply With Quote
  #6  
Unread 16th July, 2004, 04:54 AM
jsumners's Avatar
jsumners jsumners is offline
Rampage
 
Join Date: Jul 2004
Location: Atlanta, GA
Posts: 69
Default

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.
Reply With Quote
  #7  
Unread 16th July, 2004, 10:06 AM
Naked_Ape's Avatar
Naked_Ape Naked_Ape is offline
Holy Shit!!
 
Join Date: Jun 2003
Location: .gif
Posts: 584
Default

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.
Reply With Quote
  #8  
Unread 16th July, 2004, 03:23 PM
jsumners's Avatar
jsumners jsumners is offline
Rampage
 
Join Date: Jul 2004
Location: Atlanta, GA
Posts: 69
Default

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.
Reply With Quote
  #9  
Unread 16th July, 2004, 06:27 PM
jsumners's Avatar
jsumners jsumners is offline
Rampage
 
Join Date: Jul 2004
Location: Atlanta, GA
Posts: 69
Default

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
Reply With Quote
  #10  
Unread 16th July, 2004, 07:30 PM
trulli's Avatar
trulli trulli is offline
Killing Spree
 
Join Date: Jun 2004
Posts: 18
Default

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
Reply With Quote
  #11  
Unread 16th July, 2004, 07:43 PM
jsumners's Avatar
jsumners jsumners is offline
Rampage
 
Join Date: Jul 2004
Location: Atlanta, GA
Posts: 69
Default

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.
Reply With Quote
  #12  
Unread 24th November, 2004, 10:33 PM
meth meth is offline
Killing Spree
 
Join Date: Aug 2004
Posts: 15
Default

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?
Reply With Quote
  #13  
Unread 24th November, 2004, 11:47 PM
jsumners's Avatar
jsumners jsumners is offline
Rampage
 
Join Date: Jul 2004
Location: Atlanta, GA
Posts: 69
Default

Did you look at the script?
Reply With Quote
  #14  
Unread 25th November, 2004, 12:02 AM
meth meth is offline
Killing Spree
 
Join Date: Aug 2004
Posts: 15
Default

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
Reply With Quote
  #15  
Unread 25th November, 2004, 04:45 AM
PsychoChihuahua PsychoChihuahua is offline
Godlike
 
Join Date: Mar 2004
Location: Colorado
Posts: 258
Default

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.
Reply With Quote
  #16  
Unread 25th November, 2004, 04:45 AM
PsychoChihuahua PsychoChihuahua is offline
Godlike
 
Join Date: Mar 2004
Location: Colorado
Posts: 258
Default

-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.
Reply With Quote
  #17  
Unread 25th November, 2004, 05:15 AM
meth meth is offline
Killing Spree
 
Join Date: Aug 2004
Posts: 15
Default

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.
Reply With Quote
  #18  
Unread 25th November, 2004, 06:38 AM
Naked_Ape's Avatar
Naked_Ape Naked_Ape is offline
Holy Shit!!
 
Join Date: Jun 2003
Location: .gif
Posts: 584
Default

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?
Reply With Quote
  #19  
Unread 25th November, 2004, 02:59 PM
meth meth is offline
Killing Spree
 
Join Date: Aug 2004
Posts: 15
Default

yup
Reply With Quote
  #20  
Unread 25th November, 2004, 10:51 PM
PsychoChihuahua PsychoChihuahua is offline
Godlike
 
Join Date: Mar 2004
Location: Colorado
Posts: 258
Default

Why do you have to use screen, just out of curiosity?
__________________
A few ut2004 resources can be found here.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 06:40 AM.


 

All pages are copyright The Unreal Admins Page.
You may not copy any pages without our express permission.