Jump to content

[Guide] Cluster Setup


Crystal

Recommended Posts

NOTE: This guide applies to people running their own servers, and is not intended for people that have their servers hosted by a third party.

The Scorched Earth FAQ does a good job of getting you started on running a server cluster, but I find that it leaves some unanswered questions. So, I did a lot of experimenting and was able to figure out some answers.

In case you have not read it, here is the FAQ I am referring to:

What is a Cluster?

A cluster is simply a server-side location to store Ark data that is uploaded from an obelisk (characters, items, dinos). If the server is not using clusters, this data is saved locally on the machine of the person performing the upload and can then be downloaded to any server that does not block downloads. When using a cluster, the data is instead kept on the server in a special location:

ShooterGame/Saved/clusters/[cluster_id]

Any servers with access to that folder, and which share the same cluster ID, will be able to share uploaded data with each other. (You do not need to create this folder yourself, the server will create it when someone uploads something.)

Enabling the use of a cluster implicitly blocks downloads from from other sources. Players will not be able to download saved data from their machine to your server, nor transfer data from other servers outside the cluster to your server. Also, data uploaded from your server will not be available for use on other servers outside the cluster.

How do I Setup a Cluster?

This part was covered pretty well on the FAQ, but I will break it down a bit here to explain in more detail.

First of all, there are two important command line options you need to use to make use of clusters. (Your command line might be within a batch or shell script file that you use to run the server or it might be specified in a server launcher interface somewhere, depending on your setup.)

-NoTransferFromFiltering
After much testing, I have been unable to determine what effect this setting has. The FAQ uses it in the example command lines. So, I recommend doing the same, although when running without it, nothing seems to change.

-clusterid=yourclusterid
This tells the server the name of the cluster to use, and becomes part of the cluster save path on disk. Use the same cluster id on all servers that you want to share the same upload data. It does not matter if this ID is globally unique. It also shouldn't need to be secret, but better to keep it secret in case people find a way to exploit it. If someone uploads to (or attempts to download from) some other server using the same ID, it will not be the same cluster as your servers, because the cluster files are stored locally on your server machine and not shared anywhere else. (Update: If you are running on a dedicated host, make sure your cluster id is unique and secret, because there is a possibility the host is using a shared cluster save location.)

There are two different ways to setup your cluster, each covered below. However, both require that you have set a clusterid as described above.

Important Note: If you have noTributeDownloads=true on your command line or in your settings INI, people will not be able to transfer anything. You need to set that to false in conjunction with the use of -NoTransferFromFiltering.

Method 1: Shared Settings

This is an officially supported method. You run two servers, with the same server settings INI files, but with different save data and the ability to transfer between them using a cluster. For this to work, you need to specify separate save directories for each server on the command line.

?AltSaveDirectoryName
This command line options tells the server where to save its data. You need to make sure that all servers in the cluster use a different directory, or risk bad things happening to your saves.

Here are example command lines for starting two servers sharing the same cluster ID.

ShooterGameServer "TheIsland?SessionName=MyServerName1?AltSaveDirectoryName=Save1?Port=7777?QueryPort=27015" -NoTransferFromFiltering -clusterid=cluster1
ShooterGameServer "ScorchedEarth_P?SessionName=MyServerName2?AltSaveDirectoryName=Save2?Port=7779?QueryPort=27017" -NoTransferFromFiltering -clusterid=cluster1

Note that the save directories are different, the ports are different (cannot run multiple servers on the same ports), but the cluster ID is the same.

Method 2: Independent Settings

This is an officially supported method. You install and run separate servers from separate locations on the same machine, and tell them to use a shared cluster directory. I recommend making a directly external to the server installations that they both have access to. Here is a suggested setup (using Windows paths, adjust accordingly for Linux):

C:\ArkServers\Server1
C:\ArkServers\Server2
C:\ArkServers\clusters

For each server, you will want to add the following command line (change the path to be appropriate for your setup):

-ClusterDirOverride=C:\ArkServers\clusters

