Two Servers - One Box


(Cid) #1

We have a ded box that we want to run two servers on (one in stopwatch/versus mode and the other in campaign mode). We run our game servers as services with each service receiving an IP from the master server.

Below are the two command lines for server1 and server2. Server1 runs flawlessly (it shows up in the server browser, can be played on, administered, etc). No issues at all.

Server2 will ‘start’ (as a service in TCAdmin) but you cannot find it ingame and if you do a direct connect via IP it will not connect (timeout error).

I have seen some threads on modifying the ports from 27015 but i am not really understanding exactly what the problem may be or what specific steps i need to fix our problem. any assistance would be GREATLY appreciated.

Here are the two command lines and two configs…i blanked out the IP addys as i dont like posting that on forums but i left the last octets in both so you could see they were different.

Server1 CommandLine:

C:\UserFiles\ADMIN\GameServers\BRINK\BRINK_1\brink.exe +set win_allowMultipleInstances “1? +set fs_savepath C:\UserFiles\ADMIN\GameServers\BRINK\BRINK_1\ +set fs_basepath C:\UserFiles\ADMIN\GameServers\BRINK\BRINK_1\ +set fs_userpath C:\UserFiles\ADMIN\GameServers\BRINK\BRINK_1\ +set net_ip xx.xx.xx.192 +set si_maxplayers 16 +set net_serverPort 27015 +set net_serverPortMaster 27016 +set exec_maxThreads 2 +exec server.cfg

Server2 CommandLine:

C:\UserFiles\ADMIN\GameServers\BRINK\BRINK_2\brink.exe +set win_allowMultipleInstances “1? +set fs_savepath C:\UserFiles\ADMIN\GameServers\BRINK\BRINK_2\ +set fs_basepath C:\UserFiles\ADMIN\GameServers\BRINK\BRINK_2\ +set fs_userpath C:\UserFiles\ADMIN\GameServers\BRINK\BRINK_2\ +set net_ip xx.xx.xx.191 +set si_maxplayers 16 +set net_serverPort 27015 +set net_serverPortMaster 27016 +set exec_maxThreads 2 +exec server.cfg

The configs are pretty much the same except for gamemode:

Server1 Config:
// Set the server name and rcon password.
set si_name “BWAGAMING.com BRINK #1
set net_allowServerHijacking 0
set si_rules sdGameRulesObjective
set si_playmode 2
set si_teamDamage on
set si_maxPlayers 16
set si_timelimit 20
si_teamForceBalance on
set si_maxRank 4
// Without this line, the server won’t be set up for the map.
wait 1000
// Launch the first map.
spawnServer mp/aquarium.entities

Server2 Config:
// Set the server name and rcon password.
set si_name “BWAGAMING.com BRINK #2
set net_allowServerHijacking 0
set si_rules sdGameRulesCampaign
set si_playmode 2
set si_teamDamage on
set si_maxPlayers 16
set si_timelimit 20
si_teamForceBalance on
set si_maxRank 4
// Without this line, the server won’t be set up for the map.
wait 1000
// Launch the first map.
spawnServer mp/aquarium.entities


(cralexns) #2

Different servers need to operate on different ports. :slight_smile:

Basically your second server should be: +set net_serverPort 27017 +set net_serverPortMaster 27018


(Crytiqal) #3

Even if their ip is different?


(Decayed) #4

what ip are you using? don’t see the need to mask your ip, since once your server is up, that is free for anyone to see. My initial guess is that you are using 2 local ip’s, not 2 separate physical ip’s. I apologize if I am wrong, just trying to help.


(Cid) #5

our master box has a main IP and I am using two different ‘subIPs’ (we are given a range of IPs to use by our hosting company). so we put one on .191 and the other on .192. I’ll give the ports a try and post back up. thanks everyone for trying to help. it is REALLY appreciated.

and yes, i know you can (ingame) get our IP. its just that i had some forum sniffing apps steal some info awhile back and since then just decided not to put some info in forums as a general practice. but the xx.xx.xx. is identical on both boxes and just the last octet is different.


(cralexns) #6

There were reports of net_ip being bugged before the patch, supposedly it was fixed but I would still try with different ports.

Also make sure that the ports you use are opened in your firewall along with 8766 for the Steam auth.

Your commandline looks weird.

C:\UserFiles\ADMIN\GameServers\BRINK\BRINK_2\brink .exe
+set win_allowMultipleInstances “1? +set fs_savepath C:\UserFiles\ADMIN\GameServers\BRINK\BRINK_2\ +set fs_basepath C:\UserFiles\ADMIN\GameServers\BRINK\BRINK_2\ +set fs_userpath C:\UserFiles\ADMIN\GameServers\BRINK\BRINK_2\ +set net_ip xx.xx.xx.191 +set si_maxplayers 16 +set net_serverPort 27015 +set net_serverPortMaster 27016 +set exec_maxThreads 2 +exec server.cfg

What is that opening bracket and questionmark doing there?


(Decayed) #7

[QUOTE=Cid;314419]our master box has a main IP and I am using two different ‘subIPs’ (we are given a range of IPs to use by our hosting company). so we put one on .191 and the other on .192. I’ll give the ports a try and post back up. thanks everyone for trying to help. it is REALLY appreciated.

and yes, i know you can (ingame) get our IP. its just that i had some forum sniffing apps steal some info awhile back and since then just decided not to put some info in forums as a general practice. but the xx.xx.xx. is identical on both boxes and just the last octet is different.[/QUOTE]

right on, was just makin sure you weren’t using like 192.168 :slight_smile:

sounds like it is a net_ip variable issue


(Cid) #8

yeah, i dont know why the " and ? are in the string. i took it out just to be sure.

here is what i have now:

1st server on 27015 and 27016
2nd server on 27017 and 27018

i say ‘server’ but its really services of the same box.

both servers will launch and after about 30 secs the first .191 server will timeout in HLSW. The 2nd .192 server will stay up and play normally (and be visible in server browser).

now im going to go shut off the .192 server and see if i can get the .191 server running solely. ill report back. man you guys sure are helpful, big thanks, keep feedback coming, im really hoping i can get this working soon.


(Cid) #9

ok, 2nd server (.192) runs flawlessly. First server (.191) will execute (load) and then after 30 secs it will timeout in HLSW. If I totally turn off .192 then .191 will not timeout then but never shows on the server browser nor can you direct connect.

we run like 20 servers (l4d, css, tf2, hf, etc) all on this same box with services like that so i know its not a port forwarding thing since its a ded box for just us with all ports forwarded to it.

any other ideas?


(cralexns) #10

Also please try to condense your configs to make sure the problem doesn’t lie there.

I suggest replacing this:

set si_rules sdGameRulesCampaign
set si_playmode 2
set si_teamDamage on
set si_maxPlayers 16
set si_timelimit 20
si_teamForceBalance on
set si_maxRank 4
// Without this line, the server won’t be set up for the map.
wait 1000

with exec server_objective_standard_vs.cfg and I am not sure about running campaign server but there are two preconfigured configs in base folder, one for resistance and one for security.

Some configurations may cause undesired results as per http://www.splashdamage.com/forums/showthread.php?t=26303


(Cid) #11

ok, lemme try that and post back up…


(Cid) #12

ok, changed it to:

// Set the server name and rcon password.
set si_name “BWAGAMING.com BRINK #2
set net_allowServerHijacking 0
exec server_campaign_resistance_coop.cfg
// Without this line, the server won’t be set up for the map.
wait 1000
// Launch the first map.
spawnServer mp/aquarium.entities

Still doing it. Im really confused what is going on. I see other clans with 2 servers running, not sure why i cant get this thing to work :expressionless:


(cralexns) #13

I run four servers with variations on this commandline:

+set net_serverDedicated 1 +set net_serverPort 27015 +set net_serverPortMaster 27016 +exec f1.cfg +set fs_userpath “C:\GameServers\BRINK\1”

I also run all four of them on the same binary


