将 JDK 从 11 升级到 17 时 Ignite Clustering 失败

问题描述 投票:0回答:1

我一直在使用 Apache Ignite(从 v2.8 开始,现在是 v2.16.0)开发一个相当简单的概念验证 (POC) 项目。使用 Java 11,我有 3 个简单的“服务器”点燃进程在 Java 进程内运行。我在同一台机器上启动所有这些进程:

  • 进程 A:获取外部输入,使用进程 B 的服务,将数据传递给进程 B。
  • 进程 B:发布服务(由进程 A 使用),进行一些数据处理,将数据传递给进程 C。
  • 进程C:从进程B获取数据,进行一些处理,可以调用进程A发布的服务。

我的 POC 在 Java 11 下工作,但由于未来总是向前发展,我想升级到 Java 17。所以我从以下版本升级: zulu11.37.17-ca-jdk11.0.6-win_x64 到 zulu17.48.15-ca-jdk17.0.10-win_x64

我已经查阅了以下有关在 Java 11+ 中使用 Ignite 的信息 https://ignite.apache.org/docs/latest/quick-start/java#running-ignite-with-java-11-or-later 我向每个进程添加了 JVM 参数(大量的 --add-opens)。指定新的 JDK 并添加记录的 JVM 参数后,每个进程都会按预期启动。

但是,问题是在 Java 17 下每个进程不再“集群”。进程 A 找不到进程 B 发布的服务。进程 A 说它自己位于集群中,尽管进程 B 和 C 也在运行(它们正在运行)所有硬编码以加入同一集群)。我还可以将 JDK 更改回 11 版本,集群功能将按预期运行(即使我保留 JDK 11 中的 --add-open JVM 选项)。

这似乎是一个相当基本的问题...我是否错过了在 11/17 之间切换的一些明显的东西,可以解释这种行为?谢谢。

IgniteConfiguration.toString() 按要求:

IgniteConfiguration [igniteInstanceName=Ignite POC, pubPoolSize=8, svcPoolSize=null, callbackPoolSize=8, stripedPoolSize=8, sysPoolSize=8, mgmtPoolSize=4, dataStreamerPoolSize=8, utilityCachePoolSize=8, utilityCacheKeepAliveTime=60000, p2pPoolSize=2, qryPoolSize=8, buildIdxPoolSize=2, igniteHome=null, igniteWorkDir=null, mbeanSrv=null, nodeId=null, marsh=null, marshLocJobs=false, p2pEnabled=true, netTimeout=5000, netCompressionLevel=1, sndRetryDelay=1000, sndRetryCnt=3, metricsHistSize=10000, metricsUpdateFreq=2000, metricsExpTime=9223372036854775807, discoSpi=null, segPlc=USE_FAILURE_HANDLER, segResolveAttempts=2, waitForSegOnStart=true, allResolversPassReq=true, segChkFreq=10000, commSpi=null, evtSpi=null, colSpi=null, deploySpi=null, indexingSpi=null, addrRslvr=null, encryptionSpi=null, tracingSpi=null, clientMode=false, rebalanceThreadPoolSize=2, rebalanceTimeout=10000, rebalanceBatchesPrefetchCnt=3, rebalanceThrottle=0, rebalanceBatchSize=524288, txCfg=TransactionConfiguration [txSerEnabled=false, dfltIsolation=REPEATABLE_READ, dfltConcurrency=PESSIMISTIC, dfltTxTimeout=0, txTimeoutOnPartitionMapExchange=0, pessimisticTxLogSize=0, pessimisticTxLogLinger=10000, tmLookupClsName=null, txManagerFactory=null, useJtaSync=false], cacheSanityCheckEnabled=true, discoStartupDelay=60000, deployMode=SHARED, p2pMissedCacheSize=100, locHost=null, timeSrvPortBase=31100, timeSrvPortRange=100, failureDetectionTimeout=10000, sysWorkerBlockedTimeout=null, clientFailureDetectionTimeout=30000, metricsLogFreq=0, connectorCfg=ConnectorConfiguration [jettyPath=null, host=null, port=11211, noDelay=true, directBuf=false, sndBufSize=32768, rcvBufSize=32768, idleQryCurTimeout=600000, idleQryCurCheckFreq=60000, sndQueueLimit=0, selectorCnt=4, idleTimeout=7000, sslEnabled=false, sslClientAuth=false, sslFactory=null, portRange=100, threadPoolSize=8, msgInterceptor=null], odbcCfg=null, warmupClos=null, atomicCfg=AtomicConfiguration [seqReserveSize=1000, cacheMode=PARTITIONED, backups=1, aff=null, grpName=null], classLdr=null, sslCtxFactory=null, platformCfg=null, binaryCfg=null, memCfg=null, pstCfg=null, dsCfg=null, snapshotPath=snapshots, snapshotThreadPoolSize=4, activeOnStart=true, activeOnStartPropSetFlag=false, autoActivation=true, autoActivationPropSetFlag=false, clusterStateOnStart=null, sqlConnCfg=null, cliConnCfg=ClientConnectorConfiguration [host=null, port=10800, portRange=100, sockSndBufSize=0, sockRcvBufSize=0, tcpNoDelay=true, maxOpenCursorsPerConn=128, threadPoolSize=8, selectorCnt=4, idleTimeout=0, handshakeTimeout=10000, jdbcEnabled=true, odbcEnabled=true, thinCliEnabled=true, sslEnabled=false, useIgniteSslCtxFactory=true, sslClientAuth=false, sslCtxFactory=null, thinCliCfg=ThinClientConfiguration [maxActiveTxPerConn=100, maxActiveComputeTasksPerConn=0, sendServerExcStackTraceToClient=false], sesOutboundMsgQueueLimit=0], mvccVacuumThreadCnt=2, mvccVacuumFreq=5000, authEnabled=false, failureHnd=null, commFailureRslvr=null, sqlCfg=SqlConfiguration [longQryWarnTimeout=3000, dfltQryTimeout=0, sqlQryHistSize=1000, validationEnabled=false], asyncContinuationExecutor=null]
ignite java-17 apacheignite
1个回答
0
投票

看起来罪魁祸首需要设置 -Djava.net.preferIPv4Stack=true JVM 选项。这个选项在Java 11下好像不需要,在Java 17下好像需要。看图...

© www.soinside.com 2019 - 2024. All rights reserved.