View Full Version : Starting out with UT2k3 Dedicated Linux server
Bisleyboy
17th October, 2002, 06:35 PM
I have just compiled my Dedicated server on my Linux Box and am looking to get the server running properly. Being a relative newbie to linux :withstupid: I feel that I need to ask some questions about how to get it running efficiently.
I have managed to get the server running on the box whilst connected remotely. The problem comes when i want to disconnect and play from the comp i connected to the server from. I am stuck with a running server that is not in the background and I am unable to shove it there so i can disconnect and play.
The startup script that has been posted in another thread seems to be a good idea (only thing is i would like some help in making sure that it does the correct things and not anything too drastic). I think i understand most of it except for the actual command line
COMMAND="ucc server DM-Antalus.ut2?game=XGame.xDeathMatch?GameStats=True?
That is 1 issue I have. The second is that of remote admin of the server when it runs in the background. I would like to use the web admin for the server because it seems the best way to control it when the server is running. However on the few occasions that i have run the server I have had the message saying that it has been started on port x and when i type http://ip_address:port nothing comes up except that it couldnt find the page. is there a config file i need to setup in order for this to work?
The other issue with this is that nothing tells you what the default username and password are for the web admin!
I would greatly appreciate some help with some or all of the above issues. Thanks
Bis|eyboy (RnB Server Admin)
kurai
18th October, 2002, 02:37 AM
The startup script that has been posted in another thread seems to be a good idea (only thing is i would like some help in making sure that it does the correct things and not anything too drastic). I think i understand most of it except for the actual command line
The script does three main things ...
1) Puts all the long commandline stuff in a file, so you only need to type ./ucc.init start to kick it all off, and it then `backgrounds` the whole thing so you don't have to stay connected the whole time.
2) When you start a process on Linux it get's assigned a Process ID (pid) number. One way of telling if the UT2K3 server is still running is to query the system to see if this PID is stil there. The script uses this a lot ... if you want to stop the game server the script looks up the PID, then tells the OS to kill that process associated with it. A similar apporach is used by `restart` - it looks up the PID - if it's there then the game is running and nothing needs to be done, if it's absent then game server is presumed to not to be running and therefore starts it.
3) The ucc.init check command does the above PID checking. In addition it also sends a query to a special port the game server listens on, and gets back some info about what the game is doing at that moment. This is useful because there are occasions when all the PIDs show up as OK but the game won't accept new player connections.
If `check` finds this to be the case then it does a `restart` - kills off the old PIDs and starts a new instance.
I think i understand most of it except for the actual command line
COMMAND="ucc server DM-Antalus.ut2?game=XGame.xDeathMatch?GameStats=True?
or , taken from the script the full version is ...
COMMAND="ucc server DM-Antalus.ut2?game=XGame.xDeathMatch?GameStats=True?Translocator=True -nohomedir -ini=DM.ini"
This whole line is basically what you would type at a shell prompt to start the game server.
Think of `ucc` as the main server program - the rest are additional `switches`
server :- (unsurprisingly) run in server mode
DM-Antalus.ut2 :- the map you want to start with
<all the game control related bits after this need to be separated with a `?`>
game=XGame.xDeathMatch :- the game type you start with. See http://www.unrealadmin.org/modules.php?name=Sections&op=viewarticle&artid=8 for more types.
GameStats=True:- Pretty self explanatory - just make sure you have all the other stats bits in the ini set right, so that your games get logged by the master server.
Translocator=True :- Again - self explanatory. Deathmatch, for example, defaults to disabling Translocator - this turns it on.
There are a lot more game options you can specify on command line - I'll leave you to discover them at your own pace.
-nohomedir :- This part is important ... if you include this then ucc will look in your System directory for the various .ini files. If you don't use it, then it will look in a directory called `.ut2003` in the home directory of the user that started the `ucc`
-ini=DM.ini :- This bit simply tells ucc which main .ini to read. The default one is UT2003.ini - I simply changed mine with some specific DM settings and saved it as DM.ini
However on the few occasions that i have run the server I have had the message saying that it has been started on port x and when i type http://ip_address:port nothing comes up except that it couldnt find the page. is there a config file i need to setup in order for this to work?
Yes.
See http://www.unrealadmin.org/modules.php?name=Sections&op=viewarticle&artid=7
and http://www.unrealadmin.org/modules.php?name=Sections&op=viewarticle&artid=5#WebAdmin
From the Server Administration Tutorial page:- "The default username is Admin, and the default password is Admin "
Bisleyboy
18th October, 2002, 07:46 AM
Thanks - i got the script and got the httpd workin in the server - but i dont know how to execute the script from the box!
thats the next bit of help i need. Thanks
Bis
NapalmDawn
18th October, 2002, 08:40 PM
/usr/bin/screen -A -m -d -S ut2003 ./ucc server BR-Skyline.ut2?game=XGame.xBombingRun?XGame.MutSlomoDeath?XGame.MutSpeciesFix&
/usr/bin/screen -A -m -d -S ut2003 ./ucc server BR-Skyline.ut2?game=XGame.xBombingRun?XGame.MutSlomoDeath?XGame.MutSpeciesStats
/usr/bin/screen -A -m -d -S ut2003 ./ucc server DM-Antalus.ut2?game=XGame.xDeathMatch?GameStats=True?
/usr/bin/screen -A -m -d -S ut2003 ./ucc server BR-Skyline.ut2?game=XGame.xBombingRun?XGame.MutSlomoDeath?GameStats=True?
Here is some example of command lines I use. The whole stuff before the .ucc will let you minimize the connection and disconnect.
I use Putty to SSH into my server. Then paste those lines. After I run it, I hit CTRL D and then a.
i see a line that says "Screen detached" That means it lives the process running in the background and I'm free to log off.
kurai
18th October, 2002, 09:14 PM
but i dont know how to execute the script from the box!
Assuming you have followed the instructions at http://www.unrealadmin.org/modules.php?name=Forums&file=viewtopic&p=2255#2255
At your Linux command prompt ....
Change directory to your UT2K3 server directory, then ...
./ucc.init start
Or you could just run it from whatver dir you are in by including the full path ...
/home/example/serverdirname/ucc.init start
Other options after ucc.init are :-
stop :- Obvious really ;)
restart :- Does `stop` then `start`
check :- If all is OK does nothing. If game crashed, not present or not responding then it does `restart`
There are some advantages to using a console detaching .init script over `screen` - you can put the script in your Linux startup directory, so it starts up automatically if you reboot, and you can also use `cron` to do a `ucc.init check` every, say, 15 minutes.
If, however, you don't really know your way around on a Linux box yet I'd say use the `screen` option for an easy life :)
Bisleyboy
18th October, 2002, 09:34 PM
I tried using the original script - because i dont want to make this more complicated (and dont like the idea of screen).
1) Created ucc.init
2) pasted original script in
3) edited first few lines
4) saved and exited
5) chmodded the file
6) ran script as follows and with followin results
[root@<hidden> ut2003_dedicated]# sh ucc.init start
starting ucc.init and ucc
ucc.init: ucc.init: command not found
ucc.init: disown: command not found
[root@<hidden> ut2003_dedicated]#
is this cos im runnin as root?
kurai
18th October, 2002, 10:13 PM
Nope. You are *almost* there :)
The script is executable (the chmod +x bit) and the first line tells the OS which shell to use ... /bin/sh in this case, so the extra use of "sh ucc.init" isn't needed.
The reason it's saying "command not found" is because your UT2K3 server directory is not in the search path.
So ... use `./` to tell it to execute in *current directory*
(assuming you are in UT server dir)
i.e. ./ucc.init start
Or, you could use full path to file ...
i.e. /home/someuser/example/utserverdir/ucc.init start
Bisleyboy
19th October, 2002, 12:21 AM
heres an update
[code:1:1dc5550958]
[root@<hidden> mattywhi]# cd /usr/local/games/ut2003_dedicated/
[root@<hidden> ut2003_dedicated]# ls
Animations License.txt README-2107b Sounds System Web ucc.init ucc.init.pid updater
KarmaData Maps README_ut2003_lnxserver StaticMeshes Textures ucc ucc.init.backup uninstall
[root@<hidden> ut2003_dedicated]# ./ucc.init
Usage: ./ucc.init {start|stop|restart|check}
[root@<hidden> ut2003_dedicated]# ./ucc.init start
starting ucc.init and ucc
./ucc.init: disown: command not found
[root@<hidden> ut2003_dedicated]#
[/code:1:1dc5550958]
after that it started shoving
The initial hull is narrow (the cosine of the minimum angle is -0.999997079).
A coplanar point may lead to a wide facet. Options 'Qs' (search for best
initial hull), 'QbB' (scale to unit box), or 'Qbb' (scale last coordinate)
may remove this warning. Use 'Pp' to ignore this warning.
See 'Limitations' in qh-impre.htm.
into the display.
then that was it... is this normal....?
Bisleyboy
19th October, 2002, 12:24 AM
I got this when i typed "ps aux"
root 14515 0.0 0.0 1668 0 pts/1 SW Oct18 0:00 [ucc.init]
root 14518 12.1 59.8 81460 15904 pts/1 S Oct18 0:49 ./ucc-bin server DM-Antalus.ut2?game=XGame.xDeathMatch?GameStats=True
root 14753 0.0 59.8 81460 15904 pts/1 S Oct18 0:00 ./ucc-bin server DM-Antalus.ut2?game=XGame.xDeathMatch?GameStats=True
root 14754 0.0 59.8 81460 15904 pts/1 S Oct18 0:00 ./ucc-bin server DM-Antalus.ut2?game=XGame.xDeathMatch?GameStats=True
mattywhi 7954 0.0 1.3 1688 372 ? R 00:05 0:00 sh ./ucc.init fork
[root@<hidden> ut2003_dedicated]#
just wanna check this is rite![/quote]
PapaDoom
19th October, 2002, 05:46 AM
That qhull message thing is "normal" for the current release of the dedicated server- don't worry about it. Its likely to be fixed in the update, which hopefully will be released shortly.
Your "ps" output looks good. Your server should be up and running!
Bisleyboy
19th October, 2002, 11:32 PM
I got the server running using the original script and i can connect into it. I cant get the web admin workin tho.
I could however use the web admin when i had everything running in the foreground!
any suggestions?
kurai
19th October, 2002, 11:44 PM
That's purely an issue with your .ini file.
Check the webadmin setp FAQs, the location of your .ini's and also if you are using -nohomedir switch or not.
Bisleyboy
20th October, 2002, 06:18 PM
thanks man
vBulletin® v3.6.7, Copyright ©2000-2012, Jelsoft Enterprises Ltd.