(Cid) #14

mind posting your cfg file cralexns?


(cralexns) #15

Here is one of them, they’re pretty much the same apart from the servername :slight_smile:

si_name “servername”
net_serverAllowHijacking 0
logFile 1
logFileName f1console.log
exec server_objective_standard_vs.cfg
spawnServer mp/aquarium


(Deadwalking) #16

net_serverAllowHijacking 0 not net_allowServerHijacking 0

If you are running many source games, are any other games set up to listen on ports 27015,27016,27017,27018? If there are you would need to change the ports for your Brink servers to be different from the other games on the box.

net_ip is supposed to work since last patch, but I havn’t tested it to confirm. You may just have multiple servers trying to use the same ports. The issues with the Brink servers before was they would listen on all IP of a box for that port.

Another thing to do is before starting the servers again find the brinkdedconfig.cfg, it should be in the base folder of each server, and rename them for both servers so it recreates it and you will have a backup of it should you want to compare it or reuse it, not that you should need to. The servers will read vars from there that you may not be adjusting and they may cause conflicts with gamemode specific cvars.

Also I have never seen the wait 1000 or wait anything in anyone else’s .cfg. And I dont have it in mine. It seems as you are making the server wait 1000 seconds before executing the spawnServer

I may have missed something else, but I am still on the coffee intake for the morning so I will look again here in a little bit.


(Cid) #17

its 1000 milliseconds i belive not 1000 seconds. i read somewhere that the servers were getting to the mapload line too fast and someone used that to fix their prob. ill prob take it out since its not necessary but our .192 server is running fine with it so thats prob not the problem.

on the port comments… all of our other games use 27015 or 27115 (like 10 other subservers). but if that were the problem, how come my .192 server (which is using 27015) works perfectly every time. its just the 2nd one i try and create that doesnt work. and it seems not to work even if i put it on 27017, etc.

but since your suggestion makes sense, ill prob at least try and make both of them totally different ports than our other games just to test your theory.

i really appreciate all the thoughts guys, i know everyone is busy but your time is valuable to me.


(Cid) #18

ok, fixed the hijacking var, put the 2nd server on ports 27017 and 018 with the 1st server on 27015 and 016.

sequence is this at launch:

  1. server 1 comes up (.192 ip) but cannot be seen in browser or connected to.
  2. server 2 comes up (.191 ip) and can be seen in the server browser and connected to.
  3. 30 secs after 2 comes up, it goes down (timeout in hlsw).

what is frustrating is that one (alone) runs flawlessly. as soon as i try and add another even on totally unique ports, they stop working. gah!


(Deadwalking) #19

Hmm

Do you have other Source based games using those ports? CSS TF2 anything. It seems that the Brink game engine listens to all IP’s for the ports they are assigned to. I am not sure if the net_ip command fixed that or not. SO if you have A CSS server running on port 27015 and fire up a BRink Server on another IP with port 27015 then you may be getting a conflict with ports as the CSS server is already using a port that BRink wants to try and use. Because it listens on all IP’s for that port. If net_ip has indeed fixed this issues then disregard all the above, but I havnt read conformation from server owners that it did fix it. Maybe someone who knows for sure if it is fixed could reply.

I am not running a campaign server so all commands for that I have yet to digg in to.

Running 2 servers on a dedi box 1 StopWatch 1 Objective. Keep in mind that my .cfg becomes Custom with all the settings the way they are.

StopWatch
commandLine in FireDaemon


+set net_serverDedicated 1 +net_ip xx.xx.xx.225 +set si_nam "myServerName" +set net_serverPort 27021 +set net_serverPortMaster 27022 +set net_serverPortAuth 8770 +set exec_maxThreads 4 +set net_serverAllowHijacking 0 +set fs_userpath C:\z_serverBrink\brink_stopwatch +exec server.cfg

server.cfg

si_rules sdGameRulesStopWatch
applyServerConfig Advanced
si_playMode 2
si_onlineMode 3
si_rankRestricted 1

//Set the name of your server 
si_name	"MyServerName"

