Atomikos Forum

Issues with Atomikos txn when application on Active/Active env

Hi Atomikos Team,

I have an issue with the transaction handling.

Our application is deployed on a cloud based tomcat server farm.

If there are multiple instances then the deployment environment does not guarantee the instances are on different hosts. The placement of applications across different hosts can only be on a best effort basis. (This is not in our control actually, we pass the number of instances required as a configuration during the deployment and the deployment platform takes care of the host allocation)

Transaction works fine if there is only single instance and I think it works fine if there are multiple instances on different host (which currently happens very rarely as most of the time it’s placed on the same host.)

But when deployed on multiple instances, Application is not able to start in one instance due to below mentioned errors

1. ‘Log already in use’ in the Catalina /localhost.log file and then it shuts down.

this was my jta config

com.atomikos.icatch.output_dir = ./tmlogs

com.atomikos.icatch.log_base_dir = ./tmlogs

# com.atomikos.icatch.tm_unique_name = tm

On further investigation and talks with the deployment team realised that the two instance's work directory is shared and the only non shared directory which is avaliable for us  is jvm s temp directory.

So I have pointed the epoch and lck file directory to

com.atomikos.icatch.output_dir = ${}

com.atomikos.icatch.log_base_dir = ${}

# com.atomikos.icatch.tm_unique_name = tm

2.  Now the error ‘Log already in use’ disappeared and application is started, but getting a WARN message that it fails to connect to MQ for the below reason
‘the supplied XID already exists in this XA resource at com.atomikos.datasource.xa.XAResourceTransaction.resume(Unknown Source)’

Though there are warnings, messages seems to be consumed, but if there are resource failures, seeing inconsistencies in transactions

I think the files in ${} will be purged and recreated on restart. In Atomikos website, it says 'never delete epoch file'.

This is actually worrying, We can start the application in two instances only if the work directory is not shared between instances and if I use a non-shared directory the epoch and lck files will be purged (as only non shared dir available to us is jvm temp directory) and transaction ids are corrupted.

At the moment, our application is in production with one instance and the above issues stop us achieving target for HA.

Could you please help on this?

Also could you let me know creating transaction unique name / instance start-up can help on this? I remember seeing in Atomikos website, changing the unique name ‘not recommended for production use'.

Thanks in advance.
jinz kunh Send private email
Tuesday, September 10, 2013

The epoch file should not be deleted or you will get this. With the open source product there is no easy solution besides a shared folder.

What version of Atomikos are you using, and do you have a budget for a subscription? If so, we could give you a solution that avoid the .epoch file writing altogether.

Let me know,

Guy Pardon Send private email
Saturday, September 21, 2013
Hi Guy,

Thanks for replying back.

We are using atomikos version 3.8

I am not clear about your question on budget for subscription? Does that mean budget for developer/ consultancy support? Could you please confirm.

Jinjusha Kunhiraman Send private email
Monday, September 23, 2013

No, I mean a subscription with right to use for the fixes we deliver to customers.

Guy Pardon Send private email
Thursday, October 10, 2013

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics