View Full Version : Multiple MOHAA Servers with same IP / Different Port
privateink
11-03-2002, 01:13 PM
Anyone ever try to get this to work? I'm curious to know if I can run two instances of MOHAA (e.g. a TDM and an OBJ server) concurrently - one going to port 12203 and another to say 12201 in Linux?
I tried this out, but in the built in game browser, only one showed up listed.
CrowKing
11-03-2002, 07:49 PM
You can load multiple instances. You can specify in your command line or server config what port number you want the game to use, or you can leave out any mention of port numbers and the game will start with 12203 and increment by 1 for each new instance.
I don't know why you only see 1. I've never played around with this. If this is something you want to do often, I would consider having MoHAA in two locations on the hard drive (similar to what server providers do) so that you don't get them mixed up.
ck
privateink
11-04-2002, 01:52 PM
Got it working!
You can run it off the same directory - no need to create a duplicate directory. If you're behind a firewall like I am, just be sure to open up udp port 12301 - the next udp port for Gamespy then it'll show up in the browser.
DogMeat's port guide and of course CK's insight helped: http://www.mohadmin.com/nuke/modules.php?name=Content&pa=showpage&pid=13.
The game runs off default udp port 12203 and the server monitoring runs off of 12300 by default. If you run another instance of the game as a server, it'll increment to 12204 and 12301 respectively.
btw: i wiped out the SOUND directory under main just to save space (not that I need to with 18gb of space), but it would make it easier to move to another server with less storage space needed... any other directories we can get rid?
privateink brings up a good question. If you want to set up multiple servers and want to make sure every server has its own main directory and can be restarted without restarting all the servers, do you have to copy the entire directory over? Or, is there a way to make it work with symbolic links and such. This is on a LINUX box BTW.
Thx,
HUD
privateink
11-05-2002, 02:31 PM
The simple answer is YES. You can run multiple instances of MOHAA server under the same directory - you do not need to have multiple copies of MOHAA to run more than one instance of the game server.
I'm running:
+Linux
+one TDM and one OBJ server (two servers all togther now (1+1=2)) from the same directory
+Both are running scripts based on DogMeats Keep Alive Linux Script
One server runs with udp ports 12203 and 12300 and the other runs with udp ports 12201 and 12301.
Run a netstat -a to see what ports your box is listening for. If its like mine, it should only be listening for 4:
+12203 -->tdm server
+12300 -->tdm server
+12201 -->obj server
+12301 -->obj server
yes, but will each of these have thier own main directory?
privateink
11-05-2002, 05:54 PM
Nope. Everything is in the same directory run as the same user - just called from two different scripts that run the same mohaa_lnxded executable.
SNYPE
11-07-2002, 11:46 AM
Privateink--we had a discussion about the effects of multiple servers on the computers hardware. What are you using for hardware? What changes have you made or do you feel need to be made to run multiple servers. Someone had mentioned using multiple-processors but most programs need to be specifically written to take advantage of multiple-processors and I dont think Mohaa was optimized for that.
CrowKing, do you have any thoughts on that??
privateink
11-07-2002, 01:11 PM
Hardware: Compaq Proliant with dual procs
OS: Red Hat Linux
Mem: 256 MB
Game Server Wise: I made no changes to the install of MOHAA. It's patched to 1.11 and the server cfg's are the standard basic configs. Separate scripts are used to run each instance of the server.
Honestly, the box hasn't really been given a good shake down yet. I've had 32 some people logged in at one time, and I didn't notice any lag myself while playing.
Memory will make the biggest impact on running the server. I'm planning bringing the mem up to 512mb at the minimum.
SNYPE
11-07-2002, 01:27 PM
Not too familar with Linux. Is there a prog to monitor cpu usage to see if mohaa is actully using both cpus?
privateink
11-07-2002, 01:29 PM
Yep... just run "top"
It'll show you the top processes, memory utilization and which cpu's they are utilizing.
SNYPE
11-08-2002, 10:52 AM
So Privateink, have you run "top" and what does it show?
Does the game utilize both processors?
privateink
11-08-2002, 12:10 PM
I can say that each instance of the process utilizes one cpu. With two processes running (two mohaa servers), I can't really say if the box will utilize both cpu's (one for each process) since I don't see much action on the obj server. Maybe I'll run two tdm servers tonight and see. Logically speaking, if one process is utilizing one cpu, the other should default to the cpu that is free.
Stay tuned.
ntakis
05-17-2003, 11:21 AM
privateink I have the same problem. I run two or three servers but only the first one is listed on gamespy. I have no firewall. Would you mind sending me the two .cfg files you are using in mohaa_lnxded to see if there's something I've missed? My e-mail is ntakis@mail.gr
P.S. I am using a dual Athlon MP 2.4 server with 2 GB ECC Ram and I will send reports about the cpu usage as soon as I put it in work!
hank you in advance.
woz_mann
02-03-2004, 06:39 PM
how do u direct each MOHAA_dedicated.exe off to a different main folder???
GaSplat
02-03-2004, 11:20 PM
answered your question in the other thread. Please only post the same question once, particularly in the same forum. thanks
woz_mann
02-03-2004, 11:56 PM
ya I know...sorry....trying to find an answer as fast as possible
vBulletin® v3.7.3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.