You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Richard Bryan (Jira)" <ji...@apache.org> on 2022/01/09 15:09:00 UTC
[jira] [Commented] (IGNITE-11662) Wrong classloader is used to unmarshal joining node data
[ https://issues.apache.org/jira/browse/IGNITE-11662?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17471372#comment-17471372 ]
Richard Bryan commented on IGNITE-11662:
----------------------------------------
Still a problem in 2.11.1. two years later!
> Wrong classloader is used to unmarshal joining node data
> --------------------------------------------------------
>
> Key: IGNITE-11662
> URL: https://issues.apache.org/jira/browse/IGNITE-11662
> Project: Ignite
> Issue Type: Bug
> Affects Versions: 2.7
> Environment: Ignite 2.7
> Karaf 4.2.0
> Reporter: Oleksii Mohylin
> Assignee: Oleksii Mohylin
> Priority: Major
> Time Spent: 10m
> Remaining Estimate: 0h
>
> When a cluster coordinator node is running in Karaf container it cannot accept joining requests from other nodes. Problem lies in unability to unmarshal joining node data in org.apache.ignite.internal.processors.cluster.GridClusterStateProcessor.validateNode()
> This line
> {code:java}
> joiningNodeState = marsh.unmarshal((byte[]) discoData.joiningNodeData(), Thread.currentThread().getContextClassLoader());{code}
> fails with
> {noformat}
> Error on unmarshalling discovery data from node 10.0.2.15,127.0.0.1,172.17.0.1:47501: 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=jdk.internal.loader.ClassLoaders$AppClassLoader@5c0369c4, cls=org.apache.ignite.internal.processors.cluster.DiscoveryDataClusterState]; node is not allowed to join{noformat}
> Apparently problem is wrong classloader returned by
> {code:java}
> Thread.currentThread().getContextClassLoader()){code}
> which is not the one created in IgniteAbstractOsgiContextActivator.start().
> *Proposed fix:*
> use proper way of obtaining classloader:
> {code:java}
> U.resolveClassLoader(ctx.config()){code}
> Like in other places. i.e. in GridClusterStateProcessor.collectGridNodeData().
>
>
--
This message was sent by Atlassian Jira
(v8.20.1#820001)