XA Troubleshooting

Reading Error Messages in console.log

On an XA call failure a message is displayed in the log containing :

  • the target resource manager
  • the failing XA call
  • the return code from the call
  • the XID, a transaction identifier
For example, the log entry
111012 14063540   1924 XATEST   CASXO0004S Resource Manager for resource DB7R Transaction end failed: reason -00007, XID: MF_CASDEMOXATEST  000012000000000000000001000001  14:06:35                                                                                                            
The XA End call for resources DB7R failed with return code -00007
includes the following information:
  • CASXO0004S is the error code
  • DB7R is the resource manager
  • Transaction end is the stage of the transaction where the failure occurred
  • -00007 is a code indicating the resource manager is unavailable
  • MF_CASDEMOXATEST 000026000000000000000001000001 is the XID

Refer to the specific database documentation for recommendations on the action to take when transactions might have failed.

Reading CAS Traces

If you have enabled resource manager interface or exit traces, or if an XA call fails (in which case traces are unconditionally written) you can trace XA calls. For example:

Example 1
This trace shows a successful start call for a resource called NJFXA1.
Succesful START call
uExit(NJFXA1..) 288 61 11100 40 e90181 9171356 <NJFX A1..> 4e4a4658 41310000 SEP dfheserv(dfhcpuex)
XA(start) 290 61 11100 6d 6d0183 9171356 <XA-- STRT> 58412d2d 53545254 SEP dfhexa()
XA-ID(NJFXA1..) 291 61 11100 6d 6d0282 9171356 <NJFX A1..> 4e4a4658 41310000 SEP dfhexa()
XA-StartT( 61 )Br( 1 ) 292 61 11100 6d 6da081 9171356 <...= ....> 0000003d 00000001 SEP dfhexa() 
XA-Start( 0 ) 293 61 11100 6d 6d1182 9171356 <XSTR ....> 58535452 00000000 SEP dfhexa() 
XA-Return( 0 ) 294 61 11100 6d 6d0384 9171356 <XARC ....> 58415243 00000000 SEP dfhexa()
Example 2
This trace shows a failing start call for NJFXA1, which returns code 4 "Found the previous Start call for this Failing Commit call". The trace includes the XA transaction ID and the resource manager ID.
uExit(NJFXA1..) 120 57 11100 40 e90181 9165273 <NJFX A1..> 4e4a4658 41310000 SEP dfheserv(dfhcpuex)
XA(T-Sync) 122 57 11100 6d 6d0183 9165273 <XA-T SYNC> 58412d54 53594e43 SEP dfhexa()
XA-ID(NJFXA1..) 123 57 11100 6d 6d0282 9165273 <NJFX A1..> 4e4a4658 41310000 SEP dfhexa()
XA-CommitRC( 4 ) 124 57 11100 6d 6d5082 9165273 <XCOM ....> 58434f4d 00000004 SEP dfhexa()
XA-CommitRC( 4 ) 125 57 11100 6d 6d52f9 9165273 <COMM ....> 434f4d4d 00000004 SEP dfhexa()
XA-Return( 1 ) 130 57 11100 6d 6d0384 9165313 <XARC ....> 58415243 00000001 SEP dfhexa()
XA-StartT( 61 )Br( 1 ) 292 61 11100 6d 6da081 9171356 <...= ....> 0000003d 00000001 SEP dfhexa()

The XID for the failing transaction is MF_CASDEMOCICS-FS 00006 0000000000000000001000001.