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

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:


type                  = topic
url                   = tcp://localhost:7222,tcp://localhost:7224

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 Integration Consultant By Profession with 12+ years experience in Integration domain mainly with TIBCO products. He has extensive practical knowledge of TIBCO Business Works, TIBCO Cloud, TIBCO Flogo, TIBCO Mashery, TIBCO Spotfire, EMS and TIBCO ActiveSpaces. He has worked on a number of highly critical integration projects in various sectors by using his skills in TIBCO Flogo, TIBCO API Management (Mashery), TCI, Tibco Designer, TIBCO Business Studio, Adapters, TIBCO EMS, RV, Administrator, TIBCO BE, TIBCO ActiveSpaces etc. Ajmal Abbasi has experience with MuleSoft ESB as well. Ajmal Abbasi is also experienced in the area of API Management particularly with WSO2 API management platforms. Ajmal Abbasi is also experienced in developing solutions using Core Java and J2EE Technologies. You can contact Ajmal Abbasi for Consultancy, Technical Assistance and Technical Discussions.

More Posts - Website - Facebook - LinkedIn - YouTube

30 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.

  2. keerthi

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

  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.


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

  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?

  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

    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.

  7. Krishnarao

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

  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.

  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..


    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

  10. kishor ugale

    Hi Abbasi,

    Thanks for making correction in document and clearing my concept.

    Kishor Ugale

  11. Swapnil

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


  12. Md Raish Ahmed

    I think, Provider URL should be,
    Md Raish.

  13. Suphil

    Hi Ajmal,

    Could you tell if this is a Master-Slave config or a peer to peer setup.
    Also where do we configure this.

    Suphil Philip

  14. anu

    Hi Ajmal,
    Secondary server is getting activated (it is showing “server activating on failure of ‘tcp://7222’ )when i am shutting down the primary server but on trying to execute the process i am receiving connection failed error . Why secondary server is not taking the control ?

    1. Tilak

      Use tcp://localhost:7224,tcp://localhost:7222 instead of one connection.

  15. Gayathri

    Hi Ajmal,
    Can explain how to set up FT configuration for ssl configured ems servers?
    I tried the above mentioned steps but for ssl servers it did not work.

    Thanks in Advance,

  16. Anupreethi

    Hi Ajmal..Can you please help with my Query?

    What happens if secondary Machine also crashes?

    1. Ajmal Abbasi Post author

      That’s a disaster case. If you have only one pair of machines in FT Mode and the complete pair fails, you will have disaster.

  17. Sakshi

    Hello Ajmal
    When I try to run tibemsd.exe on the secondary conf file, it is unable to find the primary active connection even though it is already running. Th console also shows below error
    ERROR: Unable to open store file ‘D:/TIBCOHOME_5.10/ems/datastore\async-msgs.db’, file may be locked.
    Can you suggest what is the issue?

  18. Sam

    Hello sir,
    I also worked with TIBCO hawk project n tibbr project have sound knowledge on ems rv active space . This is useful information

  19. Harish Anavatti

    Can we use single port to both ems server instead of we are using two port like 7222 and 7224. If yes can you explain how .

    1. Ajmal Abbasi Post author

      In one system, you can’t use one port for two services. However, if you use two different machines; you can use same port on both.

  20. Eddy Perez

    Hi Amjal,
    I have EMS configured for FT, but hrb is connecting to secondary server instead primary EMS. I have checked rulebases but can not resolve it. thanks in advance.


Leave a Reply

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