GameDroids
GameDroids

Reputation: 5662

LOG004: Data corrupted. Log exception at point 12

I have never seen this error. I have a GlassFish application server instance with a (before that) perfectly running application. It consists of several web-applications that communicate using JMS. There are scheduled timer tasks running in a singleton bean, which make several REST requests to another server and then send the received JSON through the JMS.

Somewhere at this point this exception occurs and all timers get expunged. The thing is, I never changed anything in the code and the application worked fine until then. The REST-API didn't change and there is no other exception anywhere.

I checked the oracle docs for this error, but they only say:

JTS5022 Unexpected exception [{0}] from log.

Solution: This is an Unexpected Internal Error. Please contact Sun with the complete error log message.

[2016-12-13T10:59:00.235+0000] [glassfish 4.1] [SEVERE] [jts.log_error] [javax.enterprise.system.core.transaction.com.sun.jts.CosTransactions] [tid: _ThreadID=450 _ThreadName=__ejb-thread-pool6] [timeMillis: 1481626740235] [levelValue: 1000] [[ JTS5022: Unexpected exception [{0}] from log. com.sun.jts.CosTransactions.LogException: LOG004: Data corrupted. Log exception at point 12. at com.sun.jts.CosTransactions.LogControl.openFile(LogControl.java:541) at com.sun.jts.CosTransactions.Log.open(Log.java:172) at com.sun.jts.CosTransactions.CoordinatorLog.openLog(CoordinatorLog.java:1161) at com.sun.jts.CosTransactions.CoordinatorLog.formatLogRecords(CoordinatorLog.java:1040) at com.sun.jts.CosTransactions.CoordinatorLog.write(CoordinatorLog.java:534) at com.sun.jts.CosTransactions.TransactionState.setState(TransactionState.java:732) at com.sun.jts.CosTransactions.TopCoordinator.prepare(TopCoordinator.java:2001) at com.sun.jts.CosTransactions.CoordinatorTerm.commit(CoordinatorTerm.java:328) at com.sun.jts.CosTransactions.TerminatorImpl.commit(TerminatorImpl.java:231) at com.sun.jts.CosTransactions.CurrentImpl.commit(CurrentImpl.java:622) at com.sun.jts.jta.TransactionManagerImpl.commit(TransactionManagerImpl.java:331) at com.sun.enterprise.transaction.jts.JavaEETransactionManagerJTSDelegate.commitDistributedTransaction(JavaEETransactionManagerJTSDelegate.java:174) at com.sun.enterprise.transaction.JavaEETransactionManagerSimplified.commit(JavaEETransactionManagerSimplified.java:859) at com.sun.ejb.containers.EJBContainerTransactionManager.completeNewTx(EJBContainerTransactionManager.java:719) at com.sun.ejb.containers.EJBContainerTransactionManager.postInvokeTx(EJBContainerTransactionManager.java:503) at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:4566) at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:2074) at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:2044) at com.sun.ejb.containers.BaseContainer.callEJBTimeout(BaseContainer.java:4080) at com.sun.ejb.containers.EJBTimerService.deliverTimeout(EJBTimerService.java:1199) at com.sun.ejb.containers.EJBTimerService.access$000(EJBTimerService.java:89) at com.sun.ejb.containers.EJBTimerService$TaskExpiredWork.run(EJBTimerService.java:1919) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) ]]

What I understand is that there is some log file corrupted or anything. But I didn't even touch them and it doesn't even say which one.

I greatly appreciate any advise.

Upvotes: 1

Views: 1361

Answers (1)

GameDroids
GameDroids

Reputation: 5662

*My workaround**

This is not really a solution but a workaround, because it doesn't fix the problem.

Turns out GlassFish holds separate log files for JMS(and probably other) transactions. They are in the same folder as the standard log files. In my case:

<path to domain>/logs/server/tx

My guess is that some file there got corrupted. Now I couldn't fix it but it is possible to turn off logging for transactions in GlassFish.

In the GlassFish admin console

In the GlassFish admin console, go to

configurations > server-config > Transaction Service 

and add the property:

Name:                                    Value:
disable-distributed-transaction-logging  true

Apparently this settings is mostly used to tune the performance but in my case the corrupted log file wasn't an issue anymore and the application continues to run (maybe even faster ;)

Upvotes: 1

Related Questions