Activate Service Configuration
The Activate Service is a stand alone install that may optionally be installed to provide an automatic failover for Sym3 services where a built-in redundant server functionality is required. The failover to the redundant server is automatic should connectivity to the primary server be lost.
Overview
The architecture of the Activate service is detailed as follows:
Activate Service adds or removes the virtual IP used by Sym3 Operator to its local adapter to do the failover. Activate uses a state machine to determine if it is in Active (virtual IP assigned) or in Passive state. Sym3 Services are also handled differently on an Active or Passive server. Activate is communicating with a reference IP and with the other Activate service to test if it should stay Active or not. The failover is handled as a state machine.
Configuration
The main configuration file that is used to configure the Activate service is BCS.Sym3.ActivateService.exe.config and can generally (depending upon install options) be found in the folder
C:/Program Files (x86)/Sym3/Sym3 Activate.
The following fragment from this file shows the layout.
The services section has a list of services to monitor and how they should be handled
Attribute | Description |
---|---|
name | This is the service name and is case sensitive |
priority | Priority for the service. 1=highest |
monitorOnly | Setting this to true will prevent activate starting/stopping the service when it goes active/passive |
maxNumberOfRetries | Number of retries before failover goes to error state which triggers the failover |
The appSettings section of the configuration file is read by the framework, each entry has a key and a value, these are detailed within the following table:
Key | Description |
---|---|
StandaloneMode | Boolean: if True, Activate is working without a peer. Can be useful if you want to monitor services. |
StatusListeningPort | The port to receive status updates from Sym3 services. |
ServiceControlStatusCheckInterval | The time interval in milliseconds to check Sym3 services status (monitor only). |
ServiceControlRetryInterval | The time interval in milliseconds to check Sym3 services status and restart a service if not started. Only effective in Active state. |
ServiceControlStartTimeOut | The timeout in milliseconds to wait to start a service |
ServiceControlStopTimeOut | The timeout in milliseconds to wait to stop a service |
VirtualIPAddress | The IP address that is shared between the two servers, this is the address Sym3 Operator is connected to. |
NetworkAdapter | The network adapter the shared IP address is assigned to |
SubnetMask | Subnet mask for virtual IP |
PrimaryServer | 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 |
PeerIPAddress | The peer activate IP address |
RefIPAddress | The IP address of the reference server to ping periodically. |
RefInterval | The time between sending the ping requests to the reference server (milliseconds) |
RefPingTimeout | The amount of time to wait for a response from the reference server, before aborting the ping request |
PeerStatusListeningPortRemote | The port number that the remote activate server has bound to for receiving status updates |
PeerStatusListeningPortLocal | The port number activate binds to, to receive status updates from the peer |
StatusSendingInterval | The rate (in seconds) at which Activate status updates are sent |
StatusReceiveTimeout | The time interval to wait for an Activate status update before reporting it as a timeout |
The remaining xml is used to set up a WCF service for logging and to specify Activate service endpoint.
Logging
If Activate services are in contradictory states or in error state, check the log file, available in the folder C:/ProgramData/Sym3/Activate/Log. The only way to recover from an Error State is to restart Activate service.
IP Address Conflict
There is a special case where the failure of the Active server will create a state where automatic failover will not be successful. This may occur if the active Activate service unexpected terminates prior to removing the shared IP address from its network adapter.
The server going to the active state will detect the IP address has not been released by the other server; it therefore goes into the Error state, as it cannot successfully assign the IP address. This results in both servers not being operational, the conflict will be detailed within the log file.
To resolve this situation, the IP address on the server where Activate terminated can be removed manually (using the netsh command), or the Activate service restarted on that server. The other Activate service will also require a restart.
Due to the low complexity and built in fault tolerance of the Activate service, the possibility of the occurrence of this situation is low. It has only occurred during testing by actively terminating the service process.
SNMP setup
All new Sym3 installs will be configured using SNMP communication.
Use the SysManSrvCfg.exe tool in the Sym3 SNMP Connector install directory to create a suitable cfg file for the server.
The Activate State result is available through the following OID from the Sym3HLC.MIB
OID 1.3.6.1.3.2.21.1.12.8.3.0
If you are enabling Activate Service then you MUST ensure the Sym3 Alarm Service is set to Manual. Failure to do this may cause the Alarm service to start on the wrong server when the machine is restarted.
State results
Possible state result codes are:
State | Value |
---|---|
UNKNOWN | 0 |
INITIALISATION_STATE | 1 |
WAIT_COMMS_STATE | 2 |
ACTIVE_STATE | 3 |
ACTIVESTATE_EXIT_STATE | 4 |
PASSIVE_STATE | 5 |
GOING_ACTIVE_STATE | 6 |
GOING_PASSIVE_STATE | 7 |
ERROR_STATE | 8 |
SHUTDOWN_STATE | 9 |
Only the states UNKNOWN and ERROR_STATE need to be alarmed, the other states are either transitory or for information only.
Example setup
The config file for both servers should be set to monitor the Sym3 services:
- Operator server: Always on (active and passive)
- Alarm Server: Stop when passive
- Authentication Server: Monitoring only
Starting with the default BCS.Sym3.ActivateService.exe.config file that is installed with Sym3 Activate, open with notepad, check and edit (if necessary) the following entries;
- PrimaryServer: One must be true the other false for the activate pair
- PeerIPAddress: Must point to the remote peer machine
- RefIPAddress: May be shared between activate peers
- VirtualIPAddress: This needs to be the same Virtual IP used by both servers
- PeerStatusListeningPortRemote:Default 20001, swap with PeerStatusListeningPortLocal on the other server
- PeerStatusListeningPortLocal: Default 20002, swap with PeerStatusListeningPortRemote on the other server
- NetworkAdapter: This must be the exact name used for the network adapter for the machine.
For this Adapter set NetworkAdapter to Local Area Connection, for the connection above, set it to Ethernet.
Assuming the following IP addresses:
- Ref IP address on 192.168.23.1
- Server 1 on IP 192.168.23.2
- Server 2 on IP 192.168.23.3
- Shared IP address 192.168.23.4
Server 1 (IP 192.168.23.2) config would have the values:
- PrimaryServer = true
- PeerIPAddress = 192.168.23.3
- RefIPAddress = 192.168.23.1
- VirtualIPAddress = 192.168.23.4
- PeerStatusListeningPortRemote = 20001
- PeerStatusListeningPortLocal = 20002
Server 2 (IP 192.168.23.3) config would have the values:
- PrimaryServer = false
- PeerIPAddress = 192.168.23.2
- RefIPAddress = 192.168.23.1
- VirtualIPAddress = 192.168.23.4
- PeerStatusListeningPortRemote = 20002
- PeerStatusListeningPortLocal = 20001