DTM can not establish a connection to Oracle XA-Service

Last update: 4 August 2017

DTM can not establish a connection to Oracle XA-Service

Summary

The error message "XA_PREPARE failed" with errorcode xaerr= '-3' indicates that the Dirstributed Transaction manager (DTM) could not connect to the Oracle XA-Service.

Whenever this happens the DTM subsequently tries to rollback the transaction. This rollback therefore can not be accomplished because the Oracle Database already rollbacked but without the DTM knowing. From now on the DTM still tries to rollback continuously until a timout is reached.

Information

To resolve this issue, a start of the COO-Services in the "Recovery Mode" must be done. The "Recovery Mode" implicitly purges the DTM logs. ( http://help.fabasoftfolio.com/doc/Fabasoft-Folio-Distributed-Transaction-Manager/recovery-mode.htm )

Additionally pending transactions must be deleted in the Oracle Database.

Solution

Warning: Please consider that the solution provided below requires a complete domain restart!

Clearing all domain transactions

After ensuring that the settings described above are correctly configured

  1. Stop all COO-services of the affected domain.
    Note: Before stopping the COO-services ensure that all kernel instances have been stopped.
  2. Start all COO-services into recovery mode in order to clear all DTM-logs .
  3. Once again stop all COO-services
  4. Check if there are any pending transactions left on the Oracle database.
select * from sys.dba_pending_transactions
select * from dba_2pc_pending
  1. If there are any transactions left, execute a rollback according to http://docs.oracle.com/cd/B28359_01/server.111/b28310/ds_txnman005.htm#A...
  2. Restart all stopped COO-services in normal mode
  3. Restart the stopped kernel instances and thoroughly test the domain

Applies to

  • Fabasoft Folio (all versions)
  • Fabasoft eGov-suite (all versions)

while using an Oracle database