Here are example command lines for starting two servers using the same cluster ID and a shared cluster save directory.

ShooterGameServer "TheIsland?SessionName=MyServerName1?AltSaveDirectoryName=Save1?Port=7777?QueryPort=27015" -NoTransferFromFiltering -ClusterDirOverride=C:\ArkServers\clusters -clusterid=cluster1
ShooterGameServer "ScorchedEarth_P?SessionName=MyServerName2?AltSaveDirectoryName=Save2?Port=7779?QueryPort=27017" -NoTransferFromFiltering -ClusterDirOverride=C:\ArkServers\clusters -clusterid=cluster1

Note that the ports are different (cannot run multiple servers on the same ports), but the cluster directory and cluster ID are the same.

Restricting Transfers

By default, people will be able to transfer characters, tamed dinos and items between your clustered servers. If you want to restrict what can be transferred, you have access to these command line options that you can specify when launching your servers.

?PreventDownloadSurvivors=True
Disable downloading characters from the cluster to this server.

?PreventDownloadItems=True
Disable downloading items from the cluster to this server.

?PreventDownloadDinos=True
Disable downloading tamed dinos from the cluster to this server.

?PreventUploadSurvivors=True
Disable uploading characters to the cluster from this server.

?PreventUploadItems=True
Disable uploading items to the cluster from this server.

?PreventUploadDinos=True
Disable uploading tamed dinos to the cluster from this server.

Note: Any of the above settings can also be set in the [ServerSettings] section within GameUserSettings.ini. Just drop the question mark off the front. (If you set both, the command line version will overwrite the INI file version.)

You can ignore the rest of this post after this point. Your cluster should be good to go!

The rest of this post is outdated information and is only being kept around for historical reasons.

Alternate Cluster Setup Method: Independent Settings Via Symlink

Note: This method should no longer be necessary as of version 247.85. There is now a supported way to have independent servers use a shared cluster directory. See method 2 above.

This is a method I came up with on my own that allows you to run clustered servers each with their own settings INI files. Hopefully, a supported way to do this will arrive eventually, but for now this seems to be working. As of version 247.85, there is now a supported method, covered above.

First, setup two independent copies of the server app in separate directories, one for each server you plan to cluster. Also, create a directory for your cluster upload data. Here is an example of how mine are setup:

ArkServers/Server1
ArkServers/Server2
ArkServers/clusters

Next, go into each of your server's directories and create symbolic links to your clusters directory at the appropriate location – where the server would normally look for clusters. For example:

ArkServers/Server1/ShooterGame/Saved/clusters -> ArkServers/clusters
ArkServers/Server2/ShooterGame/Saved/clusters -> ArkServers/clusters

NOTE: If you don't know what symbolic links are, I cover that below.

Now, both servers can run independently with their own settings INI files, but still share the same cluster data. Here are example command lines for starting these two servers:

ShooterGameServer "TheIsland?SessionName=MyServerName1?Port=7777?QueryPort=27015" -NoTransferFromFiltering -clusterid=cluster1
ShooterGameServer "ScorchedEarth_P?SessionName=MyServerName2?Port=7779?QueryPort=27017" -NoTransferFromFiltering -clusterid=cluster1

Note that the ports are different (cannot run multiple servers on the same ports), but the cluster ID is the same.

About Symbolic Links

Symbolic links (a.k.a. symlinks) are an operating system feature that allows you to create a file system entry (a directory in our case) that redirects to another file system entry. An application will typically see the entry as if it is really there, but when it asks for the content, the OS gives it the content from the target location instead. Setting up a symbolic link is different on different operating systems.

Windows

On Windows, we will make what is called an NTFS directory junction (a specialized type of symbolic link). This can most easily be done from the command line using the mklink utility.

Let's assume you have the following directory layout:

C:\ArkServers\Server1
C:\ArkServers\Server2
C:\ArkServers\clusters

Now, you want to have both servers use your shared clusters directory. To do that. you will run the following commands on a command line:

