Unable to enlist resource ... status: ActionStatus.ABORT_ONLY in EAP
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 7
- 6
- 5
Issue
- I am unable to get a new database connection even though there are connections available in the xa-pool.
- When trying to get a new connection, we are seeing the following in the server.log
EAP 7/6
... javax.resource.ResourceException: IJ000461: Could not enlist in transaction on entering meta-aware object
... javax.transaction.SystemException: IJ000356: Failed to enlist: java.lang.Throwable: Unabled to enlist resource, see the previous warnings. tx=TransactionImple < ac, BasicAction: 0:ffffc0a8bf48:-64b3808e:5262edbc:1fb59 status: ActionStatus.ABORT_ONLY >
EAP 5
... org.jboss.resource.JBossResourceException: Could not enlist in transaction on entering meta-aware object!...
... javax.transaction.SystemException: java.lang.Throwable: Unabled to enlist resource, see the previous warnings. tx=TransactionImple < ac, BasicAction: 390e940:bdba:542df230:1adb87d status: ActionStatus.ABORT_ONLY >
Resolution
- Before accessing connections, application logic may need to check the transaction status (using
isRollbackOnly()) - Transaction timeouts may need to be addressed by resolving performance issues or increasing the transaction timeout (EAP 7/6 | EAP 5)
- Failures leading to implicit transaction rollback may need to be corrected
- See also IJ000460: Error checking for a transaction : Transactions are not active
Root Cause
The error means that the transaction in which the connection request is issued has already aborted (the transaction status is ABORT_ONLY).
The root cause will be an event that occurred previously such as one of the following, for example:
- An explicit rollback of the transaction by user application code
- Timeout of the transaction by the transaction reaper due to issues such as:
- The transaction may have run longer than expected due to poorly performing or blocking operations
- The transaction timeout period may be set too low
- See also EAP 7/6 timeout warnings
- Automatic/implicit rollback resulting from a previous exception:
- Failure while starting a transaction on a specific resource (e.g. due to a stale database connection)
- An unhandled application exception raised during transactional EJB calls in some circumstances
- Illegal attempt to enlist multiple non-XA resources as participants in a single transaction
Diagnostic Steps
- Search the server.log for any exceptions raised in the context of the failing thread or transaction prior to the
Unable to enlistfailure - Enable transaction logging (EAP 7/6 | EAP 5) to identify transaction start time and see whether they have been reaped
- Search the server.log for the transaction ID which may be found in the
Unable to enlistmessage - e.g. 0:ffffc0a8bf48:-64b3808e:5262edbc:1fb59)
- Search the server.log for the transaction ID which may be found in the
Components
Category
Tags
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.