Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-4879

Log a clear error message when an incompatible node joins the cluster

    XMLWordPrintable

    Details

    • Type: Feature Request
    • Status: New (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 7.0.0.CR2
    • Fix Version/s: None
    • Component/s: Core
    • Labels:
      None

      Description

      We don't check the Infinispan version when a node joins the cluster. If the node has an incompatible version, it will most likely fail to join, but the error message is not at all straightforward. As an example:

      Exception in thread "main" org.infinispan.commons.CacheException: Unable
      to invoke method public void
      org.infinispan.statetransfer.StateTransferManagerImpl.start() throws
      java.lang.Exception on object of type StateTransferManagerImpl
              at
      org.infinispan.commons.util.ReflectionUtil.invokeAccessibly(ReflectionUtil.java:170)
              at
      org.infinispan.factories.AbstractComponentRegistry$PrioritizedMethod.invoke(AbstractComponentRegistry.java:869)
              at
      org.infinispan.factories.AbstractComponentRegistry.invokeStartMethods(AbstractComponentRegistry.java:638)
              at
      org.infinispan.factories.AbstractComponentRegistry.internalStart(AbstractComponentRegistry.java:627)
              at
      org.infinispan.factories.AbstractComponentRegistry.start(AbstractComponentRegistry.java:530)
              at
      org.infinispan.factories.ComponentRegistry.start(ComponentRegistry.java:216)
              at org.infinispan.cache.impl.CacheImpl.start(CacheImpl.java:764)
              at
      org.infinispan.manager.DefaultCacheManager.wireAndStartCache(DefaultCacheManager.java:584)
              at
      org.infinispan.manager.DefaultCacheManager.createCache(DefaultCacheManager.java:539)
              at
      org.infinispan.manager.DefaultCacheManager.getCache(DefaultCacheManager.java:416)
              at ch.nexustelecom.lbd.engine.ImsiCache.init(ImsiCache.java:49)
              at
      ch.nexustelecom.dexclient.engine.DefaultDexClientEngine.init(DefaultDexClientEngine.java:120)
              at ch.nexustelecom.dexclient.DexClient.initClient(DexClient.java:169)
              at
      ch.nexustelecom.dexclient.tool.DexClientManager.startup(DexClientManager.java:196)
              at
      ch.nexustelecom.dexclient.tool.DexClientManager.main(DexClientManager.java:83)
      Caused by: org.infinispan.commons.CacheException:
      java.lang.ClassNotFoundException:
      org.infinispan.partionhandling.impl.AvailabilityMode
              at org.infinispan.commons.util.Util.rewrapAsCacheException(Util.java:655)
              at
      org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher.invokeRemoteCommand(CommandAwareRpcDispatcher.java:176)
              at
      org.infinispan.remoting.transport.jgroups.JGroupsTransport.invokeRemotely(JGroupsTransport.java:536)
              at
      org.infinispan.topology.LocalTopologyManagerImpl.executeOnCoordinator(LocalTopologyManagerImpl.java:388)
              at
      org.infinispan.topology.LocalTopologyManagerImpl.join(LocalTopologyManagerImpl.java:102)
              at
      org.infinispan.statetransfer.StateTransferManagerImpl.start(StateTransferManagerImpl.java:108)
              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.infinispan.commons.util.ReflectionUtil.invokeAccessibly(ReflectionUtil.java:168)
              ... 14 more
      Caused by: java.lang.ClassNotFoundException:
      org.infinispan.partionhandling.impl.AvailabilityMode
              at java.net.URLClassLoader$1.run(Unknown Source)
              at java.net.URLClassLoader$1.run(Unknown Source)
              at java.security.AccessController.doPrivileged(Native Method)
              at java.net.URLClassLoader.findClass(Unknown Source)
              at java.lang.ClassLoader.loadClass(Unknown Source)
              at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
              at java.lang.ClassLoader.loadClass(Unknown Source)
              at java.lang.Class.forName0(Native Method)
              at java.lang.Class.forName(Unknown Source)
              at
      org.jboss.marshalling.AbstractClassResolver.loadClass(AbstractClassResolver.java:131)
              at
      org.jboss.marshalling.AbstractClassResolver.resolveClass(AbstractClassResolver.java:112)
              at
      org.jboss.marshalling.river.RiverUnmarshaller.doReadClassDescriptor(RiverUnmarshaller.java:1002)
              at
      org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1239)
              at
      org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:272)
              at
      org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:209)
              at
      org.jboss.marshalling.AbstractObjectInput.readObject(AbstractObjectInput.java:41)
              at
      org.infinispan.topology.CacheStatusResponse$Externalizer.readObject(CacheStatusResponse.java:76)
              at
      org.infinispan.topology.CacheStatusResponse$Externalizer.readObject(CacheStatusResponse.java:62)
              at
      org.infinispan.marshall.core.ExternalizerTable$ExternalizerAdapter.readObject(ExternalizerTable.java:424)
              at
      org.infinispan.marshall.core.ExternalizerTable.readObject(ExternalizerTable.java:221)
              at
      org.infinispan.marshall.core.JBossMarshaller$ExternalizerTableProxy.readObject(JBossMarshaller.java:148)
              at
      org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:351)
              at
      org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:209)
              at
      org.jboss.marshalling.AbstractObjectInput.readObject(AbstractObjectInput.java:41)
              at
      org.infinispan.remoting.responses.SuccessfulResponse$Externalizer.readObject(SuccessfulResponse.java:79)
              at
      org.infinispan.remoting.responses.SuccessfulResponse$Externalizer.readObject(SuccessfulResponse.java:64)
              at
      org.infinispan.marshall.core.ExternalizerTable$ExternalizerAdapter.readObject(ExternalizerTable.java:424)
              at
      org.infinispan.marshall.core.ExternalizerTable.readObject(ExternalizerTable.java:221)
              at
      org.infinispan.marshall.core.JBossMarshaller$ExternalizerTableProxy.readObject(JBossMarshaller.java:148)
              at
      org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:351)
              at
      org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:209)
              at
      org.jboss.marshalling.AbstractObjectInput.readObject(AbstractObjectInput.java:41)
              at
      org.infinispan.commons.marshall.jboss.AbstractJBossMarshaller.objectFromObjectStream(AbstractJBossMarshaller.java:135)
              at
      org.infinispan.marshall.core.VersionAwareMarshaller.objectFromByteBuffer(VersionAwareMarshaller.java:101)
              at
      org.infinispan.commons.marshall.AbstractDelegatingMarshaller.objectFromByteBuffer(AbstractDelegatingMarshaller.java:80)
              at
      org.infinispan.remoting.transport.jgroups.MarshallerAdapter.objectFromBuffer(MarshallerAdapter.java:28)
              at
      org.jgroups.blocks.RequestCorrelator.receiveMessage(RequestCorrelator.java:390)
              at org.jgroups.blocks.RequestCorrelator.receive(RequestCorrelator.java:250)
              at
      org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.up(MessageDispatcher.java:674)
              at org.jgroups.JChannel.up(JChannel.java:733)
              at org.jgroups.stack.ProtocolStack.up(ProtocolStack.java:1030)
              at org.jgroups.protocols.pbcast.STATE_TRANSFER.up(STATE_TRANSFER.java:146)
              at org.jgroups.protocols.RSVP.up(RSVP.java:190)
              at org.jgroups.protocols.FRAG2.up(FRAG2.java:165)
              at org.jgroups.protocols.FlowControl.up(FlowControl.java:390)
              at org.jgroups.protocols.FlowControl.up(FlowControl.java:379)
              at org.jgroups.protocols.pbcast.GMS.up(GMS.java:1042)
              at org.jgroups.protocols.pbcast.STABLE.up(STABLE.java:234)
              at org.jgroups.protocols.UNICAST3.deliverMessage(UNICAST3.java:1034)
              at org.jgroups.protocols.UNICAST3.handleDataReceived(UNICAST3.java:752)
              at org.jgroups.protocols.UNICAST3.up(UNICAST3.java:399)
              at org.jgroups.protocols.pbcast.NAKACK2.up(NAKACK2.java:610)
              at org.jgroups.protocols.BARRIER.up(BARRIER.java:152)
              at org.jgroups.protocols.VERIFY_SUSPECT.up(VERIFY_SUSPECT.java:155)
              at org.jgroups.protocols.FD_ALL.up(FD_ALL.java:200)
              at org.jgroups.protocols.FD_SOCK.up(FD_SOCK.java:297)
              at org.jgroups.protocols.MERGE3.up(MERGE3.java:288)
              at org.jgroups.protocols.Discovery.up(Discovery.java:277)
              at org.jgroups.protocols.TP.passMessageUp(TP.java:1568)
              at org.jgroups.protocols.TP$MyHandler.run(TP.java:1787)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
              at java.lang.Thread.run(Unknown Source)
      

      Optionally, we could allow the user to configure an "application version" and prevent nodes with different application versions from joining the same cluster.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            dan.berindei Dan Berindei
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: