Donations
|
If you wish to make a donation you can by clicking the image below.
|
|
|
|
|
27th December, 2008, 05:06 AM
|
Killing Spree
|
|
Join Date: Jan 2007
Posts: 36
|
|
UT99 Linux Server Start Script
Quote:
Originally Posted by back4more
have modified the ServerStart.bat to reboot server due to crash
Code:
@cls
@echo =========================================
@echo A Small Amendment by BackForMore Oct 2008
@echo =========================================
@echo - Batchfile Name: ServerStart.bat
@echo - Copy to c:\UTServer {Folder}
@echo - Create folder ..\system\Logs\ServerLogs
@echo - Adjust Paths Accordingly c:..cd c:\..
@echo - After Crash , Server will Log / Restart
@echo =========================================
@echo Orignally posted by Baiter
@echo http://www.unrealadmin.org
@echo =========================================
c:
cd c:\UTServer\System
ucc.exe server DM-Deck16][.unr?Game=Botpack.DeathMatchPlus?Mutator={Mutator,List} -log=server.log ini=UnrealTournament.ini
for /f "tokens=1,2" %%u in ('date /t') do set d=%%v
for /f "tokens=1" %%u in ('time /t') do set t=%%u
if "%t:~1,1%"==":" set t=0%t%
set timestr=%d:~6,4%%d:~3,2%%d:~0,2%%t:~0,2%%t:~3,2%
copy server.log c:\UTServer\System\Logs\ServerLogs\serverlog%timestr%.log
copy server.log servercrash%timestr%.log
copy server.log servercrash1.log
c:
cd c:\UTServer
ServerStart.bat
|
Hi!
My first post ever. Been reading a lot the last year, trying to get a UT99 Windows Server working for me and my "school" friends last year. Worked great btw
Now I have an UT99 Linux Server which I based on the Baiter Edition. This is mainly for me and my "local" friends here in Norway. Hosting and running the server myself, with an old Compaq P3 1GHz, 512MB ram machine
The server is working great, with all features I have added.
Mapvote ini with these gametypes.
1. MonsterHunt
2. Instagib
3. Sniper
4. CTF
UTStats, with crontab jobs to copy logs from gamedir to web dir, and a cronjob to execute the, php import.php
Redirect for all files on local webserver.
Everything is working great. BUT, I cant get the ASU working for my server with Linux, so I used a script I found somewhere, its pretty simple but it does the job, and thats enough for me.
Code:
#!/bin/sh
while true
do
./ucc-bin server DM-TV-STORE.unr?Game=botpack.deathmatchplus?mutator=MapVoteLA13.BDBMapVote port=7777 -ini=ut.ini log=server.log -nohomedir
cp -f server.log crash.log
echo "Restarting..."
done
exit 0
Problem is the server logs like this guy in the quote above, that it overwrites itself each time, I would want to add %date% variables to the logs file name. But cant get this to work under linux, therefore I had to post this 1 post in hope that some Linux madman could help me out
Cheers,
sXe
Last edited by sxxxe83 : 8th March, 2009 at 03:42 PM.
|
27th December, 2008, 05:15 AM
|
Super Moderator
|
|
Join Date: Jan 2004
Location: North Carolina
Posts: 2,245
|
|
Why can't you get ASU to work?
|
27th December, 2008, 05:44 AM
|
Killing Spree
|
|
Join Date: Jan 2007
Posts: 36
|
|
Wont start, just got too many errors. So gave it up. May try again, with some help maybe I can get it to work. Will try and post errors in a bit..
Startup script working a bit better btw. Cant get time variables to work though but better
Code:
#!/bin/sh
today=`date +%Y-%m-%d`;
while true
do
cd System; ./ucc-bin server DM-TV-STORE.unr?Game=botpack.deathmatchplus?mutator=MapVoteLA13.BDBMapVote port=7777 -ini=ut.ini log=../Logs/ServerLogs/server-$today.log -nohomedir;cd ..
cp -f ../Logs/ServerLogs/server-$today.log ../Logs/ServerLogs/crash-$today.log
echo "Restarting..."
done
exit 0
|
27th December, 2008, 05:54 AM
|
Killing Spree
|
|
Join Date: Jan 2007
Posts: 36
|
|
ASU install done no problems,
bash asu.sh configurations no problem.
Code:
sxe6:/usr/ut99# ./ucc.init start
Starting Unreal Tournament: Process is already running. Not started.
sxe6:/usr/ut99# Stopping Unreal Tournament: ./ucc.init: line 172: kill: (24469) - No such process
ucc.init
Starting Unreal Tournament: bash: ./ucc: No such file or directory
ucc.init
The right user is also owner of the folder.
Code:
chown -R sxeadmin:sxeadmin /ut99
has been executed but it still wont work...
chmod 777 is also set on the entire folder (will change back as soon as I get this working)...
And trying to get that to work, I came over that small startup script above that is starting everytime
sXe
edit:
Using the ucc.init restart is just the same:
Code:
sxeadmin@sxe6:/usr/ut99$ ./ucc.init restart
Stopping Unreal Tournament: ./ucc.init: line 172: kill: (25443) - No such process
ucc.init
Starting Unreal Tournament: bash: ./ucc: No such file or directory
ucc.init
sxeadmin@sxe6:/usr/ut99$ Stopping Unreal Tournament: ./ucc.init: line 172: kill: (26277) - No such process
ucc.init
Starting Unreal Tournament: bash: ./ucc: No such file or directory
ucc.init
edit: 2
Using Debian Etch 4 as OS btw.
Code:
sxe6:/usr/ut99# uname -a
Linux sxe6 2.6.26-1-686 #1 SMP Sat Nov 8 19:00:26 UTC 2008 i686 GNU/Linux
edit: 3
The file: libSDL-1.2.so.0 is also in place in the /System folder.
Last edited by sxxxe83 : 27th December, 2008 at 07:16 AM.
|
27th December, 2008, 03:06 PM
|
|
Holy Shit!!
|
|
Join Date: Apr 2003
Posts: 4,029
|
|
Hmm, maybe a path needs to be set somewhere.
__________________
How to feck up a perfectly good game:
UT (1999) = UnbelievableGameSoCoolIMustHelpBringNewPlayers Tournament
UT (2008) = Unreal ThrustMyPrivatePartsInYourFaceBish
And that's probably why UTIII was a relative flop. New game, same sh*thead players ^^.
|
27th December, 2008, 03:53 PM
|
Killing Spree
|
|
Join Date: Jan 2007
Posts: 36
|
|
Thanks for the tip.
Tried to change most of the variables to the full path, here and there. Still no-go.
Tried this also: http://www.unrealadmin.org/forums/ar...hp/t-9964.html
This guy got it working, but it did not help me....
Code:
Ok... my server works now..
ehm.. PooKer.. I know what your problem is..
It IS the multimesh...
delete the line "ServerPackages=MultiMesh" from your UnrealTournament.ini or server.ini
or install the UTBonusPack
that should help
The server is running the latest "UTPGPatch451LINUX" if that helps...
edit Tried to set the whole path and no variables here and got a bit further...
Code:
MYEXECMD="/usr/ut99/System/./ucc-bin server DM-TV-STORE.unr?Game=botpack.deathmatchplus?mutator=MapVoteLA13.BDBMapVote port=7777 -ini=ut.ini log=../Logs/ServerLogs/server.log -nohomedir"
Output
Code:
sxeadmin@sxe6:/usr/ut99$ ./ucc.init start
Starting Unreal Tournament: /usr/ut99/System/./ucc-bin: error while loading shared libraries: Engine.so: cannot open shared object file: No such file or directory
ucc.init
sxeadmin@sxe6:/usr/ut99$ Stopping Unreal Tournament: ./ucc.init: line 172: kill: (18692) - No such process
ucc.init
Last edited by sxxxe83 : 27th December, 2008 at 04:12 PM.
|
27th December, 2008, 04:13 PM
|
Killing Spree
|
|
Join Date: Jan 2007
Posts: 36
|
|
OH MY GOD!!
With this it did start...
Code:
MYEXECMD="cd System; ./ucc-bin server DM-TV-STORE.unr?Game=botpack.deathmatchplus?mutator=MapVoteLA13.BDBMapVote port=7777 -ini=ut.ini log=../Logs/ServerLogs/server.log -nohomedir;cd .."
Here is my whole ucc.init
Code:
#!/bin/sh
#
# standard format startup script for unreal tournament
#
# (c) 1999-2002 [email protected]
# last modified 2002-04-24
######################################################
MYNAME=ucc.init
MYGAME=Botpack.DeathMatchPlus
MYMAP=DM-TV-STORE
MYUSERID=sxeadmin
MYDIR=/usr/ut99
MYIP=xx.xx.xx.xx
MYMODS=MapVoteLA13.BDBMapVote
MYINI=/usr/ut99/System/ut.ini
MYUSER=User.ini
MYLOGFILE="$MYDIR/Logs/$MYNAME.log"
MYLOCKFILE="$MYDIR/System/$MYNAME.lock"
# MAXLOGSIZE is the maximum size allowed (in kB) by the "check"
# procedure -- if "check" is called and the log size is greater than
# this value then "logrotate" will be invoked; suggested value: 1024
# set MAXLOGSIZE to 0 to disable logratate if you are having trouble
# -- you will still be able to call "logrotate" manually
MAXLOGSIZE=1024
# MAXLOGFILES is the number of backup log files that will be kept
# when "logrotate" is called; suggested value: 4
# warning: if this value is 0 then no backup log files will be kept
# and the current log will be overwritten if the logs are rotated.
MAXLOGFILES=4
# MONITORFREQ is the time (in seconds) between each call to "check"
# by the "infinity" loop; suggested value: 60
# warning: setting this too low can cause bad things to happen.
MONITORFREQ=60
# BROKENCPUTIME is the maximum %cpu usage that is allowed if this is
# exceeded in two successive checks (seperated by the amount of time
# determined by MONITORFREQ) then the server will be restarted.
# set to 0 to disable, must be below 100; suggested value: 99
# warning: setting this too low can cause the server to restart a lot
BROKENCPUTIME=99
# LOGSPAMCHECK is used to detect that the server is in a bad loop
# this can happen if the same message is output to the log over and over
# when this happens, we must restart the server -- valid values: 0 or 1
# set this to 0 if you do not want this check to happen
LOGSPAMCHECK=1
# NICELEVEL is used to attempt to run ucc at a higher priority than other tasks
# (this has no effect unless you exec this script as root)
# you must set the NICELEVEL to a negative value, which will tell the kernel
# that this process does not play "nice" with other processes and will demand
# more attention -- valid values 0 to -20
# suggested value: 0 or -10
# the "nice" command may not work in some shells, in this case set to 0
NICELEVEL=0
# CANSUID determines if the command uses "su" when executed by root
# or if it tries to chown/chmod the ucc-bin command before executing it.
# set CANSUID to zero if you have trouble -- valid values: 0 or 1
CANSUID=0
######################################################
#
# no user servicable parts beyond this point.
#
# if you find that you need to change anything below here,
# please contact me because i would like to ensure that this
# is no longer necessary (for any reason)
#
# send feedback to [email protected]
# thank-you
#
######################################################
WriteToLog ()
{
TIME=$(date +"%Y-%m-%d %H:%M:%S")
$SUID "echo \"[$TIME] $MYNAME: $1\" >> $MYLOGFILE"
}
if [ ! -d "$MYDIR/System" ]; then
echo "ERROR: Can not find System directory in $MYDIR"
exit -2
fi
if [ ! -d "$MYDIR/Logs" ]; then
echo "ERROR: Can not find Logs directory in $MYDIR"
exit -2
fi
ulimit -c 0
if [ -z "$MYMODS" ]; then
TMP="$MYMAP""\?game=$MYGAME"
else
TMP="$MYMAP""\?game=$MYGAME""\?mutator=$MYMODS"
fi
if [ -n "$MYIP" ]; then
TMP="$TMP multihome=$MYIP"
fi
if [ -n "$MYUSER" ]; then
TMP="$TMP userini=$MYUSER"
fi
if [ -n "$MYINI" ]; then
TMP="$TMP ini=$MYINI"
fi
MYEXECMD="cd System; ./ucc-bin server DM-TV-STORE.unr?Game=botpack.deathmatchplus?mutator=MapVoteLA13.BDBMapVote port=7777 -ini=ut.ini log=../Logs/ServerLogs/server.log -nohomedir;cd .."
OUTLOG="$MYLOGFILE"
SUID="bash -c"
if [ `whoami` = "root" ]; then
ATTEMPTNICE=
if [ $NICELEVEL -ne 0 ]; then
ATTEMPTNICE="nice -n $NICELEVEL"
fi
if [ "$CANSUID" = "1" ]; then
SUID="$ATTEMPTNICE su $MYUSERID -c"
else
SUID="$ATTEMPTNICE $SUID"
chown $MYUSERID $MYDIR/System/ucc-bin
chmod u+s $MYDIR/System/ucc-bin
fi
fi
case "$1" in
start)
$0 soft-start
$0 infinity &
;;
stop)
if [ -f "$MYLOCKFILE.8" ]; then
# break infinity simply by removing the lock file
rm -f $MYLOCKFILE.8
fi
$0 soft-stop
;;
restart)
$0 stop
$0 start
;;
soft-start)
echo -n "Starting Unreal Tournament: "
if [ -f $MYLOCKFILE ]; then
echo "Process is already running. Not started."
else
$0 logrotate >/dev/null
cd $MYDIR
WriteToLog "soft-start"
# the log file must be written with append (">>") or the logrotate
# will not work. also, we must echo the PID to the lock file on the
# same command line so that we do not create permission problems
# with the lock file if logged in as root
$SUID "$MYEXECMD >> $OUTLOG & echo \$! > $MYLOCKFILE"
echo "$MYNAME"
fi
;;
soft-stop)
echo -n "Stopping Unreal Tournament: "
if [ ! -f $MYLOCKFILE ]; then
echo "not found"
exit -4
fi
WriteToLog "soft-stop"
kill -TERM $(cat $MYLOCKFILE)
rm -f "$MYLOCKFILE"
echo "$MYNAME"
;;
soft-restart)
if [ -f $MYLOCKFILE ]; then
$0 soft-stop
fi
$0 soft-start
;;
infinity)
# "infinity" -- this command is used to start an
# infinite loop to ensure that server is always up without use of cron
$SUID "echo $$ > $MYLOCKFILE.8"
# note, overwriting the infinity (.8) lock file will kill any previous
# infinity # process because the pid will no longer match -- this is a
# good thing and saves us from trying to seek out old processes to kill
# them.
# further note, running "check" will also ensure that we kill any
# previous pids (of the non-infinity type) before restarting the server
# .. this means that any server process that may still be running
# (with a valid lock file) will be killed before restarting the server.
while [ -f $MYLOCKFILE.8 -a "$$" = "$(cat $MYLOCKFILE.8 2>/dev/null)" ]; do
$0 check
sleep $MONITORFREQ
done
;;
check)
# check if process is alive
PROC=$(cat $MYLOCKFILE 2>/dev/null)
if [ -z "$(ps -p $PROC 2>/dev/null | grep ucc)" ]; then
WriteToLog "restarting because pid died"
$0 soft-restart
exit 1
fi
# check if overworking the cpu (condition is usually unrecoverable)
if [ $BROKENCPUTIME -gt 0 ]; then
# need the zero in front in case the command substitution returns a null
CPUTIME=0$(ps auxw | sed -n -e "s/^$MYUSERID\ *$PROC\ *\([0-9]*\).*$/\1/"p)
if [ $CPUTIME -ge $BROKENCPUTIME ]; then
WriteToLog "cpu time is over $BROKENCPUTIME at $CPUTIME"
WriteToLog "Pausing for 60 seconds to see if it is still evil..."
sleep 60
CPUTIME=0$(ps auxw | sed -n -e "s/^$MYUSERID\ *$PROC\ *\([0-9]*\).*$/\1/"p)
WriteToLog "cpu time = $CPUTIME"
if [ $CPUTIME -ge $BROKENCPUTIME ]; then
$0 soft-restart
exit 1
fi
fi
fi
# check if logrotate is necessary
if [ $MAXLOGSIZE -gt 0 ]; then
# need the zero in front in case the command substitution returns a null
LOGSIZE=0$(ls -sk $MYLOGFILE | sed -n 's/^\([0-9]*\).*$/\1/p')
if [ $LOGSIZE -gt $MAXLOGSIZE ]; then
if [ $LOGSPAMCHECK = "1" -a $LOGSIZE -gt $(($MAXLOGSIZE + 1024)) ]; then
# error -- logs are waaay too big (1MB over MAXLOGSIZE)
# something must be wrong -- this may happen if stuck in an
# endless loop -- must restart server
WriteToLog "restarting because log file is more than 1MB over MAXLOGSIZE"
$0 soft-restart
else
$0 logrotate
fi
fi
fi
;;
logrotate)
if [ -s "$MYLOGFILE" ]; then
if [ $MAXLOGFILES -gt 0 ]; then
WriteToLog "Rotating logs..."
COUNT=$MAXLOGFILES
NEXTLOG="$MYLOGFILE.$COUNT"
COUNT=$(($COUNT - 1))
PREVLOG="$MYLOGFILE.$COUNT"
while [ $COUNT -gt 0 ]; do
if [ -f "$PREVLOG" ]; then
$SUID "mv $PREVLOG $NEXTLOG"
fi
NEXTLOG=$PREVLOG
COUNT=$(($COUNT - 1))
PREVLOG="$MYLOGFILE.$COUNT"
done
$SUID "cp $MYLOGFILE $NEXTLOG"
else
WriteToLog "Rotating logs... -- MAXLOGFILES is not set -- log file not saved!!"
fi
$SUID "cat /dev/null > $MYLOGFILE"
else
WriteToLog "Rotating logs... -- MYLOGFILE is empty -- not rotating!"
fi
;;
*)
echo "Usage: $0 {start|stop|restart|check|logrotate}"
exit -1
esac
exit 0
Thats it, all working. Thanks
sXe
Last edited by sxxxe83 : 27th December, 2008 at 04:16 PM.
|
27th December, 2008, 05:20 PM
|
|
Holy Shit!!
|
|
Join Date: Apr 2003
Posts: 4,029
|
|
Maybe ucc-bin doesn't interpret paths properly. Nice to hear you got the server going.
__________________
How to feck up a perfectly good game:
UT (1999) = UnbelievableGameSoCoolIMustHelpBringNewPlayers Tournament
UT (2008) = Unreal ThrustMyPrivatePartsInYourFaceBish
And that's probably why UTIII was a relative flop. New game, same sh*thead players ^^.
|
27th December, 2008, 10:44 PM
|
Super Moderator
|
|
Join Date: Jan 2004
Location: North Carolina
Posts: 2,245
|
|
I use ASU on all my servers, its a very nice utility. Though I am not sure on why you are getting those errors, unless it's not installed properly and/or your user account is jailed or possibly there are some permissions setup incorrectly.
|
28th December, 2008, 04:22 AM
|
Killing Spree
|
|
Join Date: Jan 2007
Posts: 36
|
|
Quote:
Originally Posted by 2399Skillz
I use ASU on all my servers, its a very nice utility. Though I am not sure on why you are getting those errors, unless it's not installed properly and/or your user account is jailed or possibly there are some permissions setup incorrectly.
|
Did a fresh install of Ubuntu Server 8.10, on a different machine P4 3GHz, 1GB RAM (was a bit too weak the other one). Followed the directions for installing configuring ASU 0.6, I am 100% sure about the userid rights, and what he can and cant do. I got the same error.
Was testing some now.
This is the original MYEXECMD created by the "bash asu.sh" thingy.
Code:
MYEXECMD="./ucc server $TMP --nohomedir log=/dev/null"
OUTLOG="$MYLOGFILE"
I thought it was "ucc-bin" that started it all..!?!
That aint working for me. First of all, I have to have the "--nohomedir" at the very end, not in the middle or something.
This its working for me: It will not start without the "cd System;" AND "-nohomedir;cd.." at the end. And "ucc-bin".
Code:
MYEXECMD="cd System; ./ucc-bin server $TMP log=/dev/null -nohomedir;cd.."
OUTLOG="$MYLOGFILE"
sXe
Last edited by sxxxe83 : 28th December, 2008 at 04:44 AM.
|
9th February, 2009, 01:16 PM
|
Super Moderator
|
|
Join Date: Jan 2004
Location: North Carolina
Posts: 2,245
|
|
I know this is a very late reply, but I just stumbled upon it again.
Do you have a ucc file in the root directory of the server install? Should be a ucc file in the same directory as the ucc.init file.
|
10th February, 2009, 08:31 AM
|
Rampage
|
|
Join Date: Oct 2005
Posts: 71
|
|
as fas i know, the ucc, should be in the UT directory..
never in a root / directory...
|
10th February, 2009, 09:26 AM
|
Super Moderator
|
|
Join Date: Jan 2004
Location: North Carolina
Posts: 2,245
|
|
Quote:
Originally Posted by spatieman
as fas i know, the ucc, should be in the UT directory..
never in a root / directory...
|
I suggest you go download the linux server package and look for yourself.
http://ut-files.com/index.php?dir=En...er436final.zip
The ucc file is in the root directory of the UT server; IE: the directory where the ucc.init file from the asu script resides, the system, music, sounds, textures, maps, help and web directories all reside in there as well as other files/directories.
The reason why I ask this is because the problem he is having would be in line with that file being missing, since he had to change the line from
MYEXECMD="./ucc server $TMP --nohomedir log=/dev/null"
to
MYEXECMD="cd System; ./ucc-bin server $TMP log=/dev/null -nohomedir;cd.."
Last edited by 2399Skillz : 10th February, 2009 at 09:30 AM.
|
2nd March, 2009, 05:57 PM
|
Killing Spree
|
|
Join Date: Jan 2007
Posts: 36
|
|
Quote:
Originally Posted by 2399Skillz
I know this is a very late reply, but I just stumbled upon it again.
Do you have a ucc file in the root directory of the server install? Should be a ucc file in the same directory as the ucc.init file.
|
No there is no "ucc" file. Does that come with the .... Never mind, checked the http://ut-files.com/index.php?dir=En...er436final.zip and placed the "ucc" file where it belongs. So that was missing all the time
But it worked great by linking to the "ucc-bin" file though, but now it is as it was intended
sXe
|
10th April, 2013, 08:55 PM
|
Forum Newcomer
|
|
Join Date: Jan 2012
Posts: 6
|
|
Hey guys i have this problem with UT99 Server. Trying to configure a game server on a hp ml350 g5 server with dual xeon i just got at home. I did all the steps and tried everything but i just hang up on this and i don't know what to do please help me !
Quote:
Failed to load 'BP1Handler5v': Can't find file for package 'Multimesh'
History: UObject::SafeLoadError <- UObject::GetPackageLinker <- UGameEngine::BuildServerMasterMap <- ULevel::Listen <- Listen <- UGameEngine::LoadMap <- LocalMapURL <- UGameEngine::Browse <- UGameEngine::Init <- UServerCommandlet::Main
Exiting due to error
Exiting.
Name subsystem shut down
bash: cd..: command not found
ucc.init
|
|
10th April, 2013, 10:54 PM
|
Holy Shit!!
|
|
Join Date: Mar 2007
Posts: 1,726
|
|
Looks like you are missing bphandler. Are you using pure?
|
10th April, 2013, 11:24 PM
|
Holy Shit!!
|
|
Join Date: Nov 2006
Location: France
Posts: 1,845
|
|
you ned this file BP1Handler7G.u
|
11th April, 2013, 05:27 PM
|
Forum Newcomer
|
|
Join Date: Jan 2012
Posts: 6
|
|
Thanks for the help guys !
ACE and UTPure are now working so is UT99 Server but i have a problem with MapVoteLA, i've copied the mutator exactly from a UT Windows server were it worked fine, in Linux when i change the map it loads the same map and i get kicked from the server, can anoybody help me fix MapVoteLA ?
Last edited by Shimano : 11th April, 2013 at 09:30 PM.
|
11th April, 2013, 10:41 PM
|
Holy Shit!!
|
|
Join Date: Mar 2007
Posts: 1,726
|
|
Have you tried refreshing the mapvote first?
|
11th April, 2013, 11:20 PM
|
Holy Shit!!
|
|
Join Date: Nov 2006
Location: France
Posts: 1,845
|
|
CTF-Face ?
|
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
|
|
|
|