//Password your server? 
//0 = No 
//1 = Yes 
si_needpass 0

//Password for your server - si_needpass NEEDS to be set to 1! 
g_password "myServerPass" 

//Private Pass
g_privatePassword "myPrivatePass"

//RCON pass
net_serverRemoteConsolePassword "myRCONpass"

//Max players 
si_maxPlayers 16 

//Amount of players required to start a match 
si_minPlayers 0   

//Max players per team 
si_maxTeamSize 8

//max HUMAN players 
si_maxPlayersHuman 16 

//Server time limit 
si_timelimit 20

//Whether to use timelimt or scripted timelimit
si_scriptControlledtimeLimit 0

//Friendly fire 
//0 = Off 
//1 = On 
si_teamDamage 0

//Set if players can only join the smaller size team 
//0 = Off 
//1 = On 
si_teamForceBalance 1

//Bot Difficulty 
//-1 = ANY 
//0 = EASY 
//1 = NORMAL 
//2 = HARD 
si_botDifficulty 2

//Bot Enabled
bot_enable 1

//Max and Minimums
bot_minClients 8
bot_minClientsMax 8  

//Percentage of players that need to ready up to start a match 
si_readyPercent 0   

//Allow players to spawn and play during warm-up period 
//0 = Off 
//1 = On 
si_warmupSpawn 1

//Damage during WarmUp
g_warmupDamage 0

//Rim lighting tints on enemies 
//0 = Off 
//1 = On 
si_enemyTintEnabled 1

//Restrict player ranks 
//si_maxRank 0 = Rank 1 players only 
//si_maxRank 1 = Rank 1 and 2 players only 
//si_maxRank 2 = Rank 1, 2 and 3 players only 
//si_maxRank 3 = Rank 1, 2, 3 and 4 players only 
//si_maxRank 4 = All player ranks can join 
si_maxRank 4

//Turn server VOIP off/on
net_serverVoipEnabled 1

//Set VOIP Quality
net_serverVoipQuality 7

//Turn Team VOIP off/on
si_teamVoipEnabled 1

//Turn Global VOIP off/on
si_globalVoipEnabled 1

//Maprotation - VOTE! //Server will allow the players to vote which map to play at the end of each round! They can ONLY choose from the maps listed below! 
g_mapRotationVote "mp/aquarium,mp/ccity,mp/reactor,mp/resort,mp/sectow,mp/shipyard,mp/terminal" 

spawnServer mp/ccity

Objective
commandLine in FireDaemon

+set net_serverDedicated 1 +set net_ip xx.xx.xx.225 +set si_name "myServerName" +set net_serverPort 27019 +set net_serverPortMaster 27020 +set net_serverPortAuth 8769 +set exec_maxThreads 4 +set net_serverAllowHijacking 0 +set fs_userpath C:\z_serverBrink\brink_objective +exec server.cfg

server.cfg

si_rules sdGameRulesObjective
applyServerConfig Advanced
si_playMode 2
si_onlineMode 3
si_rankRestricted 1

//Set the name of your server 
si_name	"myServerName"

//Password your server? 
//0 = No 
//1 = Yes 
si_needpass 0

//Password for your server - si_needpass NEEDS to be set to 1! 
g_password "myServerPass" 

//Private slots
//s_privateClients 1
//g_privatePassword "myPrivatePass"

//RCON pass
net_serverRemoteConsolePassword "myRCONpass"

//Max players 
si_maxPlayers 16 

//Amount of players required to start a match 
si_minPlayers 0   

//Max players per team 
si_maxTeamSize 8

//max HUMAN players 
si_maxPlayersHuman 16 

//Server time limit 
si_timelimit 20

//Whether to use timelimt or scripted timelimit
si_scriptControlledtimeLimit 0

//Friendly fire 
//0 = Off 
//1 = On 
si_teamDamage 0

//Set if players can only join the smaller size team 
//0 = Off 
//1 = On 
si_teamForceBalance 1

//Bot Difficulty 
//-1 = ANY 
//0 = EASY 
//1 = NORMAL 
//2 = HARD 
si_botDifficulty 2

//Bot Enabled
bot_enable 1

//Max and Minimums
bot_minClients 8
bot_minClientsMax 8 

//Percentage of players that need to ready up to start a match 
si_readyPercent 0   

//Allow players to spawn and play during warm-up period 
//0 = Off 
//1 = On 
si_warmupSpawn 1

//Damage during WarmUp
g_warmupDamage 0

//Rim lighting tints on enemies 
//0 = Off 
//1 = On 
si_enemyTintEnabled 1

//Restrict player ranks 
//si_maxRank 0 = Rank 1 players only 
//si_maxRank 1 = Rank 1 and 2 players only 
//si_maxRank 2 = Rank 1, 2 and 3 players only 
//si_maxRank 3 = Rank 1, 2, 3 and 4 players only 
//si_maxRank 4 = All player ranks can join 
si_maxRank 4

//Turn server VOIP off/on
net_serverVoipEnabled 1

//Set VOIP Quality
net_serverVoipQuality 7

//Turn Team VOIP off/on
si_teamVoipEnabled 1

//Turn Global VOIP off/on
si_globalVoipEnabled 1

//Maprotation - VOTE! //Server will allow the players to vote which map to play at the end of each round! They can ONLY choose from the maps listed below! 
g_mapRotationVote "mp/aquarium,mp/ccity,mp/reactor,mp/resort,mp/sectow,mp/shipyard,mp/terminal" 

spawnServer mp/ccity

As stated in Crispy’s post that is a sticky using the default configs is best practice. I spent a while trying to determine what cvars would make my server not show custom, but none of the defaults met my needs so I stuck with a custom.

Both of these servers run off the same IP with different ports, PortAuth is supposed to be 8766 to hit Steam, although I have had no issues with them being 8769 + 8770. Maybe once Steam is able to display info on the servers I will change it back to 8766. I only have 1 IP as far as my dedi setup thru my GSP. So it could be a little different than what you have going on with multiple IP’s.

best bet would be to probably start small and add to your .cfg once both servers are running and connectable. At that point making a new server.cfg based off a default setup.

In objective mode your commandLine

+set net_serverDedicated 1 +set net_ip xx.xx.xx.xx +set si_name "myServerName" +set net_serverPort try2702 +set net_serverPortMaster try27022 +set net_serverPortAuth 8766 +set exec_maxThreads 2 +set net_serverAllowHijacking 0 +set fs_userpath pathToYourServer +exec server_campaign_resistance_coop.cfg

.cfg would be

si_rules sdGameRulesObjective
applyServerConfig Standard
si_playMode 2
si_onlineMode 3

si_name "myServerName"

spawnServer mp/aquarium

In campaign mode your commandLine

+set net_serverDedicated 1 +set net_ip xx.xx.xx.xx +set si_name "myServerName" +set net_serverPort try27023 +set net_serverPortMaster try27024 +set net_serverPortAuth 8766 +set exec_maxThreads 2 +set net_serverAllowHijacking 0 +set fs_userpath pathToYourServer +exec server_campaign_resistance_coop.cfg

.cfg would be

si_rules sdGameRulesCampaign
applyServerConfig Standard
campaign set campaign_resistance //********************** Or campaign_security
si_playMode 1 //*************************** COOP /Yours is 2 which is Versus I dont think campaign will  run as Versus, but I could be wrong.
si_onlineMode 3 //*************************** Everyone can join.

si_name "myServerName"

Once they are up and running with the default config then you could add cvars to a new config, as to test what is or isnt functional for Objective and Campaign modes.

Hope this helps some.


(Mustang) #20

TLDR but as cralexns said, you can run multiple servers off the same installation
In-case you were wondering, yes you still can start, stop, crash, recover etc. the servers individually without effecting the others
Essentially the benefits are, only have to maintain/update at one location, save some gigabytes
The downside is, you have to stop all servers before doing an update, meaning you can’t carry on playing on one whilst another updates