mklink /J C:\ArkServers\Server1\ShooterGame\Saved\clusters C:\ArkServers\clusters
mklink /J C:\ArkServers\Server2\ShooterGame\Saved\clusters C:\ArkServers\clusters

Note: This will fail if there are already cluster directories in the source locations. You will need to delete them first (and optionally move their content to the shared location).

Linux

I do not have access to a Linux server, so I am unable to determine exactly what to do. I think you can use this command to create the links:

ln –s target_dir source_dir

If someone replies with specific instructions for setting this up on Linux, I will edit the post and add it here.

Link to comment
Share on other sites

From meswrex on Github RE: Scorched Earth using ArkManager.

Quote

Hi all,
I might have a work-around until clustering instances are supported by ark-server-tools. I've used symbolic links to allow arkmanager to continue to launch separate instances from separate directories, but effectively work from the same game files. As far as I can tell at the moment, it appears to work; I have two servers concurrently running launched via arkmanager with separate instance configs and with separate backup and save directories. I can transfer characters and tames between servers (albeit losing items, but that may be related to the current patch).

server1.cfg:


arkserverroot="<path to server1 game files>"
arkbackupdir="<path to server1 backup dir>"
ark_AltSaveDirectoryName="SavedArks1"
arkflag_NoTransferFromFiltering=true
arkopt_clusterid=Cluster1

server2.cfg:


arkserverroot="<path to server2 game files>"
arkbackupdir="<path to server2 backup dir>"
ark_AltSaveDirectoryName="SavedArks2"
arkflag_NoTransferFromFiltering=true
arkopt_clusterid=Cluster1

Server 1 game files are the original game directories and server 2 are the files symbollicaly linked to server 1. The only changes needed are separate SavedArk? directories for each of the servers (in my case parallel to the original SavedArks directory in ShooterGame/Saved). That way both instances use the same game files but separate save directories.

It might be worthwhile trying to get each server working independently first just to make sure each config is set up correctly (separate ports, etc.). I had this going before trying to shift the one server to the symbolic link.

Hope that helps.

https://github.com/FezVrasta/ark-server-tools/issues/578

Link to comment
Share on other sites

Thankyou for this guide! Cleared up a ton of cluster questions I had, and we got it working in no time! We used method two, and the symlinks worked fine even through ASM. I was wondering about the restrictions though. Where do we put the " ?preventdinodownloads=true " part, if we are running ASM? Does it go in the game.ini ? or the gameusersettings.ini ? or is it supposed to be on the command line called Additional Args? thank you kindly!

EDIT: figured it out! ASM has it's own check boxes for the item / dino / survival downloads under the Rules section. there are not currently options for uploads, but it is my understanding you can add them manually still, even using ASM. just make sure you are editing the files located in the ASM Profiles folder, rather than the direct server ini files. otherwise the profile files overwrite it. (please correct me if i'm wrong here). Thanks again for the guide!

Link to comment
Share on other sites

Hi

I have a cluster setup as your method 2 using symlink (setup using ASM) with the only difference is the cluster folder is in the saved folder on the main server. the character server transfer is working well and item transfer through the obelisk works but i seem to be the only one that can upload dinos to the obelisk. Everyone else that has tried gets no dino to select in the upload screen even though the dino is standing on the obelisk right next to them. Any ideas what could be causing this?

TIA

Ian

Link to comment
Share on other sites

Sorry, nothing comes to mind. I am running with a similar setup, the only difference is that the clusters folder is outside the server folders. However, I have not tested whether other people can upload dinos. I only tested it myself. I can't imagine how it makes a difference who is doing it, unless maybe being outside of the local LAN is having some weird effect on something?

Maybe try testing if you can transfer a dino while you are connecting from outside of the network the server is on?

Link to comment
Share on other sites

On 9/17/2016 at 11:53 PM, mndfreeze said:

the command:

-NoTransferFromFiltering

