Step By Step How to Setup TIBCO EMS In Fault Tolerant Mode

By | August 10, 2014

In order to prevent application failure and to keep the systems running smoothly, systems are often configured and setup in a fault tolerant mode with a primary and secondary node so that if application on the primary server fails, secondary server immediately takes over the control to keep everything running transparently.

TIBCO EMS Servers are also configured in FT mode (Fault Tolerant Mode) so that secondary server may take over the control once primary server is down. In this step by step tutorial, I will teach you how you can configure TIBCO EMS Servers in Fault Tolerant mode.

In real scenarios, FT configurations are done with EMS Servers running in separate machines but in this example case, I will setup two EMS Servers on the same machine and will configure them to run in FT mode.

Step 1: Configure EMS Daemons in FT mode

In order to achieve EMS Fault Tolerance, our first task is to do the necessary configuration changes in the file tibemsd.conf

This configuration file is used by the EMS Daemon. In order to run two daemons, we need to have one separate tibemsd.conf file for both. We create two copies of this configuration file and name them as tibemsd.conf and tibemsd-1.conf respectively.

We need to have separate ports for the two EMS Server daemons. For the first, let’s use 7222 port and for the second one, we use 7224 port.

In the first configuration file (tibemsd.conf), make following changes:

  • Listen port should be set as tcp://7222
  • In Fault Tolerant setup section, for ft_active, specify the port of other/secondary EMS Server i.e. specify tcp://7224

For the second configuration file (tibemsd-1.conf), do the following configuration changes:

  • Set Listen Port as tcp://7224
  • In Fault Tolerant section, for ft_active, specify tcp://7222 (ie.e. Listen port of the primary EM Server)

 

Step 2: Configure Fault Tolerant Factory

Second step in configuring EM Servers in FT mode is to make changes in the file factories.conf .

Configure factories for both queues and topics with the below changes in the configuration file:

 

[FTTopicConnectionFactory]
type                  = topic
url                   = tcp://localhost:7222,tcp://localhost:7224

[FTQueueConnectionFactory]
type                  = queue
url                   = tcp://localhost:7222,tcp://localhost:7224

 

Step 3: Run Primary and Secondary EMS Server

Once we are done with the configuration of our FT Pair of EMS Servers, we need to start the two servers.

Run the primary EMS Server by following command:

tibemsd.exe -config C:\tibco\EMSConfig\tibco\cfgmgmt\ems\data\tibemsd.conf

 

As seen in below screenshot, server has started successfully:

tibco ems ft primary server start

 

Now run the following command to start the secondary server:

tibemsd.exe -config C:\tibco\EMSConfig\tibco\cfgmgmt\ems\data\tibemsd-1.conf

As you can see below, secondary EMS Server has started and is in standby mode for the primary server:

tibco ems ft standby secondary server start

 

Step 4: Test TIBCO EMS Servers working in FT mode

In this step, we will create a TIBCO Process and will send the request to a queue on the primary server when the server is up. In that case the request will be successfully received by the queue on primary server. In second time, we will stop primary server and send the request to same server again. Now, secondary server will pick the request and request will not fail.

The EMS Connection configuration is shown in the diagram below. This connection is to the primary server:

tibco ems connection to primary server

 

As you can see in the diagram below, when I ran a test process to send the request to the primary server using the above connection, process has run successfully:

ems queue sender to primary server test

 

Now, stop the primary server by using shutdown command.
Now if we run the same process again in order to send the request to a queue on primary server, request will be processed successfully by the secondary EM Server which was in standby mode.

 

Ajmal Abbasi

Ajmal Hussain Abbasi is a TIBCO Consultant By Profession with more than 6 years experience in TIBCO products. He has extensive practical knowledge of TIBCO Business Works, TIBCO Spotfire, TIBCO BE, EMS and TIBCO ActiveSpaces. He has worked on a number of highly critical integration projects in Telecom sector by using his skills in Tibco Designer, Adapters, TIBCO EMS, RV, Administrator, TIBCO BE, TIBCO ActiveSpaces etc. Ajmal Abbasi is also experienced in developing solutions using Oracle PL/Sql, Linux and Java. You can contact Ajmal Abbasi for Consultancy, Technical Assistance and Technical Discussions.

More Posts - Website - Facebook - LinkedIn

15 thoughts on “Step By Step How to Setup TIBCO EMS In Fault Tolerant Mode

  1. L. Prabhakar

    I am very interesting in Tibco.
    I am requesting to you sir please send me tibco materials, videos, Interview questions, Realtime scenarios do you have any please send me sir.

    Reply
  2. keerthi

    your explanation is so nice .i need clear idea of ftp, tcp palette of tibco bw with all activites of FTP,TCP…..

    Reply
  3. Pramod bura

    Hi Ajmal
    In the advanced tab of jms connection pallete, I think one has to specify queue connection factory as “FTqueueconnectionFactory” tring that is specified in factories.config file. Pls let me know if my understanding is correct.

    Reply
  4. Y VENKATA VARA PRASAD

    Sir, Kindly Requesting you that Please send me the Ems Material….

    Reply
  5. Rahul

    My primary server runs just fine but when I run the secondary server, it doesnt goes in standby mode. It rather becomes active. Can you explain why?

    Reply
  6. SAM

    what is use of routing in EMS ft,as we know routing is to connected in 2 different servers, but in EMS Ft am not clear,can you please tell us what is the of routing in EMS FT

    Reply
    1. Ajmal Abbasi Post author

      EMS FT is used to achieve Fault Tolerance so that if your primary EMS Server goes down; secondary EMS Server takes control and your applications continue seamlessly without any outages.

      Reply
  7. Krishnarao

    Hi Ajmal,
    only one connection is enough (primay connection) in this case

    Reply
  8. Anand

    Thanks nice explanation. If I have two UNIX box located in two different datacenter.

    1.Could you please share step configure database store.

    2. What should we do if like to use file based ft mode. Do we need dedicated shared state hardware or it is possible to achieve some other way.

    Reply
  9. kishor ugale

    in Tibco EMS FT , what is use of routing, because routing we used to communicate accros the two different server, but why we need to enable the routing while doing FT configuration in tibco ems ?, can anyone tell..Thanks in advance..

    Regards
    Kishor

    Reply
    1. Ajmal Abbasi Post author

      Dear Kishor,

      For EMS FT setup; routing is not required. The routing steps were mentioned in the tutorial mistakenly which have been removed now. Thanks

      Reply
  10. kishor ugale

    Hi Abbasi,

    Thanks for making correction in document and clearing my concept.

    Regards
    Kishor Ugale

    Reply
  11. Swapnil

    Hi Team,
    I think, Provider URL should be,
    “tcp://localhost:7224,tcp://localhost:7222”
    Or it should be “tibjmsnaming://localhost:7224,tibjmsnaming://localhost:7222” if using JNDI Connection factory.

    Thanx,
    -Swapnil

    Reply
  12. Md Raish Ahmed

    I think, Provider URL should be,
    “tcp://localhost:7224,tcp://localhost:7222”
    Regards,
    Md Raish.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *