Site icon techieswiki

How to enable automatic re-connection to EMS after a network outage or EMS restart?

Sometimes back we faced this issue in our domain, after some network outage or after EMS restart the integration’s (BW and Adapter) was not able to get connect to the EMS server until we restart the service. If we have only a few integrations, its okay to restart it manually. But in our case, we have lot many integrations which are connecting to EMS. Due to this, we had a tough time to restart these integrations manually.

We have worked with TIBCO Support on it and fixed the issue by adding some property in the application. Below is the property which we need to add to the application TRA.

Properties to add in application TRA or in BWEngine TRA.

java.property.bw.plugin.jms.recoverOnStartupError=true
java.property.com.tibco.tibjms.connect.attempts=20,15000
java.property.com.tibco.tibjms.reconnect.attempts=200,15000

java.property.bw.plugin.jms.recoverOnStartupError

When a process engine attempts to startup and the EMS server is not up, then the JMS process starters cannot connect to the EMS server. Setting this property to true allows the process engine to start and the JMS process starters will wait until the EMS server is up before starting.

java.property.com.tibco.tibjms.connect.attempts

The number of successive attempts for establishing the initial connection and delay between the attempts in milliseconds. here it is 20 attempts within a span of 15000 milliseconds.

tibco.tibjms.reconnect.attempts 

The number of successive attempts for restoring the connection after having established the initial connection and delay between the attempts in milliseconds.

Like other properties, we can add this directly to the application TRA under /tra/domain/[domain name]/application/[application-name]/and restart the service to take effect. But when we follow this method, this properties will get lost when we redeploy the application. So it is recommended to add this in./bw/version/bwengine.tra By doing this all the future deployment will have these properties by default in application TRA file.

Properties to add in EMS server

client_heartbeat_server=5
server_timeout_client_connection=17
server_heartbeat_client=5
client_timeout_server_connection=17

We need to add these properties to tibemsd.conf file and need to restart the EMS instance to take effect.

Note: TIBCO released two hot-fix for BW 5.13 and EMS 8.4 version to address this reconnect issues.

BW 5.13 – Hotfix Version 12
EMS 8.2 – Hotfix version 2

Hope this will be useful for someone having this issue. Let me know your feedback in the comments.

Exit mobile version