is supposed to lock your cluster down so only transfers inside your cluster are allowed, and outside people cannot transfer characters from other servers or single player games regardless of the other prevent****download and upload settings.

 

I had the same theory originally, but I tested it and found it to not be true. Specifying -clusterid is actually what prevents transfers to/from servers outside the cluster, in addition to telling the server where to find the cluster saves.

Did you read this information from an official source somewhere, or is it just speculation?

Link to comment
Share on other sites

Just found some interesting additional settings for server admins regarding clusters:

Command Line:
?TributeItemExpirationSeconds=3600?TributeDinoExpirationSeconds=3600?TributeCharacterExpirationSeconds=3600

GameUserSettings.ini:
TributeItemExpirationSeconds=3600
TributeDinoExpirationSeconds=3600
TributeCharacterExpirationSeconds=3600

There is also MaxTributeItems, MaxTributeDinos and MaxTributeCharacters, but they seem to have no effect.

The TributeSomethingExpirationSeconds entries set the length of the timer until Items/Dinos/Characters get removed from the cluster data, the example would set everything to 1 Hour.

Link to comment
Share on other sites

  • 3 weeks later...
  • 4 weeks later...
9 hours ago, Gumballz said:

yes.

Instance A and B could share one clusterID   and instances C & D could share another all ran off the same server.

Probably better having them ran from different users/directories though,  or may cause some conflict 

I mean one server having two clusterids. So, Instance E could share the clusterID for Instance A and B, and the clusterID for instance C and D together??

Link to comment
Share on other sites

  • 3 weeks later...
  • 3 months later...

First of all, I just wanted to comment on how helpful this post is! So, thank you. :D

However, I am having a few issues...

  • I've created 2 save files within the game folders (2 servers) - I believe the save locations is my issue. Maybe I'm not understanding - where should the save folders be created?
  • I have updated the config file on both servers and the relevant command line and game INI files
  • I uploaded my character's data via an obelisk (instead of transferring to another ARK, accidentally)
  • I then updated the settings to read 'FALSE' for the following:

 ?PreventDownloadSurvivors=False
?PreventDownloadItems=False
?PreventDownloadDinos=False
?PreventUploadSurvivors=False
?PreventUploadItems=False
?PreventUploadDinos=False

  • I then created a new character on The Center, and went to an obelisk, and transmitted data to another ARK
  • I log into Scorched Earth and my character has a different name/level

Needless to say, I am rather confused!

This has all been set up on a dedicated game server; I have access to the box, config files, etc.

If anyone could help me, please let me know! If you need any more information, also let me know!

Thank you in advance.

Link to comment
Share on other sites

Hi, I made a huge mistake by typing the wrong save location for one of my server, I am trying to create a cluster between my The Center and my brand new scorched earth server. I already have a huge save folder around 4.2GB for my The Center server named SaveArks. When creating the cluster I wrote SaveArk so after launching my server everything was gone. I saw my mistake did all the changed but now eveytime I start my The Center server I get this fatal error (see below) anyone can help me? I have saved the SaveArks folder to my USB key before trying to create de cluster so all my datas should be fine but I don't know where to start. Thanks.

Fatal error!

