Jump to content

Can only join 1 of the 2 running dedi servers


Recommended Posts

I've created two DST dedi servers with the help of 

They both run fine.  I can join each of them if only one of the servers is running at a time, but once I run both of them at the same time, only the second created server will show up in the LAN tab.  Both servers do show up in the ONLINE tab, but I am not able to join them via that tab (failed to join occurs).  IF I have both of them running at the same time, only the second created server shows up in the LAN tab (they both show up in the ONLINE tab), and as soon as I shut the second server down, the first server shows up and I am able to join it.

I cannot join either server via the Online tab.

Is this a limitation to running multiple servers on the same network? 

Any help would be appreciated! Thanks!

 

Also, the servers are running on a 2nd pc. I am joining them from a separate pc.

Link to comment
Share on other sites

That sounds to me like you have some duplication going on, so the second server overwrites the first one in the list somehow. Not sure what though, since port+ip get's locked when the first server starts up, so the second server throws an error.

I've run 13 Dedicated server instances off of a single Machine so far without any issues. (One multishard server with one master and 10 slaves, and one classical overworld/caves combination at the same time) Afaik there are no limitations in terms of numbers apart from what your hardware and network can physicially handle. If your hardware can't handle it though it would just start to lag and eventually timeout instead of fail to join.

Do the server instances have the exact same name? I think that shouldn't cause any issues with the listing, but not entirely sure.

What you can try as well is if you can directly connect to the servers with the command: "c_connect("<ip>", "port", "password")" from the main menu and see if that helps.

Also did the dedicated servers throw any errors, warnings, etc? Check the logs and/or server console(s) after starting them up together.

Can you post your configuration files as well, so I can see if there's something wrong? (Ofc you can anonymise IPs and and ports if you want, but make sure you add notes if some IP/ports are the same.)

Link to comment
Share on other sites

Thanks for the help!

1st I'm not very familiar with networking.

I'm not 100% sure what you mean by the server instance 'name.'  The servers do have different names set in the cluster.ini.  I added a '2' at the end of each name in the "cluster_name" line.  If that isn't the 'instance name' then I'll have to make them different.

 

I don't fully understand the c_connect("<ip>", "port", "password") so I don't think I can do that.

 

Some times the cave server failed to connect, but I restarted it and it fixed itself.

 

I did change the bind_ip and master_ip in my second server to the below, but it didn't seem to matter if it was the same as the first server.

bind_ip = 127.0.0.2
master_ip = 127.0.0.2

 

Below is what the folders look like that hold the caves/master folders and other files. Also, there are two separate .bat folders in the parent Klei folder.  The only thing I've changed in the .bat files is that path to the separate folders.

dstservers.PNG.5e2bb84939a684f90529575b2f21a8d5.PNG

 

I don't fully understand everything in the .bat file.  The first line does have a number in it (343050).  Maybe I need to change it?

steamcmd +login anonymous +force_install_dir D:\Servers\DST\ +app_update 343050 validate +quit


Below is the cluster.ini file.  The only thing I changed was +10 to each related port numbers.

[GAMEPLAY]
game_mode = survival
max_players = 12
pvp = false
pause_when_empty = true
vote_enabled = false


[NETWORK]
cluster_description = die to reset world
cluster_name = Starving..
cluster_intention = cooperative
cluster_password =


[MISC]
console_enabled = true


[SHARD]
shard_enabled = true
bind_ip = 127.0.0.1
master_ip = 127.0.0.1
master_port = 10889
cluster_key = supersecretkey

 

Below is the master server.ini file.  Again I added +10 to each port number.

[NETWORK]
server_port = 11000


[SHARD]
is_master = true


[STEAM]
master_server_port = 27018
authentication_port = 8768


[ACCOUNT]
encode_user_path = true

 

Finally the caves server.ini file

[NETWORK]
server_port = 11001


[SHARD]
is_master = false
name = Caves
id = 457229229


[STEAM]
master_server_port = 27019
authentication_port = 8769


[ACCOUNT]
encode_user_path = true

 

As I'm pasting these.. I notice that the shard "id" in the caves folders are the same?  I'll try changing that after this post.

 

I looked at the logs and didn't see any errors

Link to comment
Share on other sites

Do I need to make multiple 'steamapps' folders?

 

this is my .bat file.  It's just a direct copy/paste from the klei tutorial.. and the 2nd .bat file for the 2nd server I just put a 2 after 'MyDediServer2' for both of the bottom lines.

c:\steamcmd\steamcmd.exe +login anonymous +app_update 343050 validate +quit
cd /D "c:\steamcmd\steamapps\common\Don't Starve Together Dedicated Server\bin"
start dontstarve_dedicated_server_nullrenderer -console -cluster MyDediServer -shard Master
start dontstarve_dedicated_server_nullrenderer -console -cluster MyDediServer -shard Caves

 

Link to comment
Share on other sites

I just noticed that even tho I changed the 2nd servers blind_ip and master_ip

bind_ip = 127.0.0.2
master_ip = 127.0.0.2

to these numbers, when the server starts, it still says [Shard] Slave Caves (#####) connected: [LAN] 127.0.0.1 even tho I changed it to 127.0.0.2.

Link to comment
Share on other sites

Also, the 2nd server is ALWAYS the only server I can join if both of them are running at the same time.  Even if I initiate the first server first or if I initiate the second server first.  The second server always seems to have priority.

Link to comment
Share on other sites

I made a third server and ran it alone.  It shows up in the ONLINE tab, but doesn't even show up in the LAN tab (which is the only tab I'm allowed to join the servers that I run). 

I did what this guy said @ 

 

 

I added +20 to the all the port numbers in the 3 files.  I changed the folder name, that contains the master and cave folders, to something else.  I changed the .bat file name and the line of code in the .bat file to the new dst folder.  

Link to comment
Share on other sites

Sorry for the late response. Am I right when I assume that your two server instances are a Master and a Caves server, and not two independant Servers? If that's the case it's completely normal that a cave shard is not listed in the Server list indicated by "is_master = false" in the server.ini of the shard. It's only supposed to connect to a Master shard running on a port set i the ini. (master_server_port = 27019) This master server port has to be the same on all shards that are supposed to connect to eachother. If you want to run multiple master shards on the same machine you have to change the master port in the cluster.ini for the second cluster.

(cluster = combination of one master shard and one or more slave shards)

(shard = a single dedicated server instance that is able to connect to other shards in the same cluster)

Just for clarification: master_ip is the IP the master shard is running on. If that is on the same machine as the slave/cave shard it can stay on the default 127.0.0.1 because that's always the localhost aka the machine the server is running on. Only change this if you want to have multiple hardware machines running and you want to run the master and cave shards on one of the machines seperately. (You can replace this with the real network adress of the machine, but there's no point at all to do so.)

Further clarification: "bind_ip" is the IP the server binds to. Pretty much a similar explanation as above, just leave it on 127.0.0.1 because that's a link to the IP of the machine it's running on.

 

It all crumbles down to the following: Master shards connect to the main server listing and get listed, all slave shards only connect to master shards they are set to connect to. You travel between them using sinkholes, and if you log out in a cave shard, you automaticly get retransfered back there when logging back in. You can have multiple Master servers running (at the same time), generally you place them in individual clusters/cluster folders, so you have them somewhat organized.

Your steamcmd looks perfectly fine to me, and everything else apart from the master_server_port looks fine to me as well on a quick glance.

If you open the command console in your main menu (the one where you see two characters standing in front of the portal thingy) with ö on german keyboards or \ or ~ on americans (I think) you can enter the command c_connect("<ip>", "port", "password") to directly connect to a server. I think only the master shard though, never tried to connect to a slave shard like that.

Let me know if your server works as intended now. If not I'll take a closer look.

Link to comment
Share on other sites

6 hours ago, Daniel86268 said:

Sorry for the late response. Am I right when I assume that your two server instances are a Master and a Caves server, and not two independant Servers? If that's the case it's completely normal that a cave shard is not listed in the Server list indicated by "is_master = false" in the server.ini of the shard. It's only supposed to connect to a Master shard running on a port set i the ini. (master_server_port = 27019) This master server port has to be the same on all shards that are supposed to connect to eachother. If you want to run multiple master shards on the same machine you have to change the master port in the cluster.ini for the second cluster.

(cluster = combination of one master shard and one or more slave shards)

(shard = a single dedicated server instance that is able to connect to other shards in the same cluster)

Just for clarification: master_ip is the IP the master shard is running on. If that is on the same machine as the slave/cave shard it can stay on the default 127.0.0.1 because that's always the localhost aka the machine the server is running on. Only change this if you want to have multiple hardware machines running and you want to run the master and cave shards on one of the machines seperately. (You can replace this with the real network adress of the machine, but there's no point at all to do so.)

Further clarification: "bind_ip" is the IP the server binds to. Pretty much a similar explanation as above, just leave it on 127.0.0.1 because that's a link to the IP of the machine it's running on.

 

It all crumbles down to the following: Master shards connect to the main server listing and get listed, all slave shards only connect to master shards they are set to connect to. You travel between them using sinkholes, and if you log out in a cave shard, you automaticly get retransfered back there when logging back in. You can have multiple Master servers running (at the same time), generally you place them in individual clusters/cluster folders, so you have them somewhat organized.

