Closed mwherman2000 closed 1 year ago
@mwherman2000 Each instance of the graph engine server must run on a separate IP port; you can't have each instance write to the same persistence store. There are at least two ways to configure the graph engine:
at runtime you can point to a an xml config file like this: TrinityConfig.LoadConfig(@"D:\Trinity TripleStore Server Deployment\trinity.xml");
//TrinityConfig.LoggingLevel = LogLevel.Info;
//TrinityConfig.Servers.Add(graphEngineCluster);
//TrinityConfig.CurrentRunningMode = RunningMode.Server;
//TrinityConfig.AddServer(TripleStoreServerInfo);
//TrinityConfig.LogEchoOnConsole = true;
//TrinityConfig.StorageRoot = TripleStoreStorageRoot;
or you can configure you xml config file
```
Each GE App Server instance must run against its own configuration data. If you are running two servers then you may want to run them in a GE Availability Cluster. Here is an example of how I am doing so in one of dev environments:
<?xml version="1.0" encoding="utf-8" ?>
<Trinity ConfigVersion="2.0" xmlns="https://www.graphengine.io/schema/config">
<!--Declare and Define the Head (Primary) Graph Engine Cluster-->
<!-- <Local Template="primary-rub-truespark-sf-cluster-template"/>-->
<!-- <Remote Template="rub-truespark-ontology-taxonomy-cluster-template"/>-->
<!--A Cluster node contains configurations for servers and proxies of a Graph Engine cluster.
There can be multiple Cluster nodes as long as they have different identifiers.
Endpoint="10.1.10.5:7001"
A Cluster node can have an optional attribute Id.-->
<Local>
<Network HttpPort="-1"
ClientMaxConn="2"
ClientSendRetry="5"
ClientReconnectRetry="5"
Handshake="TRUE"/>
<Logging LogDirectory="D:\GraphEngine-Log"
LogLevel="Verbose"
LogToFile="TRUE"
EchoOnConsole="TRUE"/>
<Storage TrunkCount="256"
ReadOnly="FALSE"
StorageCapacity="Max16G"
StorageRoot="D:\GraphEngine-Storage"
DefragInterval="600"/>
<LIKQ Timeout="90000" />
</Local>
<Cluster RunningMode="Server">
<!-- genexusprime.inknowworksdev.net -->
<Server Endpoint="10.1.10.5:7001" AssemblyPath="D:\Trinity TripleStore Server Deployment\">
<Network HttpPort="-1"
ClientMaxConn="2"
ClientSendRetry="5"
ClientReconnectRetry="5"
Handshake="TRUE"/>
<Logging LogDirectory="D:\GraphEngine-Log"
LogLevel="Verbose"
LogToFile="TRUE"
EchoOnConsole="TRUE"/>
<Storage TrunkCount="256"
ReadOnly="FALSE"
StorageCapacity="Max16G"
StorageRoot="D:\GraphEngine-Storage"
DefragInterval="600"/>
<LIKQ Timeout="90000" />
</Server>
<!-- TS-GE-AppSvrA1.rocketurbiz.net -->
<Server Endpoint="10.30.10.108:7001" AssemblyPath="D:\Trinity TripleStore Server Deployment\">
<Network HttpPort="-1"
ClientMaxConn="2"
ClientSendRetry="5"
ClientReconnectRetry="5"
Handshake="TRUE"/>
<Logging LogDirectory="D:\GraphEngine-Log"
LogLevel="Verbose"
LogToFile="TRUE"
EchoOnConsole="TRUE"/>
<Storage TrunkCount="256"
ReadOnly="FALSE"
StorageCapacity="Max16G"
StorageRoot="D:\GraphEngine-Storage"
DefragInterval="600"/>
<LIKQ Timeout="90000" />
</Server>
<!-- TS-GE-AppSvrA1.rocketurbiz.net -->
<Server Endpoint="10.30.10.113:7001" AssemblyPath="D:\Trinity TripleStore Server Deployment\">
<Network HttpPort="-1"
ClientMaxConn="2"
ClientSendRetry="5"
ClientReconnectRetry="5"
Handshake="TRUE"/>
<Logging LogDirectory="D:\GraphEngine-Log"
LogLevel="Verbose"
LogToFile="TRUE"
EchoOnConsole="TRUE"/>
<Storage TrunkCount="256"
ReadOnly="FALSE"
StorageCapacity="Max16G"
StorageRoot="D:\GraphEngine-Storage"
DefragInterval="600"/>
<LIKQ Timeout="90000" />
</Server>
</Cluster>
</Trinity>
It looks like the key (minimal) thing I need to do is have each instance specify it's own StorageRoot
:
<Storage TrunkCount="256"
ReadOnly="FALSE"
StorageCapacity="Max16G"
StorageRoot="D:\GraphEngine-Storage"
DefragInterval="600"/>
I'm already overriding the ports. :-) Thank you.
Thank you
I'm overriding the ports properly, ...that's not the problem...
The problem seems to be because I'm running each instance out of the same "Debug" folder in Visual Studio. See below.
How can I override/specify which Trinity database folder to use? Is this what I need to be able to do?
NOTE: If I make a copy of my "Debug" folder and run an instance out of each folder, things appear to work fine.
Michael