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 would b nice if some1 knows why it's exiting with: Code:
Signal: SIGHUP [hangup] |
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? |
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 |
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.
|
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. |
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. |
Quote:
Quote:
|
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. |
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 |
Quote:
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 |
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.
|
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? |
Did you look at the script?
|
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 :( |
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.) |
-ini=/some/nondescript/path/to/some_ini_file
Quote:
|
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.
|
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?
|
yup
|
Why do you have to use screen, just out of curiosity?
|
All times are GMT +1. The time now is 07:45 AM. |