Your steamcmd looks perfectly fine to me, and everything else apart from the master_server_port looks fine to me as well on a quick glance.

If you open the command console in your main menu (the one where you see two characters standing in front of the portal thingy) with ö on german keyboards or \ or ~ on americans (I think) you can enter the command c_connect("<ip>", "port", "password") to directly connect to a server. I think only the master shard though, never tried to connect to a slave shard like that.

Let me know if your server works as intended now. If not I'll take a closer look.

 

 

I believe I am trying to run 2 server instances which BOTH have a their own Master and Cave servers.  So I guess I'm technically running 4 servers.  2 master servers and 2 cave servers.  I have 2 .bat files that start-up their own 2 servers (a master and a cave server).  I think you believe that I think the master server and the cave server should be showing up in the LAN tab, but that's false.  I know that the cave server doesn't show up in the LAB tab.  In the photo, you can't see it, but the two master servers are actually different names.. but it's cut off. (I just added a '2' to the end of the server name in the photo).

So I understand that the cave server does not show up in the listings.  What should show up, is the second master server I'm trying to run.

 

ANYWAYS.. as I was writing the response here.. I tried that c_connect() command and that allowed me to join the second group of servers.  So now I'm able to run 3 sets of master/cave servers and I can join them via that command.  There is still the problem of only 1 of the servers showing up in the LAN tab, but that's okay if I can join them via the c_connect() command.  

 

Anyways.. I guess that's just a limitation to the game? I mean, the problem of not being able to join different server sets via the game UI.  

 

So I made that 3rd server set and I assume I'll be able to create even more if I want to.. but 3 is fine for now.    I don't fully understand ports, etc. but it's working SO, good enough. 

 

Thanks for the help and replies!

 

Link to comment
Share on other sites

2 minutes ago, applez said:

 

 

I believe I am trying to run 2 server instances which BOTH have a their own Master and Cave servers.  So I guess I'm technically running 4 servers.  2 master servers and 2 cave servers.  I have 2 .bat files that start-up their own 2 servers (a master and a cave server).  I think you believe that I think the master server and the cave server should be showing up in the LAN tab, but that's false.  I know that the cave server doesn't show up in the LAB tab.  In the photo, you can't see it, but the two master servers are actually different names.. but it's cut off. (I just added a '2' to the end of the server name in the photo).

So I understand that the cave server does not show up in the listings.  What should show up, is the second master server I'm trying to run.

 

ANYWAYS.. as I was writing the response here.. I tried that c_connect() command and that allowed me to join the second group of servers.  So now I'm able to run 3 sets of master/cave servers and I can join them via that command.  There is still the problem of only 1 of the servers showing up in the LAN tab, but that's okay if I can join them via the c_connect() command.  

 

Anyways.. I guess that's just a limitation to the game? I mean, the problem of not being able to join different server sets via the game UI.  

 

So I made that 3rd server set and I assume I'll be able to create even more if I want to.. but 3 is fine for now.    I don't fully understand ports, etc. but it's working SO, good enough. 

 

Thanks for the help and replies!

 

You are welcome.

Yea, I misunderstood you there in the beginning. Still it shouldn't be a game limitation that you can't see the second instance listed as you already sort of pointed out yourself. Maybe you can just try some other ports to see if the DST server just has some issues with that specific port. (Just change up the server_port to something else, maybe just count them up further to see if that helps.)

Link to comment
Share on other sites

5 minutes ago, Daniel86268 said:

You are welcome.

Yea, I misunderstood you there in the beginning. Still it shouldn't be a game limitation that you can't see the second instance listed as you already sort of pointed out yourself. Maybe you can just try some other ports to see if the DST server just has some issues with that specific port. (Just change up the server_port to something else, maybe just count them up further to see if that helps.)

I'll def try fiddling with it if they actually should be showing up in the listings.. it's sorta just more work to have to do the c_connect command, but since it's working, I'm happy enough. haha.  

I have tried increasing ports by +10 (as the forum in the OP directed) and I also tried increasing ports by +1 (but that caused errors). 

I will fiddle with it more in the future!

Link to comment
Share on other sites

You might have hit other already used ones when counting up by 1 only. For example what can happen fast that you count up your main shard by 1 and hit the same port as your cave shard. Or you just hit another already used port. That's prob why +10 was recommended, easy to do and gives you lots of space for the instances.

I've read somewhere that changing ports to list the server in the serverlist worked for some people, maybe it works for you as well. Let me know if/when you tried it out. :wilsconnivingsmile:

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...