6 Replies Latest reply on May 14, 2007 2:31 PM by Jamie Ho

    Cache startup problems

    Jamie Ho Newbie


      Does anyone know what the exception below means? I have one particular machine that doesn't seem to work unless I start it up first before any of the other machines in my cluster. Order seems to matter. If I don't start up this machine first, I get the error below.


      09 May 2007 10:50:12 [main] INFO org.jgroups.protocols.UDP - sockets will use
      09 May 2007 10:50:12 [main] INFO org.jgroups.protocols.UDP - socket informatio
      local_addr=, mcast_addr=, bind_addr=/10.133
      .192.106, ttl=2
      sock: bound to, receive buffer size=20000000, send buffer si
      mcast_recv_sock: bound to, send buffer size=640000, receive
      buffer size=25000000
      mcast_send_sock: bound to, send buffer size=640000, receive
      buffer size=25000000

      GMS: address is
      09 May 2007 10:50:14 [main] INFO org.jboss.cache.CacheImpl.JBossCache-Cluster
      - viewAccepted(): [|26] [,
      09 May 2007 10:50:15 [main] INFO org.jboss.cache.CacheImpl.JBossCache-Cluster
      - CacheImpl local address is
      09 May 2007 10:50:15 [main] INFO org.jgroups.protocols.pbcast.STATE_TRANSFER -
      Successful flush at
      09 May 2007 10:50:15 [Incoming Thread] INFO org.jboss.cache.statetransfer.State
      TransferManager - starting state integration at node UnversionedNode[ / data=[]
      09 May 2007 10:50:15 [Incoming Thread] WARN org.jboss.cache.statetransfer.Defau
      ltStateTransferIntegrator - transient state integration failed, removing all ch
      ildren of UnversionedNode[ / data=[] RL]
      09 May 2007 10:50:15 [Incoming Thread] ERROR org.jboss.cache.marshall.VersionAwa
      reMarshaller - Unable to read version id from first two bytes of stream, barfin
      09 May 2007 10:50:15 [Incoming Thread] ERROR org.jboss.cache.CacheImpl.JBossCach
      e-Cluster - failed setting state
      at java.io.DataInputStream.readShort(DataInputStream.java:298)
      at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputS
      at java.io.ObjectInputStream.readShort(ObjectInputStream.java:928)
      at org.jboss.cache.marshall.VersionAwareMarshaller.objectFromObjectStrea
      at org.jboss.cache.statetransfer.DefaultStateTransferIntegrator.integrat
      at org.jboss.cache.statetransfer.DefaultStateTransferIntegrator.integrat
      at org.jboss.cache.statetransfer.StateTransferManager.setState(StateTran
      at org.jboss.cache.statetransfer.StateTransferManager.setState(StateTran
      at org.jboss.cache.CacheImpl$MessageListenerAdaptor.setState(CacheImpl.j
      at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.handleUpEvent(Me
      at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.up(MessageDispat
      at org.jgroups.JChannel.up(JChannel.java:991)
      at org.jgroups.stack.ProtocolStack.up(ProtocolStack.java:326)
      at org.jgroups.protocols.pbcast.FLUSH.up(FLUSH.java:509)
      at org.jgroups.protocols.pbcast.STATE_TRANSFER.handleStateRsp(STATE_TRAN
      at org.jgroups.protocols.pbcast.STATE_TRANSFER.up(STATE_TRANSFER.java:13
      at org.jgroups.protocols.FRAG2.up(FRAG2.java:197)
      at org.jgroups.protocols.pbcast.GMS.up(GMS.java:717)
      at org.jgroups.protocols.pbcast.STABLE.up(STABLE.java:226)
      at org.jgroups.protocols.UNICAST.handleDataReceived(UNICAST.java:535)
      at org.jgroups.protocols.UNICAST.up(UNICAST.java:214)
      at org.jgroups.protocols.pbcast.NAKACK.up(NAKACK.java:577)
      at org.jgroups.protocols.VERIFY_SUSPECT.up(VERIFY_SUSPECT.java:154)
      at org.jgroups.protocols.FD.up(FD.java:328)
      at org.jgroups.protocols.FD_SOCK.up(FD_SOCK.java:301)
      at org.jgroups.protocols.MERGE2.up(MERGE2.java:145)
      at org.jgroups.protocols.Discovery.up(Discovery.java:224)
      at org.jgroups.protocols.TP$IncomingPacket.handleMyMessage(TP.java:1541)

      at org.jgroups.protocols.TP$IncomingPacket.run(TP.java:1495)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor

        • 1. Re: Cache startup problems
          Jamie Ho Newbie

          I am having better luck if every machine in the cluster run the exact same version of Java. Does anyone know why?


          • 2. Re: Cache startup problems
            Elias Ross Master

            The TTL in your config is set to 2, which AFAIK is either milliseconds or seconds. Either one is quite short. Have you or are you using an example or modified config?

            • 3. Re: Cache startup problems
              Brian Stansberry Master

              TTL is the number of network hops before the packet can be dropped; not time based.

              I expect there is an issue with the way the ObjectOutputStream is encoding messages. What are the Java versions you are using when it fails?

              • 4. Re: Cache startup problems
                Jamie Ho Newbie

                I get this exception when using Java 1.6.0. I seem to have better luck with 1.5.0_06 but I am now seeing this new exception intermittently during startup:

                java.lang.IllegalAccessError: tried to access class java.util.AbstractMap$SimpleEntry from class org.jboss.cache.util.MapCopy
                at org.jboss.cache.util.MapCopy.(MapCopy.java:43)
                at org.jboss.cache.UnversionedNode.getDataDirect(UnversionedNode.java:208)
                at org.jboss.cache.CacheImpl._put(CacheImpl.java:2197)
                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:585)
                at org.jgroups.blocks.MethodCall.invoke(MethodCall.java:330)
                at org.jboss.cache.interceptors.CallInterceptor.invoke(CallInterceptor.java:49)
                at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:75)
                at org.jboss.cache.interceptors.EvictionInterceptor.invoke(EvictionInterceptor.java:88)
                at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:75)
                at org.jboss.cache.interceptors.UnlockInterceptor.invoke(UnlockInterceptor.java:33)

                I am using the example config.


                • 5. Re: Cache startup problems
                  Elias Ross Master

                  Looks like in 1.6 there is a new public "SimpleEntry" class in AbstractMap. I wrote my own "SimpleEntry" for MapCopy, since 1.5 did not have this exposed.

                  It seems there might be a compatibility issue if JBoss Cache was compiled for 1.6 and later run on 1.5. I assume this is not the case, and instead there's some sort of Java bug.

                  How was your Cache 2.0 built?

                  • 6. Re: Cache startup problems
                    Jamie Ho Newbie

                    Thanks for the help! The JDK version was the issue. The machine that compiled using JDK 1.6 and ran using 1.5 had issues. Everything works fine if I just compile and run using 1.5.