VERSION: 256.32 
ShooterGameServer.exe!UPrimalItem::Serialize() (0x00007ff7f85bcaf1) + 57 bytes [c:\svn_ark\projects\shootergame\source\shootergame\private\primalitem.cpp:4670]
ShooterGameServer.exe!WorldSerializedObject::SerializeObjectData() (0x00007ff7f8ed95a5) + 0 bytes [c:\svn_ark\engine\source\runtime\coreuobject\private\uobject\worldserializedobject.cpp:604]
ShooterGameServer.exe!UWorld::LoadFromFile() (0x00007ff7f95fd533) + 0 bytes [c:\svn_ark\engine\source\runtime\engine\private\world.cpp:6207]
ShooterGameServer.exe!AShooterGameMode::LoadWorld() (0x00007ff7f8702e59) + 625 bytes [c:\svn_ark\projects\shootergame\source\shootergame\private\shootergamemode.cpp:1272]
ShooterGameServer.exe!AShooterGameMode::InitGame() (0x00007ff7f86f86d7) + 0 bytes [c:\svn_ark\projects\shootergame\source\shootergame\private\shootergamemode.cpp:756]
ShooterGameServer.exe!UWorld::InitializeActorsForPlay() (0x00007ff7f95f3f91) + 42 bytes [c:\svn_ark\engine\source\runtime\engine\private\world.cpp:3088]
ShooterGameServer.exe!UEngine::LoadMap() (0x00007ff7f95d1c84) + 0 bytes [c:\svn_ark\engine\source\runtime\engine\private\unrealengine.cpp:9828]
ShooterGameServer.exe!UEngine::Browse() (0x00007ff7f95cd4dd) + 41 bytes [c:\svn_ark\engine\source\runtime\engine\private\unrealengine.cpp:8557]
ShooterGameServer.exe!UShooterGameInstance::StartGameInstance() (0x00007ff7f86e926a) + 0 bytes [c:\svn_ark\projects\shootergame\source\shootergame\private\shootergameinstance.cpp:256]
ShooterGameServer.exe!UGameEngine::Init() (0x00007ff7f93db068) + 0 bytes [c:\svn_ark\engine\source\runtime\engine\private\gameengine.cpp:713]
ShooterGameServer.exe!UShooterEngine::Init() (0x00007ff7f86dee07) + 0 bytes [c:\svn_ark\projects\shootergame\source\shootergame\private\shooterengine.cpp:298]
ShooterGameServer.exe!FEngineLoop::Init() (0x00007ff7f841ce69) + 0 bytes [c:\svn_ark\engine\source\runtime\launch\private\launchengineloop.cpp:2093]
ShooterGameServer.exe!GuardedMain() (0x00007ff7f8419323) + 20 bytes [c:\svn_ark\engine\source\runtime\launch\private\launch.cpp:128]
ShooterGameServer.exe!GuardedMainWrapper() (0x00007ff7f841ec2a) + 5 bytes [c:\svn_ark\engine\source\runtime\launch\private\windows\launchwindows.cpp:125]
ShooterGameServer.exe!WinMain() (0x00007ff7f841ed60) + 8 bytes [c:\svn_ark\engine\source\runtime\launch\private\windows\launchwindows.cpp:209]
ShooterGameServer.exe!__tmainCRTStartup() (0x00007ff7fa34d0ed) + 21 bytes [f:\dd\vctools\crt\crtw32\dllstuff\crtexe.c:618]
KERNEL32.DLL!UnknownFunction (0x00007ff8e0428364) + 0 bytes [UnknownFile:0]
ntdll.dll!UnknownFunction (0x00007ff8e05a70d1) + 0 bytes [UnknownFile:0]
ntdll.dll!UnknownFunction (0x00007ff8e05a70d1) + 0 bytes [UnknownFile:0]
慌瑳删浥瑯⁥畆据楴湯䌠楬湥剴条潤汬灕慤整਍

Link to comment
Share on other sites

  • 2 weeks later...
On 27.11.2016 at 1:32 PM, koreamedia said:

I mean one server having two clusterids. So, Instance E could share the clusterID for Instance A and B, and the clusterID for instance C and D together??

No, each map has just one clusterId (which is in fact just a directory to save binary files to). 

Although, you could rsync those files between two clusters so you may build something like a cluster network. As far as I understand your question, you want something like two clusters in which just one map could access both. This would need some own scripting, I believe.

 

By the way. Is there a way to connect maps throughout physical servers by using clustering? I could achieve that with ssh rsyncing, yet I just wanna know if there is a out of the box way to do it...

Link to comment
Share on other sites

  • 1 month later...

I am using method 2 of your post, but whenever I go to a beacon to transfer to another server, my other server is never listed, even though both are running at the same time.

