WSO2 Carbon
  1. WSO2 Carbon
  2. CARBON-10378

"com.atomikos.icatch.SysException: Error in init(): Log already in use?" when starting RW cluster node

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: High High
    • Resolution: Not a bug
    • Affects Version/s: 3.2.0
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      ubuntu 9.04, jdk1.6
    • Severity:
      Critical
    • Estimated Complexity:
      Moderate

      Description

      I got the following error while starting AS READ-WRITE node in a cluster.

      Setup Details:
      ===========
      2 node AS cluster. 1 RW and 1 RO
      Connected to config and gov registry instances
      Shared LDAP server
      Replicated caching is enabled

      I started governace and config registry nodes without any issue. Then I started AS read-write node while config registry is started up and got the following error.

      ERROR: the specified log seems to be in use already. Make sure that no other instance is running, or kill any pending process if needed.
      java.lang.RuntimeException: Log already in use?
      at com.atomikos.icatch.standalone.UserTransactionServiceImp.createDefault(UserTransactionServiceImp.java:246)
      at com.atomikos.icatch.standalone.UserTransactionServiceImp.init(UserTransactionServiceImp.java:306)
      at com.atomikos.icatch.config.UserTransactionServiceImp.init(UserTransactionServiceImp.java:413)
      at com.atomikos.icatch.jta.UserTransactionManager.checkSetup(UserTransactionManager.java:90)
      at com.atomikos.icatch.jta.UserTransactionManager.init(UserTransactionManager.java:140)
      at org.wso2.carbon.atomikos.TransactionFactory.initTxManager(TransactionFactory.java:37)
      at org.wso2.carbon.atomikos.AtomikosLifecycleListener.lifecycleEvent(AtomikosLifecycleListener.java:15)
      at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
      at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:89)
      at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:379)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:142)
      at org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
      at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:727)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
      at org.apache.catalina.startup.Tomcat.start(Tomcat.java:305)
      at org.wso2.carbon.tomcat.BetterTomcat.start(BetterTomcat.java:68)
      at org.wso2.carbon.server.TomcatServer.start(TomcatServer.java:109)
      at org.wso2.carbon.server.Main.startServer(Main.java:64)
      at org.wso2.carbon.server.Main.start(Main.java:156)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.wso2.carbon.bootstrap.Bootstrap.loadClass(Bootstrap.java:62)
      at org.wso2.carbon.bootstrap.Bootstrap.main(Bootstrap.java:43)
      java.lang.reflect.InvocationTargetException
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.wso2.carbon.bootstrap.Bootstrap.loadClass(Bootstrap.java:62)
      at org.wso2.carbon.bootstrap.Bootstrap.main(Bootstrap.java:43)
      Caused by: java.lang.RuntimeException: com.atomikos.icatch.SysException: Error in init(): Log already in use?
      at org.wso2.carbon.server.Main.startServer(Main.java:66)
      at org.wso2.carbon.server.Main.start(Main.java:156)
      ... 6 more
      Caused by: com.atomikos.icatch.SysException: Error in init(): Log already in use?
      at com.atomikos.icatch.standalone.UserTransactionServiceImp.init(UserTransactionServiceImp.java:374)
      at com.atomikos.icatch.config.UserTransactionServiceImp.init(UserTransactionServiceImp.java:413)
      at com.atomikos.icatch.jta.UserTransactionManager.checkSetup(UserTransactionManager.java:90)
      at com.atomikos.icatch.jta.UserTransactionManager.init(UserTransactionManager.java:140)
      at org.wso2.carbon.atomikos.TransactionFactory.initTxManager(TransactionFactory.java:37)
      at org.wso2.carbon.atomikos.AtomikosLifecycleListener.lifecycleEvent(AtomikosLifecycleListener.java:15)
      at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
      at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:89)
      at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:379)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:142)
      at org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
      at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:727)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
      at org.apache.catalina.startup.Tomcat.start(Tomcat.java:305)
      at org.wso2.carbon.tomcat.BetterTomcat.start(BetterTomcat.java:68)
      at org.wso2.carbon.server.TomcatServer.start(TomcatServer.java:109)
      at org.wso2.carbon.server.Main.startServer(Main.java:64)
      ... 7 more
      Caused by: java.lang.RuntimeException: Log already in use?
      at com.atomikos.icatch.standalone.UserTransactionServiceImp.createDefault(UserTransactionServiceImp.java:246)
      at com.atomikos.icatch.standalone.UserTransactionServiceImp.init(UserTransactionServiceImp.java:306)
      ... 24 more

        Activity

        Hide
        Anjana Fernando
        added a comment -
        Hi Charitha,

        Are these instances running in a single machine? .. like, are those running in an app server, where it is pointed to a single CARBON_HOME? .. if so, the "transaction.properties" file have to be removed from /repository/lib and should be put into each WARs classpath location. And each "transaction.properties" file has to be edited to change the log file location. This error comes when more that one instance is trying to access the same transaction log file of Atomikos, or there's also a chance that the earlier JVM shutdown was not done properly and the lock file wasn't released. In that case, you simply have to remove the log file at /repository/data/tmlog.lck file and restart the server.

        Cheers,
        Anjana.
        Show
        Anjana Fernando
        added a comment - Hi Charitha, Are these instances running in a single machine? .. like, are those running in an app server, where it is pointed to a single CARBON_HOME? .. if so, the "transaction.properties" file have to be removed from /repository/lib and should be put into each WARs classpath location. And each "transaction.properties" file has to be edited to change the log file location. This error comes when more that one instance is trying to access the same transaction log file of Atomikos, or there's also a chance that the earlier JVM shutdown was not done properly and the lock file wasn't released. In that case, you simply have to remove the log file at /repository/data/tmlog.lck file and restart the server. Cheers, Anjana.
        Hide
        Anjana Fernando
        added a comment -
        Hi Charitha,

        Please re-open this, if the suggested solution doesn't work.

        Cheers,
        Anjana.
        Show
        Anjana Fernando
        added a comment - Hi Charitha, Please re-open this, if the suggested solution doesn't work. Cheers, Anjana.

          People

          • Assignee:
            Anjana Fernando
            Reporter:
            Charitha Kankanamge
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: