This section of the document provides details about the pre-configured HA profiles. These profiles can be found in %FIORANO_HOME%\fmq\profiles under FioranoMQ_HA_rpl and FioranoMQ_HA_shared directories respectively.

Primary & Secondary Servers can be started simply by booting the container with these profiles. The table below lists the profiles to be used for Primary and Secondary Servers when setting up HA in Replication or Shared mode.

Mode

Profile Directory

Meant for

Replication

fmq/profiles/FioranoMQ_HA_rpl/HAPrimary

Primary Server

Replication

fmq/profiles/FioranoMQ_HA_rpl/HASecondary

Secondary Server

Shared

fmq/profiles/FioranoMQ_HA_shared/ HAPrimary

Primary Server

Shared

fmq/profiles/FioranoMQ_HA_shared/ HASecondary

Secondary Server

To launch the server on one of these profiles, use the following command:


For example, to launch the primary server in replication mode, use the following command:

Icon
Note: This document would refer the selected profile (in FioranoMQ_HA_rpl or FioranoMQ_HA_shared directories) as %SELECTED_HA_PROFILE%. The possible values for %SELECTED_HA_PROFILE% are as shown in the table above.


Following steps need to be followed for configuring any HA profiles

  1. Start Fiorano eStudio. Select Tools >Configure FioranoMQ from the menu bar.
  2. Select the directory pointing to %SELECTED_HA_PROFILE% from the dialog box and click the Open button.
  3. Right-click on the selected profile, select FioranoMQ Replicated HA or FioranoMQ Shared HA option. User now can see a new window appeared with all the required configurable parameters. Now, configure all the required parameters.
Icon
Note: When configuring the server (in offline mode) through eStudio, please ensure that FioranoMQ Server is not running.


Configure BackupHAIPAddress & BackupHAPort of remote Server: HA Layer of an FioranoMQ server connects to the backup server's HA Layer. In order to configure the back-up server's IP and Port, navigate to the node specified below and set the value of BackupHAIPAddress and BackupHAPort displayed in the Properties of FioranoHAKRPCProvider pane.
%SELECT_HA_PROFILE%>Fiorano -> HAKRPCProvider -> FioranoHAKRPCObject
The default profiles have Backup HA IP address configured to localhost and BackupHA Port to 3000 in primary server and 2000 in secondary server. In other words, Primary Server's HA Layer in default profiles would try to connect at localhost on port 3000 while the Secondary's HA Layer would try to connect to localhost on port 2000 by default.

Icon
Note: The BackupHA Port here does not refer to the port on which backup server accepts the client connections but the port on which it's HA layer is listening. This should be same as the value of HAConnectionManager's port configured in the peer server.

 

Configure self - Port: This port refers to the port number on which HA Layer would accept connection from its peer server. The default HA profiles have their HA Port configured for primary server as 2000 and secondary server as 3000. In order to configure Self port, navigate to the node specified below and modify the value of Port in the Properties of FioranoHAConnectionManager pane
%SELECTED_HA_PROFILE% >Fiorano -> FioranoHAConnectionManager

Icon
Note: A change in this parameter would require modifying BackupHAPort Configuration in the peer server.


Configure Lock file: Full path of the file which will be used for determining the HA states. This file should be present in the third machine and always be available to the HA servers with all permissions. The LockFile machine must be same as the machine whose IPAddress is given as GatewayServerIPAddress. In order to configure Lock file, navigate to the node specified below and modify the value of LockFile in the Properties of FioranoHAManager pane. Path to Lock file:
%SELECTED_HA_PROFILE% >Fiorano -> FioranoHAManager
A file is created and the directory containing this file is shared with read/write permissions. The lock file, if present on a machine having UNIX/Solaris operating system should be shared by using the NFS protocol - version 4. If the lock file is present on Windows it should be shared using the Samba Protocol. (The lock file can be shared on Windows using NFS – version 4, if it supports it.)
Setup:

OS hosting the Lock File & Protocol Used

OS hosting the servers

Windows - Samba

Windows / Linux

Linux - NFSv4

Linux / Solaris 8,9,10

Solaris - NFSv4

Linux / Solaris 8,9,10

