Configuration of Sym3 Activate service
The file used to configure Sym3 Activate service is an XML file located here:
C:\Program Files (x86)\Sym3\Sym3 Activate\BCS.Sym3.ActivateService.exe.config
Configure services to monitor
The following fragment sets up which services Sym3 Activate should control/monitor.
Example:
<services>
<add name="Sym3 Operator Service" KeepAlive="true" priority="1" monitorOnly="true" maxNumberOfRetries="3"/>
<add name="Sym3 Alarm Service" priority="1" maxNumberOfRetries="3"/>
<add name="Sym3 Authentication Service"
priority="1"
monitorOnly="false"
maxNumberOfRetries="3"
KillProcess="true" KillProcessTimeout="1000" StartTimeout="30000" StopTimeout="30000" >
<KillProcesses>
<add name="notepad" />
<add name="chrome" />
</KillProcesses>
</add>
</services>
Attributes
Attribute | Description | Default Value |
---|---|---|
name |
Service display name. This is the name of the service as it appears in the Microsoft Windows Services window (services.msc ) |
Mandatory |
priority |
Priority that determins the starting order of services. Value of 1 has the highest priority. Specify a higher priority for services that should be started first. | 0 |
KeepAlive |
Set to true if this service should be started if it is not already running | False |
monitorOnly |
When set to true , Sym3 Activate will not start or stop the service. Usually this value should be true for services set to automatic start mode. Setting monitorOnly to false for automatic mode services may cause Sym3 Activate to not operate normally. |
False |
maxNumberOfRetries |
Number of times that Activate will retry to start the service. A lower value around 3 is recommended. | 0 |
KillProcess |
Enables or disables killing of service process during stop operation. | True |
KillProcessTimeout |
The time in milliseconds that Sym3 Activate will wait for service process to be killed. Usually killing process is very fast so this timeout should be a short one. | 500ms |
KillProcesses |
Can be used to specify any more secondary processes to be killed during stop operation. This will be effective only when KillProcess is set to true . The name of the process to be killed should be specified in name attribute. Please note that killing a process is not a graceful operation. |
Empty |
StartTimeout |
The amount of time in milliseconds that Sym3 Activate will wait for the service to be started. If this is not specified <ServiceControlStartTimeOut> is used. This value should be configured according to the time taken for the service to start. |
|
StopTimeout |
The amount of time in milliseconds that Sym3 Activate will wait for the service to be stopped. If this is not specified <ServiceControlStopTimeOut> is used. This value should be configured according to the time taken for the service to stop. |
Settings and Options
The appSettings section of the configuration file is read by the framework, each entry has a key and a value, these keys are detailed within the following table:
❗: The most important settings likely to be changed for your project.
! | Attribute | Type | Description | Typical Value |
---|---|---|---|---|
StandaloneMode |
Boolean | If True, Sym3 Activate is working without a peer. Can be useful if you want to monitor services. | False | |
StatusListeningPort |
Number | The port to receive status updates from Sym3 services. This UDP port must be allowed in the firewall. | 3000 | |
ServiceControlStatusCheckInterval |
Number | The time interval in milliseconds to check Sym3 services status (monitor only). | 1000 | |
ServiceControlRetryInterval |
Number | The time interval in milliseconds to check Sym3 services status and restart a service if not started. Only effective in Active state. | 5000 | |
ServiceControlStartTimeOut |
Number | The timeout in milliseconds to wait to start a service | 10000 | |
ServiceControlStopTimeOut |
Number | The timeout in milliseconds to wait to stop a service | 10000 | |
❗ | VirtualIPAddress |
String | The IP address that is shared between the two servers, this is the address Sym3 Operator Client will connect to. Set to 127.0.0.1 to disable sharing IP |
|
❗ | NetworkAdapter |
String | The network adapter the shared IP address is assigned to (the adapter to add/remove the address from). See how to get this info | |
SubnetMask |
String | Subnet mask for virtual IP | 255.255.255.0 |
|
EnforceVirtualIP |
Boolean | Whether or not to force using shared IP Address to make outbound connection | False | |
❗ | PrimaryServer |
Boolean | Flag to indicate this is the primary server. Only one of the systems maybe set as the primary server, this is a fallback to ensure only one will ever be active | True for Server1, False for Server2 |
❗ | PeerIPAddress |
String | The IP address of the peer (Where the other Sym3 Activate service is located) | |
❗ | RefIPAddress |
String | The IP address of the reference server to ping periodically. This must be a valid and pingable address on your network. | Mandatory |
RefInterval |
Number | The time between sending the ping requests to the reference server (milliseconds) | 5000 | |
RefPingTimeout |
Number | The amount of time to wait for a response from the reference server, before aborting the ping request | 4 | |
❗ | PeerStatusListeningPortRemote |
Number | The port number that the remote activate server has bound to for receiving status updates | Mandatory |
❗ | PeerStatusListeningPortLocal |
Number | The port number activate binds to, to receive status updates from the peer | Mandatory |
StatusSendingInterval |
Number | The rate (in milliseconds) at which Sym3 Activate status updates are sent | 1000 | |
StatusReceiveTimeout |
Number | The time interval to wait for a Sym3 Activate status update before reporting it as a timeout | 5000 |
Network adapter
You can get the name of the network adapter with this powershell command:
Get-NetAdapter | Select-Object Name
Example
Let say:
- Server1 is
172.29.27.181
- Server2 is
172.29.27.182
We need:
- An external valid IP, for example
172.29.27.1
- A free IP address to become the virtual shared IP address, for example
172.29.27.180
Server 1 Configuration
This example list the most important values to be changed, the others remains unchanged
<!-- Typical values -->
<add key="StandaloneMode" value="false" />
<!-- Virtual IP -->
<add key="VirtualIPAddress" value="172.29.27.180" />
<add key="SubNetMask" value="255.255.255.0" />
<add key="NetworkAdapter" value="Ethernet1" />
<!-- Server1 is the PRIMARY server -->
<add key="PrimaryServer" value="true" />
<!-- IP address of Server2 -->
<add key="PeerIPAddress" value="172.29.27.182" />
<!-- IP address of the reference (witness) -->
<add key="RefIPAddress" value="172.29.27.1" />
<!-- Ports to be used -->
<add key="PeerStatusListeningPortRemote" value="20001" />
<add key="PeerStatusListeningPortLocal" value="20002" />
Server 2 Configuration
This example list the most important values to be changed, the others remains unchanged
<!-- Typical values -->
<add key="StandaloneMode" value="false" />
<!-- Virtual IP -->
<add key="VirtualIPAddress" value="172.29.27.180" />
<add key="SubNetMask" value="255.255.255.0" />
<add key="NetworkAdapter" value="Ethernet1" />
<!-- Server1 is the PRIMARY server -->
<add key="PrimaryServer" value="false" /> <!-- !!!!! DIFFERENT !!!!!-->
<!-- IP address of Server2 -->
<add key="PeerIPAddress" value="172.29.27.181" /> <!-- !!!!! DIFFERENT !!!!!-->
<!-- IP address of the reference (witness) -->
<add key="RefIPAddress" value="172.29.27.1" />
<!-- Ports to be used -->
<add key="PeerStatusListeningPortRemote" value="20002" /> <!-- !!!!! DIFFERENT !!!!!-->
<add key="PeerStatusListeningPortLocal" value="20001" /><!-- !!!!! DIFFERENT !!!!!-->