[ https://issues.apache.org/jira/browse/IGNITE-8857?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sergey Chugunov updated IGNITE-8857: ------------------------------------ Description: When persistence-enabled cluster is activated for the first time, it saves information about cluster nodes into BaselineTopology, including user attributes. It turned out that in case of cluster started with ZookeeperDiscoverySpi on first activation instances of ZookeeperClusterNode are persisted to disk within BaselineTopology. After that the same nodes cannot be switched to TcpDiscoverySpi without having ignite-zookeeper.jar on classpath, an attempt to start cluster results in the following exception: {code} org.apache.ignite.IgniteCheckedException: Failed to start processor: GridProcessorAdapter [] at org.apache.ignite.internal.IgniteKernal.startProcessor(IgniteKernal.java:1754) at org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:998) at org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:2014) at org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1723) at org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1151) at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:671) at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:596) at org.apache.ignite.Ignition.start(Ignition.java:327) ... 33 common frames omitted Caused by: org.apache.ignite.IgniteCheckedException: Failed to find class with given class loader for unmarshalling (make sure same versions of all classes are available on all nodes or enable peer-class-loading) [clsLdr=union-module-impl:com.sbt.core.envelope.container.loader.ImplClassLoader@7e532bb8, cls=org.apache.ignite.spi.discovery.zk.internal.ZookeeperClusterNode$1] at org.apache.ignite.marshaller.jdk.JdkMarshaller.unmarshal0(JdkMarshaller.java:144) at org.apache.ignite.marshaller.AbstractNodeNameAwareMarshaller.unmarshal(AbstractNodeNameAwareMarshaller.java:94) at org.apache.ignite.marshaller.jdk.JdkMarshaller.unmarshal0(JdkMarshaller.java:161) at org.apache.ignite.marshaller.AbstractNodeNameAwareMarshaller.unmarshal(AbstractNodeNameAwareMarshaller.java:82) at org.apache.ignite.internal.processors.cache.persistence.metastorage.MetaStorage.read(MetaStorage.java:158) at org.apache.ignite.internal.processors.cluster.GridClusterStateProcessor.onReadyForRead(GridClusterStateProcessor.java:216) at org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager.notifyMetastorageReadyForRead(GridCacheDatabaseSharedManager.java:437) at org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager.readMetastore(GridCacheDatabaseSharedManager.java:633) at org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager.start0(GridCacheDatabaseSharedManager.java:539) at org.apache.ignite.internal.processors.cache.GridCacheSharedManagerAdapter.start(GridCacheSharedManagerAdapter.java:61) at org.apache.ignite.internal.processors.cache.GridCacheProcessor.start(GridCacheProcessor.java:700) at org.apache.ignite.internal.IgniteKernal.startProcessor(IgniteKernal.java:1751) ... 40 common frames omitted Caused by: java.lang.ClassNotFoundException: org.apache.ignite.spi.discovery.zk.internal.ZookeeperClusterNode$1 at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:348) at org.apache.ignite.internal.util.IgniteUtils.forName(IgniteUtils.java:8608) at org.apache.ignite.marshaller.jdk.JdkMarshallerObjectInputStream.resolveClass(JdkMarshallerObjectInputStream.java:59) at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1819) at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1713) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1986) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1535) at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1919) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1529) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2231) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2155) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2013) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1535) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2231) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2155) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2013) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1535) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:422) at java.util.HashMap.readObject(HashMap.java:1404) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1058) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2122) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2013) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1535) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2231) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2155) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2013) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1535) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:422) at org.apache.ignite.marshaller.jdk.JdkMarshaller.unmarshal0(JdkMarshaller.java:139) ... 51 common frames omitted {code} We should prevent ZookeeperClusterNode instances to be persisted to disk. was: When persistence-enabled cluster is activated for the first time, it saves information about cluster nodes into BaselineTopology, including user attributes. It turned out that in case of cluster started with ZookeeperDiscoverySpi on first activation instances of ZookeeperClusterNode are persisted to disk within BaselineTopology. After that the same nodes cannot be switched to TcpDiscoverySpi without having ignite-zookeeper.jar on classpath. We should prevent ZookeeperClusterNode instances to be persisted to disk. > ZookeeperClusterNode class instances sneak into BaselineTopology when > non-empty user attributes are defined > ----------------------------------------------------------------------------------------------------------- > > Key: IGNITE-8857 > URL: https://issues.apache.org/jira/browse/IGNITE-8857 > Project: Ignite > Issue Type: Bug > Reporter: Sergey Chugunov > Assignee: Sergey Chugunov > Priority: Major > > When persistence-enabled cluster is activated for the first time, it saves > information about cluster nodes into BaselineTopology, including user > attributes. > It turned out that in case of cluster started with ZookeeperDiscoverySpi on > first activation instances of ZookeeperClusterNode are persisted to disk > within BaselineTopology. > After that the same nodes cannot be switched to TcpDiscoverySpi without > having ignite-zookeeper.jar on classpath, an attempt to start cluster results > in the following exception: > {code} > org.apache.ignite.IgniteCheckedException: Failed to start processor: > GridProcessorAdapter [] > at > org.apache.ignite.internal.IgniteKernal.startProcessor(IgniteKernal.java:1754) > at org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:998) > at > org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:2014) > at > org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1723) > at org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1151) > at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:671) > at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:596) > at org.apache.ignite.Ignition.start(Ignition.java:327) > ... 33 common frames omitted > Caused by: org.apache.ignite.IgniteCheckedException: Failed to find class > with given class loader for unmarshalling (make sure same versions of all > classes are available on all nodes or enable peer-class-loading) > [clsLdr=union-module-impl:com.sbt.core.envelope.container.loader.ImplClassLoader@7e532bb8, > cls=org.apache.ignite.spi.discovery.zk.internal.ZookeeperClusterNode$1] > at > org.apache.ignite.marshaller.jdk.JdkMarshaller.unmarshal0(JdkMarshaller.java:144) > at > org.apache.ignite.marshaller.AbstractNodeNameAwareMarshaller.unmarshal(AbstractNodeNameAwareMarshaller.java:94) > at > org.apache.ignite.marshaller.jdk.JdkMarshaller.unmarshal0(JdkMarshaller.java:161) > at > org.apache.ignite.marshaller.AbstractNodeNameAwareMarshaller.unmarshal(AbstractNodeNameAwareMarshaller.java:82) > at > org.apache.ignite.internal.processors.cache.persistence.metastorage.MetaStorage.read(MetaStorage.java:158) > at > org.apache.ignite.internal.processors.cluster.GridClusterStateProcessor.onReadyForRead(GridClusterStateProcessor.java:216) > at > org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager.notifyMetastorageReadyForRead(GridCacheDatabaseSharedManager.java:437) > at > org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager.readMetastore(GridCacheDatabaseSharedManager.java:633) > at > org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager.start0(GridCacheDatabaseSharedManager.java:539) > at > org.apache.ignite.internal.processors.cache.GridCacheSharedManagerAdapter.start(GridCacheSharedManagerAdapter.java:61) > at > org.apache.ignite.internal.processors.cache.GridCacheProcessor.start(GridCacheProcessor.java:700) > at > org.apache.ignite.internal.IgniteKernal.startProcessor(IgniteKernal.java:1751) > ... 40 common frames omitted > Caused by: java.lang.ClassNotFoundException: > org.apache.ignite.spi.discovery.zk.internal.ZookeeperClusterNode$1 > at java.net.URLClassLoader.findClass(URLClassLoader.java:381) > at java.lang.ClassLoader.loadClass(ClassLoader.java:424) > at java.lang.ClassLoader.loadClass(ClassLoader.java:357) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Class.java:348) > at > org.apache.ignite.internal.util.IgniteUtils.forName(IgniteUtils.java:8608) > at > org.apache.ignite.marshaller.jdk.JdkMarshallerObjectInputStream.resolveClass(JdkMarshallerObjectInputStream.java:59) > at > java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1819) > at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1713) > at > java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1986) > at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1535) > at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1919) > at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1529) > at > java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2231) > at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2155) > at > java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2013) > at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1535) > at > java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2231) > at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2155) > at > java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2013) > at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1535) > at java.io.ObjectInputStream.readObject(ObjectInputStream.java:422) > at java.util.HashMap.readObject(HashMap.java:1404) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at > java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1058) > at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2122) > at > java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2013) > at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1535) > at > java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2231) > at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2155) > at > java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2013) > at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1535) > at java.io.ObjectInputStream.readObject(ObjectInputStream.java:422) > at > org.apache.ignite.marshaller.jdk.JdkMarshaller.unmarshal0(JdkMarshaller.java:139) > ... 51 common frames omitted > {code} > We should prevent ZookeeperClusterNode instances to be persisted to disk. -- This message was sent by Atlassian JIRA (v7.6.3#76005)