Note: The user has to make sure that, the operating system hosting the server supports the protocol used for sharing the lock file. The LockFile and the directory containing the LockFile should have read/write permissions set. On Operating Systems other than Windows, one can verify the permissions using the ls -l command.
On Windows Operating System, the directory on the gateway machine containing the LockFile should be mapped to a network drive.
Example:
If the directory containing the lock file on Windows, is shared using the samba protocol, this directory should be mapped to a network drive on the Windows machine hosting the server. Let us say the shared directory is mapped to a drive letter 'Z:/' and the lock file is lock.lck , the lock file path now becomes 'Z:/lock.lck'. This path should be used to set the LockFile parameter while configuring the profile via Fiorano eStudio.
On non Windows Operating System, the directory on the gateway machine containing the LockFile should be mounted on the machine hosting the server.
Examples:
If the lock file is present in a windows samba share & is mounted at /home/user/db on the machine hosting the server then the lock file path on the machine hosting the server would be /home/user/db/lock.lck. This absolute path should be used to set the LockFile parameter while configuring the profile via Fiorano eStudio.
Example Mount Command:
'mount -t cifs –o rw //<gatewayIP>/<sharename> <path on local machine where the directory has to be mounted.>' If the lock file 'lock.lck' is shared using NFS v4 and the directory db is mounted at /home/user/db on the machine hosting the server then the lock file path on the machine hosting the server would be /home/user/db/lock.lck. This absolute path should be used to set the LockFile parameter while configuring the profile via Fiorano eStudio.
Example Mount Command:
'mount -t nfs4 -o rw <gatewayIP>:/ <path on local machine where the directory has to be mounted.>'
Note: The newly added mount point will disappear after system reboot. The user has to make sure that the mount is automated on system reboot. One can refer to the URL 'http://www.brennan.id.au/19-Network_File_System.html#nfs4' on how to share a directory using NFS v4.
Configure Gateway Server: HA Layer pings the gateway machine to determine the status of network connectivity. The default profiles have gateway configured to localhost and should be changed to any third independent reliable machine (preferably to the physical router machine on the network). In order to configure Gateway Server, navigate to the node specified below and modify the value of GatewayServerIP Address and GatewayServerPort in the Properties of FioranoHAManager pane
%SELECTED_HA_PROFILE% >Fiorano -> FioranoHAManager
Note: Gateway machine server should be configured as the machine which hosts the lock file. This is essential for the functionality of the HA server to work.
Configure isPrimary: Set Primary to true for primary FioranoMQ Server and false for backup Server by modifying its value as shown in the Properties panel by clicking the node specified below.
%SELECTED_HA_PROFILE%>Fiorano>HA->HAManager?FioranoHAManager
The default profiles are already configured. Hence, no change would be required when using them.
Common Configuration: HA requires enabling Durable Connections, Pinging and Auto Revalidation support in FioranoMQ Server. This can be done by modifying the parameters specified below in the Properties panel.
%SELECTED_HA_PROFILE%>Fiorano->etc -> FmqConfigLoader

  • Set AllowDurableConnections Property to true.
  • Set PingEnabled to true.
  • Set EnableAutoRevalidation to true

Note: The pre-created profiles already come with this configuration and hence no change would be required when working on them.
Right-click on the %SELECTED_HA_PROFILE% root node present under the Explorer tab on the left hand side of the eStudio and select the Save option to save the configuration.
Example Configuration:

Parameter

Primary Server

Backup Server

url HAKRPCProvider

http://164.164.128.128:1856

http://164.164.128.108:1956

BackupHAIP Address

164.164.128.108

164.164.128.128

Back upHAPort

3000

2000

HAConnectionManager Port

2000

3000

Common Config
Backup IP Address

164.164.128.108

164.164.128.128

Port

1956

1856

Enable DurableConnections

True

true

PingEnabled

True

true

HAManager isPrimary

True

false

Gateway IP Address

164.164.128.108

164.164.128.128

LockFile

/home/fmq/Lock.dat

/home/fmq/Lock.dat

After changing the HA Layer's configuration, the server's existing database should be cleared before restarting. The existing datastore can be cleared by executing the clearDB script in fmq/bin folder of your installation with profile name as an argument.
For example, in Windows:

  • clearDB.bat FioranoMQ_HA_rpl\HAPrimary
  • clearDB.bat FioranoMQ_HA_rpl\HASecondary

On the client-side the primary server URL has to be added as provider URL and secondary server URL has to be added to the backup URLs'.
While creating Connection Factories through the code, URLs are set in the ConnectionFactory class. The client applications can set a semi-colon separated string of urls (syntax given below) in the InitialContext environment. If the primary server is unavailable for any reason, the FioranoMQ runtime looks up the same object from the server running on the backupURL.
PROVIDER_URL
Constant that holds the name of the environment property for specifying configuration information for the service provider to use. The value of the property should contain a URL string (example, "ldap://somehost:389").
This property may be specified in the environment, an applet parameter, a system property, or a resource file. If it is not specified in any of these sources, the default configuration is determined by the service provider. The value of this constant is "java.naming.provider.url".
Example: PROVIDER URLs can be specified as: http://164.164.130.1:1856;http://localhost:1856
INITIAL_CONTEXT_FACTORY
Constant that holds the name of the environment property for specifying the initial context factory to use. The value of the property should be the fully qualified class name of the factory class that will create an initial context. This property may be specified in the environment parameter passed to the initial context constructor, an applet parameter, a system property, or an application resource file. If it is not specified in any of these sources, the value of this constant is "java.naming.factory.initial".
Example: INITIAL_CONTEXT_FACTORY can be specified as:
fiorano.jms.runtime.naming.FioranoInitialContextFactory
Backup ConnectURLs
Backup ConnectURLS are URLs of the Backup Servers that are used in case the Primary Server is down. Multiple backup URLs may be used but need to be separated by the use of semicolons.
Example: Backup Connect URLs can be specified as: http://backupServer1:1856;http://backupServer2:1856
Code Snippet
Hashtable env = new Hashtable();
env.put(Context.SECURITY_PRINCIPAL, "anonymous");
env.put(Context.SECURITY_CREDENTIALS, "anonymous");
env.put(Context.PROVIDER_URL, "http://164.164.130.1:1856;http://localhost:1856");
env.put(Context.INITIAL_CONTEXT_FACTORY,"fiorano.jms.runtime.naming.FioranoInitialContextFactory");
env.put("BackupConnectURLs","http://localhost:1956;http://localhost:2056;http://localhost:1656");
InitialContext ic = new InitialContext(env);
System.out.println("Created InitialContext :: " + ic);
// 1.1 Lookup Connection Factory and Topic names
TopicConnectionFactory topicConnectionFactory = (TopicConnectionFactory)
ic.lookup("multiURLTCF");
Topic topic = (Topic) ic.lookup("primaryTopic");

4.1 Replicated HA

Configuring FioranoMQ HA in replication mode is much easier, as the pre-created profiles are mostly ready to be used (only the gateway IP needs to be modified). These profiles are pre-configured to demonstrate HA on a single machine. However one can easily setup HA on two different machines as well by properly configuring the HA Layer (as described below).

4.1.1 Basic configurations

One can configure replicated HA profile through changing Configs.cfg file (text based configuration) or through eStudio. Following section describe these options.
Text based
Profiles can now be configured through a text based properties file. Profiles can be found under the %FIORANO_HOME%\fmq\profiles\FioranoMQ_HA_rpl directory (say, PROFILE_HOME). In order to configure replicated HA profile, edit Configs.cfg file under %PROFILE_HOME%\HAPrimary\conf and %PROFILE_HOME%\HASecondary\conf.

The default entries in Configs.cfg file looks like:

ObjectName=Container

HA Common Properties.
#
#FMQGroup.BackupServerIp=localhost
#FMQGroup.BackupServerPort=1956
#FMQGroup.BackupHAPort=3000
#FMQGroup.BackupHAIPAddress=localhost
#FMQGroup.Port=2000
#FMQGroup.PingInterval=30000
#FMQGroup.LockFile=null
#FMQGroup.SocketCreationTimeout=10000
#FMQGroup.GatewayServerIPAddress=localhost
#FMQGroup.GatewayServerPort=7
In front of every parameter, its default values are given.

Take the scenario of running HAPrimary on a machine with IPAddress: 192.169.1.22 and HASecondary on a machine with IPAddress: 192.169.1.200. GatewayServer address is given as 192.169.1.16 which is present in the network. If LockFile, say Lock.dat, has been shared from third system and mounted to /home/fmq1 on 192.168.1.22 system and to /home/fmq2 on 192.168.1.200 system, then on Primary profile these parameters should takes following value:

ObjectName=Container

HA Common Properties.
#
FMQGroup.BackupServerIp=192.168.1.200
#FMQGroup.BackupServerPort=1956
#FMQGroup.BackupHAPort=3000
FMQGroup.BackupHAIPAddress=192.168.1.200
#FMQGroup.Port=2000
#FMQGroup.PingInterval=30000
FMQGroup.LockFile=/home/fmq1/Lock.dat
#FMQGroup.SocketCreationTimeout=10000
FMQGroup.GatewayServerIPAddress=192.168.1.16
#FMQGroup.GatewayServerPort=7
On Secondary profile these parameters should takes following value:
ObjectName=Container

HA Common Properties
#
FMQGroup.BackupServerIp=192.168.1.22
#FMQGroup.BackupServerPort=1856
FMQGroup.BackupHAIPAddress=192.168.1.22
#FMQGroup.BackupHAPort==2000
#FMQGroup.Port=3000
#FMQGroup.PingInterval=30000
FMQGroup.GatewayServerIPAddress=192.168.1.16
#FMQGroup.GatewayServerPort=7
FMQGroup.LockFile=/home/fmq2/Lock.dat
#FMQGroup.SocketCreationTimeout=10000
Modified Configs.cfg file need to be saved for both Primary and secondary profiles.
eStudio
Note: Here, %SELECTED_HA_PROFILE% refers to FioranoMQ_HA_rpl\HAPrimary or FioranoMQ_HA_rpl\HASecondary.
If replicated HA profile needs to be used, then open FioranoMQ_HA_rpl/HAPrimary and FioranoMQ_HA_rpl/HASecondary profile in eStudio Profile Manager. Right-click on the profile and click on FMQ Replicated HA. The FMQ Replicated HA wizard appears.



You can configure all the required values from the wizard. After configuring the wizard, right-click the node and select Save option from the pop-up menu


The following properties are available in the FMQ HA replicated wizard.
BackupHAIPAddress
This IP represents the URL where another FioranoMQ HA server runs. In case this HA server fails then all the required synchronized data is present in backup HA server and HA layer connects to backup HA server.
BackupHAPort
This port represents the backup machine HA port on which another FioranoMQ Server runs.
Port
This port represents the FMQ Server HA port on which this HA Server runs.
LockFile
Full path of the file which will be used for determining the HA states. This file should be present in the third machine and always available to the HA servers with all permissions. The LockFile machine must be same as the machine whose IPAddress is given as GatewayServerIPAddress.
GatewayServerIPAddress
This value represents the IP address of third machine which is always present in the network. This value must not be the machine where one of the FioranoMQ servers runs.
GatewayServerPort
This value represents the port to which any of the HA Servers pings. This port must not be used for some other purpose.
ActiveLockAcquisitionInterval:
This parameter indicates the wait Interval between each attempt to acquire the lock for active server. This value should be in multiples of pingInterval/2 otherwise server may try to acquire the lock on the next multiple of pingInterval/2.
PassiveLockAcquisitionInterval:
This parameter indicates the wait Interval for the passive server to acquire the lock when the link between active and passive server is down. This value should be greater than '2*ActiveLockReacquisitionInterval', otherwise an exception will be thrown. Server won't start if this value is not set properly.
All IP addresses, ports should represent the correct values. Without modifying any of these values HAPrimary and HASecondary can run on a single machine.
Take the scenario of running HAPrimary on a machine with IPAddress: 192.169.1.22 and HASecondary on a machine with IPAddress: 192.169.1.200. Gatewayserver address is given as 192.169.1.16 which is present in the network. If LockFile, say Lock.dat, has been shared from the third system and mounted to /home/fmq1 on 192.168.1.22 system and to /home/fmq2 on 192.168.1.200 system, then HAPrimary wizard looks like:



And HASecondary wizard looks like

4.1.2 Advanced configurations

Text based
Edit Configs.cfg file under:
%FIORANO_HOME%\fmq\profiles\FioranoMQ_HA_rpl\HAPrimary\conf for HAPrimary and
%FIORANO_HOME%\fmq\profiles\FioranoMQ_HA_rpl\HASecondary\conf for HASecondary

 

Port

 

Specify the Port on which HA Manager would listen for connection from the peer HA Server. Apart from the port that the HA Server uses to listen for connections from its clients, it must also listen for a connection from its HA Peer Server, in order to know the status of its peer.This parameter is used to specify that port.

 

Valid values:

 

Default value is 2000 for Primary and 3000 for secondary profile.

 

Note: The port must be not in use by any other services.

 

Configuration:

 

In Configs.cfg file this property can be found under HA common Properties. For example: #FMQGroup.Port=2000

 

 

User can change this value and for taking changes into effect uncomment the value, like- FMQGroup.Port=2500

NagleAlgo

 

Boolean determining whether Nagle's Algorithm is enabled or not in socket creation with peer HA Server. Nagle's algorithm is used in TCP/IP networks for congestion control. It works by coalescing a number of small outgoing messages, and sending them all at once. Specifically, as long as there is a sent packet for which the sender has received no acknowledgment, the sender should keep buffering its output until it has a full packet's worth of output, so that output can be sent all at once.

 

Valid values:

 

 

Default value is no

yes - NagleAlgo is enabled

no - NagleAlgo is not enabled

 

Configuration:

 

In Configs.cfg file this property can be found under HA Connection Manager Settings. For example:

 

#NagleAlgo=false

 

User can change this value and for taking changes into effect uncomment the value, like-

 

 

NagleAlgo=true

SocketInitializationTimeout

 

Time (in milliseconds) within any client socket should identify itself and able to exchange the version number with server. The version number exchange is an authentication mechanism that FioranoMQ employs.

 

Valid values:

 

Default value is 60000 (which is equal to a minute).

 

Configuration:

 

In Configs.cfg file this property can be found under HA Connection Manager Settings. For example:

 

#SocketInitializationTimeout=60000

 

 

User can change this value and for taking changes into effect uncomment the value, like- SocketInitializationTimeout=65000

ActiveLockReAcquisitionInterval

 

This parameter indicates the wait Interval between each attempt to acquire the lock for active server. This value should be in multiples of pingInterval/2 otherwise server may try to acquire the lock on the next multiple of pingInterval/2. Default value for this parameter is 30000.

 

Configuration:

 

In Configs.cfg file this property can be found under HA Manager Settings. For example:

 

#ActiveLockReAcquisitionInterval=30000

 

User can change this value and for taking changes into effect uncomment the value, like-

 

 

ActiveLockReAcquisitionInterval=35000

PassiveLockReAcquisitionInterval

 

This parameter indicates the wait Interval for the passive server to acquire the lock when the link between active and passive server is down. This value should be greater than '2*ActiveLockReacquisitionInterval', otherwise an exception will be thrown. Server won't start if this value is not set properly. Default value for this parameter is 60000.

 

Configuration:

 

In Configs.cfg file this property can be found under HA Manager Settings. For example:

 

#PassiveLockAcquisitionInterval=60000

 

User can change this value and for taking changes into effect uncomment the value, like-

 

 

PassiveLockAcquisitionInterval=65000

PingInterval

 

This interval represents the duration after which HAServer pings the other HABackup server to find whether the server is running properly or not.

 

Configuration:

 

In Configs.cfg file this property can be found under HA Common Properties. For example:

 

#FMQGroup.PingInterval=30000

 

User can change this value and for taking changes into effect uncomment the value, like-

 

 

FMQGroup.PingInterval=35000

BackupRMIServerPort

 

Port of backup server on which Mx4j RMIConnector server will bind.

 

Configuration:

 

In Configs.cfg file this property can be found under HA KRPC Provider Settings. For example:

 

#BackupRMIServerPort=1858

 

User can change this value and for taking changes into effect uncomment the value, like-

 

 

BackupRMIServerPort=1958

RMIServerPort

 

Port on which Mx4j RMIConnector server will bind.

 

Configuration:

 

In Configs.cfg file this property can be found under RMI Connector Settings. For example:

 

#RMIServerPort=1859

 

User can change this value and for taking changes into effect uncomment the value, like-

 

 

RMIServerPort=1959

MaxWaitTimeout

 