I have a 2 TB drive (S:\) where I have 2 complete instances of ARK for the servers.  (My client session runs from a 3rd complete instance from a different drive.)

Below are the details from my 2 server instances.  Can you see something wrong in the command line?

Any help will be greatly appreciated!

=============================================================================
---------------------------------------------------------------------------------------------------------------------------------------
=============================================================================
Server 1: Acid Island
=====================

Setting breakpad minidump AppID = 346110
[2017.06.08-19.34.34:227][  0]LogMemory: Platform Memory Stats for WindowsServer
[2017.06.08-19.34.34:227][  0]LogMemory: Process Physical Memory: 64.19 MB used, 64.19 MB peak
[2017.06.08-19.34.34:228][  0]LogMemory: Process Virtual Memory: 56.02 MB used, 56.16 MB peak
[2017.06.08-19.34.34:228][  0]LogMemory: Physical Memory: 8015.50 MB used, 32677.48 MB total
[2017.06.08-19.34.34:228][  0]LogMemory: Virtual Memory: 308.93 MB used, 134217728.00 MB total
[2017.06.08-19.34.34:447][  0]ARK Version: 258.61
[2017.06.08-19.34.34:447][  0]PID: 6864
[2017.06.08-19.34.48:527][  0]Primal Game Data Took 13.64 seconds
[2017.06.08-19.35.23:476][  0]Server: "AcidIsland" has successfully started!
[2017.06.08-19.35.28:257][  0]Commandline: TheIsland?listen?Port=7777?QueryPort=27015?MaxPlayers=4?AllowCrateSpawnsOnTopOfStructures=True?SessionName=AcidIsland -ClusterDirOverride="S:\ASM\clusters" -ForceAllowCaveFlyers -NoTransferFromFiltering -clusterid=Acid -NoBattlEye -useallavailablecores -usecache -nomemorybias -nosteamclient -game -server -log
[2017.06.08-19.35.28:257][  0]Full Startup: 55.69 seconds (BP compile: 0.00 seconds)
[2017.06.08-19.35.28:258][  0]Number of cores 6

=============================================================================
---------------------------------------------------------------------------------------------------------------------------------------
=============================================================================


Server 2: Acid Desert
=====================

Setting breakpad minidump AppID = 346110
[2017.06.08-19.32.36:304][  0]LogMemory: Platform Memory Stats for WindowsServer
[2017.06.08-19.32.36:304][  0]LogMemory: Process Physical Memory: 64.08 MB used, 64.08 MB peak
[2017.06.08-19.32.36:305][  0]LogMemory: Process Virtual Memory: 55.77 MB used, 55.91 MB peak
[2017.06.08-19.32.36:305][  0]LogMemory: Physical Memory: 8603.03 MB used, 32677.48 MB total
[2017.06.08-19.32.36:305][  0]LogMemory: Virtual Memory: 308.91 MB used, 134217728.00 MB total
[2017.06.08-19.32.36:522][  0]ARK Version: 258.61
[2017.06.08-19.32.36:522][  0]PID: 8320
[2017.06.08-19.32.51:009][  0]Primal Game Data Took 14.01 seconds
[2017.06.08-19.33.16:549][  0]Server: "AcidDesert" has successfully started!
[2017.06.08-19.33.19:000][  0]Commandline: ScorchedEarth_P?listen?Port=7778?QueryPort=27016?MaxPlayers=4?AllowCrateSpawnsOnTopOfStructures=True?SessionName=AcidDesert -ClusterDirOverride="S:\ASM\clusters" -ForceAllowCaveFlyers -NoTransferFromFiltering -clusterid=Acid -NoBattlEye -useallavailablecores -usecache -nosteamclient -game -server -log
[2017.06.08-19.33.19:000][  0]Full Startup: 44.10 seconds (BP compile: 0.00 seconds)
[2017.06.08-19.33.19:001][  0]Number of cores 6


=============================================================================
---------------------------------------------------------------------------------------------------------------------------------------
=============================================================================

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...