aspose file tools*
The moose likes JBoss/WildFly and the fly likes Unable to fetch state on startup Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Reply locked New topic
Author

Unable to fetch state on startup

qadir kamran
Greenhorn

Joined: Aug 29, 2009
Posts: 2
Hi,

I am doing setup for cache clustering.

1. Run cache node as server (coorinator) on my local machine. This node is connected to Database. It is runnng fine.
2. Then i run another cache node as client on same machine as seperate process with same cache configuration as used in cache cooridnator. This node has to be cluster with coordinator and fetch data from that.
3. Client rarely successfully UP and get data from coordinator and most of time it fails to UP and give this erro.
Caused by: org.jboss.cache.CacheException: Unable to fetch state on startup.

Kinldy help me to solve this issue.

I am usind this configuration.

<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:jboss:jbosscache-core:config:3.0">
<!-- uncomment to define a JGroups stack here

<PING timeout="2000" num_initial_members="3"/>
<MERGE2 max_interval="30000" min_interval="10000"/>
<FD_SOCK/>
<FD timeout="10000" max_tries="5" shun="true"/>
<VERIFY_SUSPECT timeout="1500"/>
<pbcast.NAKACK use_mcast_xmit="false" gc_lag="0"
retransmit_timeout="300,600,1200,2400,4800"
discard_delivered_msgs="true"/>
<UNICAST timeout="300,600,1200,2400,3600"/>
<pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000"
max_bytes="400000"/>
<pbcast.GMS print_local_addr="true" join_timeout="5000" shun="false"
view_bundling="true" view_ack_collection_timeout="5000"/>
<FRAG2 frag_size="60000"/>
<pbcast.STREAMING_STATE_TRANSFER use_reading_thread="true"/>
<pbcast.FLUSH timeout="0"/>
-->

<locking
isolationLevel="READ_COMMITTED"
lockParentForChildInsertRemove="false"
lockAcquisitionTimeout="60000"
nodeLockingScheme="mvcc"
writeSkewCheck="false"
concurrencyLevel="500"/>

<!--writeSkewCheck check only for REPEATABLE_READ--><!--the size of the shared lock pool can be tuned using the concurrencyLevel attribute of the locking element-->
<transaction transactionManagerLookupClass="org.jboss.cache.transaction.GenericTransactionManagerLookup"/><!--Specifies the TransactionManagerLookupClass implementation to use to obtain a transaction manager. If not specified (and a TransactionManager is not injected using RuntimeConfig.setTransactionManager(), the cache will not be able to participate in any transactions.-->


<startup /><!--inactiveOnStartup = false-->


<clustering mode="replication" clusterName="GRP_SL">
<stateRetrieval timeout="600000" fetchInMemoryState="true"/><!--This is the maximum amount of time - in milliseconds - to wait for state from neighboring caches, before throwing an exception and aborting startup. --><!--If true, this will cause the cache to ask neighboring caches for state when it starts up, so the cache starts "warm"-->

<!-- JGroups protocol stack properties. This tag provides a configuration which is used with JGroups to create a network communication channel. -->
<jgroupsConfig>
<UDP mcast_addr="228.10.20.40" mcast_port="45550" ip_mcast="true" mcast_send_buf_size="800000" mcast_recv_buf_size="150000"
ucast_send_buf_size="800000" ucast_recv_buf_size="150000" ip_ttl="8" loopback="false"><!--Messages to self are looped back immediately if true.--></UDP>
<PING timeout="10000" num_initial_members="2"><!--Uses IP multicast (by default) to find initial members. Once found, the current coordinator can be determined--></PING>
<MERGE2 min_interval="5000" max_interval="20000" ></MERGE2>
<FD_SOCK></FD_SOCK><FD shun="true" timeout="5000" max_tries="5"></FD>
<VERIFY_SUSPECT timeout="5000" num_msgs="3" />
<pbcast.NAKACK gc_lag="50" retransmit_timeout="300,600,1200,2400,4800"/>
<pbcast.STABLE desired_avg_gossip="20000" ><!--Deletes messages that have been seen by all members (distributed message garbage collection)--></pbcast.STABLE><FRAG frag_size="8192"><!--Fragments large messages into smaller ones and reassembles them back at the receiver side. For both multicast--></FRAG><pbcast.GMS join_timeout="5000" shun="true" print_local_addr="true"/>


<pbcast.STATE_TRANSFER><!--Ensures that state is correctly transferred from an existing member (usually the coordinator) to a new member.--></pbcast.STATE_TRANSFER>
</jgroupsConfig>
<sync replTimeout="600000"><!--This is the timeout used to wait for an acknowledgement when making a remote call, after which an exception is thrown. --></sync>
<!-- Alternatively, to use async replication, comment out the element above and uncomment the element below. -->
<!-- <async /> -->
</clustering>

<shutdown /><!--This attribute determines whether the cache registers a JVM shutdown hook so that it can clean up resources if the JVM is receives a shutdown signal. By default a shutdown hook is registered if no MBean server (apart from the JDK default) is detected. REGSTER forces the cache to register a shutdown hook even if an MBean server is detected, and DONT_REGISTER forces the cache NOT to register a shutdown hook, even if no MBean server is detected.-->


</jbosscache>
-------------------------------------------------------------------------------log file error
28 19:51:10,794-<OOB-1,GRP_SL,192.168.0.212:3294> NAKACK: [192.168.0.212:3294: received 192.168.0.212:3138#58
28 19:51:10,794-<OOB-1,GRP_SL,192.168.0.212:3294> STABLE: STABLE message will not be handled as I'm suspended
28 19:51:14,087-<Timer-2,GRP_SL,192.168.0.212:3294> FD$Monitor: sending are-you-alive msg to 192.168.0.212:3138 (own address=192.168.0.212:3294)
28 19:51:14,087-<Timer-2,GRP_SL,192.168.0.212:3294> TP: sending msg to 192.168.0.212:3138, src=192.168.0.212:3294, headers are FD: heartbeat, UDP: [channel_name=GRP_SL]
28 19:51:14,087-<UDP ucast,GRP_SL,192.168.0.212:3294> TP: received (ucast) 53 bytes from 192.168.0.212:3138
28 19:51:14,087-<OOB-2,GRP_SL,192.168.0.212:3294> TP: message is [dst: 192.168.0.212:3294, src: 192.168.0.212:3138 (2 headers), size=0 bytes, flags=OOB], headers are FD: heartbeat ack, UDP: [channel_name=GRP_SL]
28 19:51:14,087-<OOB-2,GRP_SL,192.168.0.212:3294> FD: received msg from 192.168.0.212:3138 (counts as ack)
28 19:51:14,664-<main> STABLE: resetting digest from NAKACK: [192.168.0.212:3138#58, 192.168.0.212:3294#0]
28 19:51:14,664-<main> STABLE: resuming message garbage collection
28 19:51:14,664-<main> RPCManagerImpl: Disconnecting and closing the Channel
28 19:51:14,664-<main> ParticipantGmsImpl: sending LEAVE request to 192.168.0.212:3138 (local_addr=192.168.0.212:3294)
28 19:51:14,664-<main> TP: sending msg to 192.168.0.212:3138, src=192.168.0.212:3294, headers are GMS: GmsHeader[LEAVE_REQ]: mbr=192.168.0.212:3294, UDP: [channel_name=GRP_SL]
28 19:51:14,727-<UDP ucast,GRP_SL,192.168.0.212:3294> TP: received (ucast) 49 bytes from 192.168.0.212:3138
28 19:51:14,727-<UDP mcast,GRP_SL,192.168.0.212:3294> TP: received (mcast) 105 bytes from 192.168.0.212:45550
28 19:51:14,727-<Incoming-1,GRP_SL,192.168.0.212:3294> TP: message is [dst: <null>, src: 192.168.0.212:3138 (3 headers), size=0 bytes], headers are GMS: GmsHeader[VIEW]: view=[192.168.0.212:3138|2] [192.168.0.212:3138], NAKACK: [MSG, seqno=59], UDP: [channel_name=GRP_SL]
28 19:51:14,727-<Incoming-1,GRP_SL,192.168.0.212:3294> FD: received msg from 192.168.0.212:3138 (counts as ack)
28 19:51:14,727-<Incoming-1,GRP_SL,192.168.0.212:3294> NAKACK: [192.168.0.212:3294: received 192.168.0.212:3138#59
28 19:51:14,727-<Incoming-1,GRP_SL,192.168.0.212:3294> ParticipantGmsImpl: view=[192.168.0.212:3138|2] [192.168.0.212:3138]
28 19:51:14,727-<Incoming-1,GRP_SL,192.168.0.212:3294> GMS: sending VIEW_ACK to 192.168.0.212:3138
28 19:51:14,727-<Incoming-1,GRP_SL,192.168.0.212:3294> TP: sending msg to 192.168.0.212:3138, src=192.168.0.212:3294, headers are GMS: GmsHeader[VIEW_ACK]: view=null, UDP: [channel_name=GRP_SL]
28 19:51:14,727-<OOB-1,GRP_SL,192.168.0.212:3294> TP: message is [dst: 192.168.0.212:3294, src: 192.168.0.212:3138 (2 headers), size=0 bytes, flags=OOB], headers are GMS: GmsHeader[LEAVE_RSP], UDP: [channel_name=GRP_SL]
28 19:51:14,727-<OOB-1,GRP_SL,192.168.0.212:3294> FD: received msg from 192.168.0.212:3138 (counts as ack)
28 19:51:14,727-<main> GMS: 192.168.0.212:3294 changed role to org.jgroups.protocols.pbcast.ClientGmsImpl
28 19:51:14,727-<UDP mcast> UDP: multicast socket is closed, exception=java.net.SocketException: socket closed
28 19:51:14,727-<main> UDP: multicast socket closed
28 19:51:14,727-<UDP mcast> UDP: multicast thread terminated
28 19:51:14,727-<main> UDP: socket closed
28 19:51:14,727-<UDP ucast> UDP$UcastReceiver: unicast receiver socket is closed, exception=java.net.SocketException: socket closed
28 19:51:14,727-<UDP ucast> UDP$UcastReceiver: unicast receiver thread terminated
28 19:51:14,743-<FD_SOCK pinger,GRP_SL,192.168.0.212:3294> FD_SOCK: socket to 192.168.0.212:3138 was reset
28 19:51:14,743-<main> UDP: closing sockets and stopping threads
28 19:51:14,743-<FD_SOCK pinger,GRP_SL,192.168.0.212:3294> FD_SOCK: pinger thread terminated
28 19:51:14,743-<main> CacheClientInitializerImpl: ##Exception## doInitiate():
org.jboss.cache.CacheException: java.lang.reflect.InvocationTargetException
at org.jboss.cache.util.reflect.ReflectionUtil.invokeAccessibly(ReflectionUtil.java:148)
at org.jboss.cache.factories.ComponentRegistry$PrioritizedMethod.invoke(ComponentRegistry.java:1005)
at org.jboss.cache.factories.ComponentRegistry.internalStart(ComponentRegistry.java:775)
at org.jboss.cache.factories.ComponentRegistry.start(ComponentRegistry.java:629)
at org.jboss.cache.invocation.CacheInvocationDelegate.start(CacheInvocationDelegate.java:344)
at TestClient.main(TestClient.java:302)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.jboss.cache.util.reflect.ReflectionUtil.invokeAccessibly(ReflectionUtil.java:144)
... 9 more
Caused by: org.jboss.cache.CacheException: Unable to fetch state on startup
at org.jboss.cache.RPCManagerImpl.start(RPCManagerImpl.java:187)
... 14 more
Caused by: org.jgroups.StateTransferException: 192.168.0.212:3294 could not fetch state null from null
at org.jgroups.JChannel.connect(JChannel.java:466)
at org.jboss.cache.RPCManagerImpl.start(RPCManagerImpl.java:175)
... 14 more
Caused by: org.jgroups.StateTransferException: 192.168.0.212:3294 could not fetch state null from null
at org.jgroups.JChannel.connect(JChannel.java:459)
... 15 more
28 19:51:14,743-<main> CacheClientMgr: ##Exception## doPerform():
org.jboss.cache.CacheException: java.lang.reflect.InvocationTargetException
at org.jboss.cache.util.reflect.ReflectionUtil.invokeAccessibly(ReflectionUtil.java:148)
at org.jboss.cache.factories.ComponentRegistry$PrioritizedMethod.invoke(ComponentRegistry.java:1005)
at org.jboss.cache.factories.ComponentRegistry.internalStart(ComponentRegistry.java:775)
at org.jboss.cache.factories.ComponentRegistry.start(ComponentRegistry.java:629)
at org.jboss.cache.invocation.CacheInvocationDelegate.start(CacheInvocationDelegate.java:344)
at TestClient.main(TestClient.java:302)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.jboss.cache.util.reflect.ReflectionUtil.invokeAccessibly(ReflectionUtil.java:144)
... 9 more
Caused by: org.jboss.cache.CacheException: Unable to fetch state on startup
at org.jboss.cache.RPCManagerImpl.start(RPCManagerImpl.java:187)
... 14 more
Caused by: org.jgroups.StateTransferException: 192.168.0.212:3294 could not fetch state null from null
at org.jgroups.JChannel.connect(JChannel.java:466)
at org.jboss.cache.RPCManagerImpl.start(RPCManagerImpl.java:175)
... 14 more
Caused by: org.jgroups.StateTransferException: 192.168.0.212:3294 could not fetch state null from null
at org.jgroups.JChannel.connect(JChannel.java:459)
... 15 more
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5836
    
    7

Locking this post - duplicate at http://www.coderanch.com/t/460387/JBoss/Unable-fetch-state-startup


JBoss In Action
 
 
subject: Unable to fetch state on startup