Whenever an owning server realizes that there has been a change in its peer server's state, it must handle the change in its peer state by changing its state appropriately. While the owning server is changing state it starts a timer. If for some reason the state change is unable to complete after a reasonable amount of time then the owning server must realize that.This parameter specifies the maximum waiting timeout in milliseconds for which the local server should wait for state transition to complete.

 

Configuration:

 

In Configs.cfg file this property can be found under HA Manager Settings. For example:

 

#MaxWaitTimeout=30000

 

User can change this value and for taking changes into effect uncomment the value, like-

 

MaxWaitTimeout=35000

 

eStudio

 

 

All the properties listed in this section are described in text based configuration.

Port

 

This property can be found under:

 

 

Fiorano->HA->HAConnectionManager->FioranoHAConnectionManager->config through eStudio.

NagleAlgo

 

This property can be found under:

 

 

Fiorano->HA->HAConnectionManager->FioranoHAConnectionManager->config through eStudio.

SocketInitializationTimeout

This property can be found under:


Fiorano > HA > HAConnectionManager > FioranoHAConnectionManager > config through eStudio.


Figure: Configuring Port, NagleAlgo and SocketInitializationTimeout parameters from eStudio

ActiveLockReAcquisitionInterval

This property can be found under:
Fiorano->HA->HAManager->FioranoHAManager->config through eStudio.

PassiveLockReAcquisitionInterval

This property can be found under:
Fiorano->HA->HAManager->FioranoHAManager->config through eStudio.

PingInterval

This property can be found under:
Fiorano->HA->HAManager->FioranoHAManager->config through eStudio.

MaxWaitTimeout

This property can be found under:
Fiorano->HA->HAManager->FioranoHAManager->config through eStudio.

BackupRMIServerPort

This property can be found under:
Fiorano->HA->HAKRPCProvider->FioranoHAKRPCProvider->config through eStudio.

RMIServerPort

This property can be found under:
Fiorano->jmx->RMIBasedJMXConnector->config through eStudio.

4.2 Shared HA

4.2.1 Basic configurations

One can configure Shared HA profile through changing Configs.cfg file (text based configuration) or through eStudio. Following section describe these options.
Text based
Profiles can now be configured through a text based properties file. Profiles can be found under the %FIORANO_HOME%\fmq\profiles\FioranoMQ_HA_shared directory (say, PROFILE_HOME). In order to configure shared HA profile, edit Configs.cfg file under %PROFILE_HOME%\HAPrimary\conf and %PROFILE_HOME%\HASecondary\conf.

The default entries in Configs.cfg file looks like:

ObjectName=Container

HA Common Properties.
#
#FMQGroup.BackupServerIp=localhost
#FMQGroup.BackupServerPort=1956
#FMQGroup.BackupHAIPAddress=localhost
#FMQGroup.BackupHAPort=3000
#FMQGroup.Port=2000
#FMQGroup.PingInterval=30000
#FMQGroup.GatewayServerIPAddress=localhost
#FMQGroup.GatewayServerPort=7
#FMQGroup.LockFile=null
#FMQGroup.SocketCreationTimeout=10000
In front of every parameter, its default values are given.

Take the scenario of running HAPrimary on a machine with IPAddress: 192.169.1.22 and HASecondary on a machine with IPAddress: 192.169.1.200. GatewayServer address is given as 192.169.1.16 which is present in the network. If LockFile, say Lock.dat, has been shared from third system and mounted to /home/fmq1 on 192.168.1.22 system and to /home/fmq2 on 192.168.1.200 system, then on Primary profile these parameters should takes following value:

ObjectName=Container

HA Common Properties.
#
FMQGroup.BackupServerIp=192.168.1.200
#FMQGroup.BackupServerPort=1956
FMQGroup.BackupHAIPAddress=192.168.1.200
#FMQGroup.BackupHAPort=3000
#FMQGroup.Port=2000
#FMQGroup.PingInterval=30000
FMQGroup.GatewayServerIPAddress=192.168.1.16
#FMQGroup.GatewayServerPort=7
FMQGroup.LockFile=/home/fmq1/Lock.dat
#FMQGroup.SocketCreationTimeout=10000
On Secondary profile these parameters should takes following value:
ObjectName=Container

