简体   繁体   中英

Tibco EMS Server Fault tolerance with distributed setup not working for java app

I did fault tolerance setup with 2 instances on separate vm ( host1 & host2). If I stop the primary instance the secondary instance is getting activated successfully but the current connections are getting closed with error

reconnect failed: connection unknown for id=5

2018-08-09 14:18:32.907 Connection to active server 'tcp://***:7222' has been lost.
2018-08-09 14:18:32.907 Server activating on failure of 'tcp://****:7222'.
2018-08-09 14:18:32.907 Server rereading configuration.
2018-08-09 14:18:32.938 Recovering state, please wait.
2018-08-09 14:18:32.938 Recovered 1 pending connection.
2018-08-09 14:18:32.938 Server is now active.
2018-08-09 14:18:40.032 [**@***]: reconnect failed: connection unknown for id=156
2018-08-09 14:20:35.485 Purged 1 connection.

When I do the same setup on the same machine with 2 Tibco instances running with port 9222/9224 it's working and application is able to consume messages from secondary when the primary goes down without any issues.

Also, the java application is able to connect with both servers on start-up no issues with connecting to both servers.

I tried with increasing ft_reconnect_timeout then I am not getting any error on Tibco server but the application is not picking messages.

I have updated tibemsd.conf, factories.conf as per TIBCO EMS In Fault-Tolerant Mode

Did I miss anything while setup? Do we have to do any sync for the Tibco files in the background like we do for the database?

As per Tibco EMS 8.4 user guide this is Unshared State Fault Tolerance:
and in this FT Primary and Secondary won't share data, and the server won't handle FT as data not shared so getting above unknown connection error.

The client has to handle it. For which need to use com.tibco.tibems.ufo package(tibjmsufo.jar) for java client to support Unshared State FT. Also, need to mention serverUrl=tcp://server0:7222+tcp://server1:7344 ( separated with + sign)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM