3 Replies Latest reply on Apr 18, 2006 7:55 AM by Manik Surtani

    Problems deploying JBoss Cache 1.3 with Weblogic 8.1 (Cluste

    Evon Lai Newbie

      Hi,

      I have deploying the cache with weblogic 8.1 cluster servers (2 servers). But each time when the treecache.put(...) is invoked, i will get the following exception.

      weblogic.transaction.RollbackException: Transaction timed out after 31 seconds
      Xid=BEA1-001A8C9FA9BEE7FAEAC1(31861891),Status=Active (PrePreparing),numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds since begin=31,seconds left=30,activeThread=Thread[ExecuteThread: '12' for queue: 'weblogic.kernel.Default',5,Thread Group for Queue: 'weblogic.kernel.Default'],SCInfo[pfm-cluster+pfm_1]=(state=pre-preparing),OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=pfm_1+172.22.151.61:10011+pfm-cluster+t3+, XAResources={},NonXAResources={})],CoordinatorURL=pfm_1+172.22.151.61:10011+pfm-cluster+t3+) - with nested exception:
      [weblogic.transaction.internal.TimedOutException: Transaction timed out after 31 seconds
      Xid=BEA1-001A8C9FA9BEE7FAEAC1(31861891),Status=Active (PrePreparing),numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds since begin=31,seconds left=30,activeThread=Thread[ExecuteThread: '12' for queue: 'weblogic.kernel.Default',5,Thread Group for Queue: 'weblogic.kernel.Default'],SCInfo[pfm-cluster+pfm_1]=(state=pre-preparing),OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=pfm_1+172.22.151.61:10011+pfm-cluster+t3+, XAResources={},NonXAResources={})],CoordinatorURL=pfm_1+172.22.151.61:10011+pfm-cluster+t3+)]]
      com.crimsonlogic.performa.util.cache.CacheException: weblogic.transaction.RollbackException: Transaction timed out after 31 seconds
      Xid=BEA1-001A8C9FA9BEE7FAEAC1(31861891),Status=Active (PrePreparing),numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds since begin=31,seconds left=30,activeThread=Thread[ExecuteThread: '12' for queue: 'weblogic.kernel.Default',5,Thread Group for Queue: 'weblogic.kernel.Default'],SCInfo[pfm-cluster+pfm_1]=(state=pre-preparing),OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=pfm_1+172.22.151.61:10011+pfm-cluster+t3+, XAResources={},NonXAResources={})],CoordinatorURL=pfm_1+172.22.151.61:10011+pfm-cluster+t3+) - with nested exception:
      [weblogic.transaction.internal.TimedOutException: Transaction timed out after 31 seconds
      Xid=BEA1-001A8C9FA9BEE7FAEAC1(31861891),Status=Active (PrePreparing),numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds since begin=31,seconds left=30,activeThread=Thread[ExecuteThread: '12' for queue: 'weblogic.kernel.Default',5,Thread Group for Queue: 'weblogic.kernel.Default'],SCInfo[pfm-cluster+pfm_1]=(state=pre-preparing),OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=pfm_1+172.22.151.61:10011+pfm-cluster+t3+, XAResources={},NonXAResources={})],CoordinatorURL=pfm_1+172.22.151.61:10011+pfm-cluster+t3+)]
       at com.crimsonlogic.performa.core.modules.studio.adapter.util.CacheManager.updateCacheResource(CacheManager.java:101)
       at com.crimsonlogic.performa.core.server.impl.adapter.AdapterBinder.invokeAdapter(AdapterBinder.java:49)
       at com.crimsonlogic.performa.core.server.impl.centralprocessor.CentralProcessor.processRequestDirect(CentralProcessor.java:119)
       at com.crimsonlogic.performa.core.server.impl.communication.web.WebRPCHandler.processRPCRequest(WebRPCHandler.java:51)
       at com.crimsonlogic.performa.core.server.impl.communication.web.WebRPCHandler.processNormalRequest(WebRPCHandler.java:171)
       at com.crimsonlogic.performa.core.server.impl.communication.web.WebRPCHandler.execute(WebRPCHandler.java:61)
       at org.apache.xmlrpc.XmlRpcWorker.invokeHandler(XmlRpcWorker.java:123)
       at org.apache.xmlrpc.XmlRpcWorker.execute(XmlRpcWorker.java:185)
       at org.apache.xmlrpc.XmlRpcServer.execute(XmlRpcServer.java:151)
       at org.apache.xmlrpc.XmlRpcServer.execute(XmlRpcServer.java:128)
       at com.crimsonlogic.performa.core.server.impl.centralprocessor.web.servlet.MainServlet.doPost(MainServlet.java:55)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
       at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:971)
       at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:402)
       at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:305)
       at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6350)
       at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
       at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
       at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3635)
       at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2585)
       at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
       at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
      Caused by: weblogic.transaction.RollbackException: Transaction timed out after 31 seconds
      Xid=BEA1-001A8C9FA9BEE7FAEAC1(31861891),Status=Active (PrePreparing),numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds since begin=31,seconds left=30,activeThread=Thread[ExecuteThread: '12' for queue: 'weblogic.kernel.Default',5,Thread Group for Queue: 'weblogic.kernel.Default'],SCInfo[pfm-cluster+pfm_1]=(state=pre-preparing),OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=pfm_1+172.22.151.61:10011+pfm-cluster+t3+, XAResources={},NonXAResources={})],CoordinatorURL=pfm_1+172.22.151.61:10011+pfm-cluster+t3+) - with nested exception:
      [weblogic.transaction.internal.TimedOutException: Transaction timed out after 31 seconds
      Xid=BEA1-001A8C9FA9BEE7FAEAC1(31861891),Status=Active (PrePreparing),numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds since begin=31,seconds left=30,activeThread=Thread[ExecuteThread: '12' for queue: 'weblogic.kernel.Default',5,Thread Group for Queue: 'weblogic.kernel.Default'],SCInfo[pfm-cluster+pfm_1]=(state=pre-preparing),OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=pfm_1+172.22.151.61:10011+pfm-cluster+t3+, XAResources={},NonXAResources={})],CoordinatorURL=pfm_1+172.22.151.61:10011+pfm-cluster+t3+)]
       at weblogic.transaction.internal.TransactionImpl.throwRollbackException(TransactionImpl.java:1644)
       at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:300)
       at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:221)
       at weblogic.transaction.internal.TransactionManagerImpl.commit(TransactionManagerImpl.java:304)
       at weblogic.transaction.internal.TransactionManagerImpl.commit(TransactionManagerImpl.java:297)
       at com.crimsonlogic.performa.core.modules.studio.adapter.util.CacheManager.updateCacheResource(CacheManager.java:86)
       ... 24 more
      


      I configure my cache config as follows,
      <server>
      
       <!-- ==================================================================== -->
       <!-- Defines TreeCache configuration -->
       <!-- ==================================================================== -->
      
       <mbean code="org.jboss.cache.TreeCache" name="jboss.cache:service=TreeCache">
      
       <depends>jboss:service=Naming</depends>
       <depends>jboss:service=TransactionManager</depends>
      
       <!--
       Configure the TransactionManager
       -->
       <attribute name="TransactionManagerLookupClass">org.jboss.cache.GenericTransactionManagerLookup</attribute>
      
      
       <!--
       Node locking scheme:
       OPTIMISTIC
       PESSIMISTIC (default)
       -->
       <attribute name="NodeLockingScheme">OPTIMISTIC</attribute>
      
       <!--
       Note that this attribute is IGNORED if your NodeLockingScheme above is OPTIMISTIC.
      
       Isolation level : SERIALIZABLE
       REPEATABLE_READ (default)
       READ_COMMITTED
       READ_UNCOMMITTED
       NONE
       -->
       <attribute name="IsolationLevel">REPEATABLE_READ</attribute>
      
       <!--
       Valid modes are LOCAL
       REPL_ASYNC
       REPL_SYNC
       -->
       <attribute name="CacheMode">REPL_SYNC</attribute>
      
      <!--
      
       Just used for async repl: use a replication queue
      
       <attribute name="UseReplQueue">true</attribute>
      
      
       Replication interval for replication queue (in ms)
      
       <attribute name="ReplQueueInterval">2000</attribute>
      
      
       Max number of elements which trigger replication
      
       <attribute name="ReplQueueMaxElements">5</attribute>
      -->
      
       <!-- Name of cluster. Needs to be the same for all clusters, in order
       to find each other
       -->
       <attribute name="ClusterName">Performa-TreeCache-Cluster</attribute>
      
       <!-- JGroups protocol stack properties. Can also be a URL,
       e.g. file:/home/bela/default.xml
       <attribute name="ClusterProperties"></attribute>
       -->
      
       <attribute name="ClusterConfig">
       <config>
       <!-- UDP: if you have a multihomed machine,
       set the bind_addr attribute to the appropriate NIC IP address -->
       <!-- UDP: On Windows machines, because of the media sense feature
       being broken with multicast (even after disabling media sense)
       set the loopback attribute to true -->
       <UDP mcast_addr="230.8.8.8" mcast_port="56677"
       ip_ttl="32" ip_mcast="true"
       mcast_send_buf_size="80000" mcast_recv_buf_size="150000"
       ucast_send_buf_size="80000" ucast_recv_buf_size="150000"
       loopback="false"/>
       <PING timeout="2000" num_initial_members="3"
       up_thread="false" down_thread="false"/>
       <MERGE2 min_interval="10000" max_interval="20000"/>
       <FD shun="true" up_thread="true" down_thread="true"/>
       <VERIFY_SUSPECT timeout="1500"
       up_thread="false" down_thread="false"/>
       <pbcast.NAKACK gc_lag="50" retransmit_timeout="600,1200,2400,4800"
       max_xmit_size="8192" up_thread="false" down_thread="false"/>
       <UNICAST timeout="600,1200,2400" window_size="100" min_threshold="10"
       down_thread="false"/>
       <pbcast.STABLE desired_avg_gossip="20000"
       up_thread="false" down_thread="false"/>
       <FRAG frag_size="8192"
       down_thread="false" up_thread="false"/>
       <pbcast.GMS join_timeout="5000" join_retry_timeout="2000"
       shun="true" print_local_addr="true"/>
       <pbcast.STATE_TRANSFER up_thread="false" down_thread="false"/>
       </config>
       </attribute>
      
       <!--
       The max amount of time (in milliseconds) we wait until the
       initial state (ie. the contents of the cache) are retrieved from
       existing members in a clustered environment
       -->
       <attribute name="InitialStateRetrievalTimeout">5000</attribute>
      
       <!--
       Number of milliseconds to wait until all responses for a
       synchronous call have been received.
       -->
       <attribute name="SyncReplTimeout">20000</attribute>
      
       <!-- Max number of milliseconds to wait for a lock acquisition -->
       <attribute name="LockAcquisitionTimeout">150000</attribute>
      
       <!-- Name of the eviction policy class. -->
       <attribute name="EvictionPolicyClass">org.jboss.cache.eviction.LRUPolicy</attribute>
       <!-- Specific eviction policy configurations. This is LRU -->
       <attribute name="EvictionPolicyConfig">
       <config>
       <attribute name="wakeUpIntervalSeconds">5</attribute>
       <!-- Cache wide default -->
       <region name="/_default_">
       <attribute name="maxNodes">5000</attribute>
       <attribute name="timeToLiveSeconds">10000</attribute>
       </region>
       </config>
       </attribute>
      
       <!--
       Whether or not to fetch state on joining a cluster
       NOTE this used to be called FetchStateOnStartup and has been renamed to be more descriptive.
       -->
       <attribute name="FetchInMemoryState">false</attribute>
       <!--
       <attribute name="FetchStateOnStartup">false</attribute>
       -->
      
       <!--
       Indicate whether to use marshalling or not. Set this to true if you are running under a scoped
       class loader, e.g., inside an application server. Default is "false".
       -->
       <attribute name="UseMarshalling">false</attribute>
      
       <!-- New 1.3.x cache loader config block -->
       <attribute name="CacheLoaderConfiguration">
       <config>
       <!-- if passivation is true, only the first cache loader is used; the rest are ignored -->
       <passivation>true</passivation>
       <!-- comma delimited FQNs to preload -->
       <preload>/</preload>
       <!-- are the cache loaders shared in a cluster? -->
       <shared>false</shared>
      
       <!-- we can now have multiple cache loaders, which get chained -->
       <!-- the 'cacheloader' element may be repeated -->
       <cacheloader>
       <class>org.jboss.cache.loader.FileCacheLoader</class>
       <!-- same as the old CacheLoaderConfig attribute -->
       <properties>
       location=/sns/infrastructure/pfm/cluster/repository/CACHE
       </properties>
       <!-- whether the cache loader writes are asynchronous -->
       <async>false</async>
       <!-- only one cache loader in the chain may set fetchPersistentState to true.
       An exception is thrown if more than one cache loader sets this to true. -->
       <fetchPersistentState>false</fetchPersistentState>
       <!-- determines whether this cache loader ignores writes - defaults to false. -->
       <ignoreModifications>false</ignoreModifications>
       </cacheloader>
      
       </config>
       </attribute>
       </mbean>
      
      
      </server>
      


      And i create my transaction as follows,
      public static UserTransaction getCacheTransaction() throws CacheException {
       try {
       return (UserTransaction) new InitialContext().lookup("javax.transaction.UserTransaction");
       } catch (NamingException e) {
       throw new CacheException(e);
       }
      }
      


      Would be really grateful if someone can enlighten me on what was wrong with my configurations. Thanks in advance!