HA Common Properties
#
FMQGroup.BackupServerIp=192.168.1.22
#FMQGroup.BackupServerPort=1856
FMQGroup.BackupHAIPAddress=192.168.1.22
#FMQGroup.BackupHAPort==2000
#FMQGroup.Port=3000
#FMQGroup.PingInterval=30000
FMQGroup.GatewayServerIPAddress=192.168.1.16
#FMQGroup.GatewayServerPort=7
FMQGroup.LockFile=/home/fmq2/Lock.dat
#FMQGroup.SocketCreationTimeout=10000
Modified Configs.cfg file need to be saved for both Primary and secondary profiles.
eStudio
If shared HA needs to be used, then open FioranoMQ_HA_shared/HAPrimary and FioranoMQ_HA_shared/HASecondary profile in eStudio Profile Manager. Right-click on the profile and click on FMQ Shared HA. The FMQ Shared HA wizard appears.


You can configure all the required values from the wizard. After configuring the wizard, right-click the node and select Save option from the pop-up menu

The following properties are available in the FMQ HA replicated wizard.
BackupHAIPAddress
This IP represents the URL where another FioranoMQ HA server runs. In case this HA server fails then all the required synchronized data is present in backup HA server and HA layer connects to backup HA server.
BackupHAPort
This port represents the backup machine HA port on which another FioranoMQ Server runs.
Port
This port represents the FMQ Server HA port on which this HA Server runs.
BackupRMIServerPort
Port of backup server on which Mx4j RMIConnector server will bind.
RMIServerPort
Port on which Mx4j RMIConnector server will bind.
PingInterval
This interval represents the duration after which HAServer pings the other HABackup server to find whether the server is running properly or not.
LockFile
Full path of the file which will be used for determining the HA states. This file should be present in the third machine and always available to the HA servers with all permissions. The LockFile machine must be same as the machine whose IPAddress is given as GatewayServerIPAddress.
GatewayServerIPAddress
This value represents the IP address of third machine which is always present in the network. This value must not be the machine where one of the FioranoMQ servers runs.
GatewayServerPort
This value represents the port to which any of the HA Servers pings. This port must not be used for some other purpose.
ActiveLockReAcquisitionInterval
This parameter indicates the wait Interval between each attempt to acquire the lock for active server. This value should be in multiples of pingInterval/2 otherwise server may try to acquire the lock on the next multiple of pingInterval/2. Default value for this parameter is 30000.
PassiveLockReAcquisitionInterval
This parameter indicates the wait Interval for the passive server to acquire the lock when the link between active and passive server is down. This value should be greater than '2*ActiveLockReacquisitionInterval', otherwise an exception will be thrown. Server won't start if this value is not set properly. Default value for this parameter is 60000.
All IP addresses, ports should represent the correct values. Without modifying any of these values HAPrimary and HASecondary can run on a single machine.
Take the scenario of running HAPrimary on a machine with IPAddress: 192.169.1.22 and HASecondary on a machine with IPAddress: 192.169.1.200. Gatewayserver address is given as 192.169.1.16 which is present in the network. If LockFile, say Lock.dat, has been shared from third system and mounted to /home/fmq1 on 192.168.1.22 system and to /home/fmq2 on 192.168.1.200 system, then HAPrimary wizard looks like:

And HASecondary wizard looks like:

4.2.2 Advanced configurations

Text based
Edit Configs.cfg file under
%FIORANO_HOME%\fmq\profiles\FioranoMQ_HA_shared\HAPrimary\conf for HAPrimary and
%FIORANO_HOME%\fmq\profiles\FioranoMQ_HA_shared\HASecondary\conf for HASecondary.

 

Port

Specify the Port on which HA Manager would listen for connection from the peer HA Server.Apart from the port that the HA Server uses to listen for connections from its clients, it must also listen for a connection from its HA Peer Server, in order to know the status of its peer.
This parameter is used to specify that port.
Valid values:
Default value is 2000 for Primary and 3000 for secondary profile.
Note: The port must be not in use by any other services.
Configuration:
In Configs.cfg file this property can be found under HA common Properties. For example: #FMQGroup.Port=2000
User can change this value and for taking changes into effect uncomment the value, like- FMQGroup.Port=2500

  1. NagleAlgo

Boolean determining whether Nagle's Algorithm is enabled or not in socket creation with peer HA Server. Nagle's algorithm is used in TCP/IP networks for congestion control. It works by coalescing a number of small outgoing messages, and sending them all at once. Specifically, as long as there is a sent packet for which the sender has received no acknowledgment, the sender should keep buffering its output until it has a full packet's worth of output, so that output can be sent all at once.
Valid values:
Default value is no
• yes - NagleAlgo is enabled
• no - NagleAlgo is not enabled
Configuration:
In Configs.cfg file this property can be found under HA Connection Manager Settings. For example: #NagleAlgo=false
User can change this value and for taking changes into effect uncomment the value, like- NagleAlgo=true

SocketInitializationTimeout

Time (in milliseconds) within any client socket should identify itself and able to exchange the version number with server. The version number exchange is an authentication mechanism that FioranoMQ employs.
Valid values:
Default value is 60000 (which is equal to a minute).
Configuration:
In Configs.cfg file this property can be found under HA Connection Manager Settings. For example: #SocketInitializationTimeout=60000
User can change this value and for taking changes into effect uncomment the value, like- SocketInitializationTimeout=65000

ActiveLockReAcquisitionInterval

This parameter indicates the wait Interval between each attempt to acquire the lock for active server. This value should be in multiples of pingInterval/2 otherwise server may try to acquire the lock on the next multiple of pingInterval/2. Default value for this parameter is 30000.
Configuration:
In Configs.cfg file this property can be found under HA Manager Settings. For example: #ActiveLockReAcquisitionInterval=30000
User can change this value and for taking changes into effect uncomment the value, like- ActiveLockReAcquisitionInterval=35000

PassiveLockReAcquisitionInterval

This parameter indicates the wait Interval for the passive server to acquire the lock when the link between active and passive server is down. This value should be greater than '2*ActiveLockReacquisitionInterval', otherwise an exception will be thrown. Server won't start if this value is not set properly. Default value for this parameter is 60000.
Configuration:
In Configs.cfg file this property can be found under HA Manager Settings. For example: #PassiveLockAcquisitionInterval=60000
User can change this value and for taking changes into effect uncomment the value, like- PassiveLockAcquisitionInterval=65000

PingInterval

This interval represents the duration after which HAServer pings the other HABackup server to find whether the server is running properly or not.
Configuration:
In Configs.cfg file this property can be found under HA Common Properties. For example: #FMQGroup.PingInterval=30000
User can change this value and for taking changes into effect uncomment the value, like- FMQGroup.PingInterval=35000

BackupRMIServerPort

Port of backup server on which Mx4j RMIConnector server will bind.
Configuration:
In Configs.cfg file this property can be found under HA KRPC Provider Settings. For example: #BackupRMIServerPort=1858
User can change this value and for taking changes into effect uncomment the value, like- BackupRMIServerPort=1958

RMIServerPort

Port on which Mx4j RMIConnector server will bind.
Configuration:
In Configs.cfg file this property can be found under RMI Connector Settings. For example: #RMIServerPort=1859
User can change this value and for taking changes into effect uncomment the value, like- RMIServerPort=1959
eStudio
All the properties listed in this section are described in text based configuration.

Port

This property can be found under:
Fiorano->HA->HAConnectionManager->FioranoHAConnectionManager->config through eStudio.

NagleAlgo

This property can be found under:
Fiorano->HA->HAConnectionManager->FioranoHAConnectionManager->config through eStudio.

SocketInitializationTimeout

This property can be found under:
Fiorano->HA->HAConnectionManager->FioranoHAConnectionManager->config through eStudio.


Figure: Configuring Port, NagleAlgo and SocketInitializationTimeout parameters from eStudio

ActiveLockReAcquisitionInterval

This property can be found under:
Fiorano->HA->HAManager->FioranoHAManager->config through eStudio.

PassiveLockReAcquisitionInterval

This property can be found under:
Fiorano->HA->HAManager->FioranoHAManager->config through eStudio.

PingInterval

This property can be found under:
Fiorano->HA->HAManager->FioranoHAManager->config through eStudio.


BackupRMIServerPort

This property can be found under:
Fiorano->HA->HAKRPCProvider->FioranoHAKRPCProvider->config through eStudio.

RMIServerPort

This property can be found under:
Fiorano->jmx->RMIBasedJMXConnector->config through eStudio.

Adaptavist ThemeBuilder EngineAtlassian Confluence