如何修复“ IgniteCheckedException:查询执行失败:GridCacheQueryBean”?

时间:2019-02-12 07:08:38

标签: java ignite vert.x

我正在使用vertx-ignite进行集群管理。 vertx的版本为<3.5.4>。重新启动节点实例时,我在日志中发现了以下错误消息堆栈:**

    2019-02-12 10:52:21.655 io.vertx.core.eventbus.impl.clustered.ClusteredEventBus WARNING: Error removing subs
   javax.cache.CacheException: class org.apache.ignite.IgniteCheckedException: Query execution failed: GridCacheQueryBean [qry=GridCacheQueryAdapter [type=SCAN, clsName=null, clause=null, filter=null, transform=null, part=null, incMeta=false, metrics=GridCacheQueryMetricsAdapter [minTime=9223372036854775807, maxTime=0, sumTime=0, avgTime=0.0, execs=0, completed=0, fails=0], pageSize=1024, timeout=0, keepAll=false, incBackups=false, dedup=false, prj=null, keepBinary=false, subjId=8190e136-b922-4f5d-a9ae-add78b700f1c, taskHash=0], rdc=null, trans=null]
                        at org.apache.ignite.internal.processors.cache.GridCacheUtils.convertToCacheException(GridCacheUtils.java:1287)
                        at org.apache.ignite.internal.processors.cache.query.GridCacheQueryFutureAdapter.next(GridCacheQueryFutureAdapter.java:171)
                        at org.apache.ignite.internal.processors.cache.query.GridCacheDistributedQueryManager$5.onHasNext(GridCacheDistributedQueryManager.java:634)
                        at org.apache.ignite.internal.util.GridCloseableIteratorAdapter.hasNextX(GridCloseableIteratorAdapter.java:53)
                        at org.apache.ignite.internal.processors.cache.CacheWeakQueryIteratorsHolder$WeakQueryCloseableIterator.onHasNext(CacheWeakQueryIteratorsHolder.java:308)
                        at org.apache.ignite.internal.util.GridCloseableIteratorAdapter.hasNextX(GridCloseableIteratorAdapter.java:53)
                        at org.apache.ignite.internal.util.lang.GridIteratorAdapter.hasNext(GridIteratorAdapter.java:45)
                        at io.vertx.spi.cluster.ignite.impl.AsyncMultiMapImpl.lambda$removeAllMatching$6(AsyncMultiMapImpl.java:184)
                        at io.vertx.core.impl.ContextImpl.lambda$executeBlocking$1(ContextImpl.java:273)
                        at io.vertx.core.impl.TaskQueue.run(TaskQueue.java:76)
                        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
                        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
                        at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
                        at java.lang.Thread.run(Thread.java:745)
                Caused by: class org.apache.ignite.IgniteCheckedException: Query execution failed: GridCacheQueryBean [qry=GridCacheQueryAdapter [type=SCAN, clsName=null, clause=null, filter=null, transform=null, part=null, incMeta=false, metrics=GridCacheQueryMetricsAdapter [minTime=9223372036854775807, maxTime=0, sumTime=0, avgTime=0.0, execs=0, completed=0, fails=0], pageSize=1024, timeout=0, keepAll=false, incBackups=false, dedup=false, prj=null, keepBinary=false, subjId=8190e136-b922-4f5d-a9ae-add78b700f1c, taskHash=0], rdc=null, trans=null]
                        at org.apache.ignite.internal.processors.cache.query.GridCacheQueryFutureAdapter.checkError(GridCacheQueryFutureAdapter.java:257)
                        at org.apache.ignite.internal.processors.cache.query.GridCacheQueryFutureAdapter.internalIterator(GridCacheQueryFutureAdapter.java:266)
                        at org.apache.ignite.internal.processors.cache.query.GridCacheQueryFutureAdapter.next(GridCacheQueryFutureAdapter.java:161)
                        ... 12 more
                Caused by: class org.apache.ignite.IgniteCheckedException: Failed to execute query on node [query=GridCacheQueryBean [qry=GridCacheQueryAdapter [type=SCAN, clsName=null, clause=null, filter=null, transform=null, part=null, incMeta=false, metrics=GridCacheQueryMetricsAdapter [minTime=9223372036854775807, maxTime=0, sumTime=0, avgTime=0.0, execs=0, completed=0, fails=0], pageSize=1024, timeout=0, keepAll=false, incBackups=false, dedup=false, prj=null, keepBinary=false, subjId=8190e136-b922-4f5d-a9ae-add78b700f1c, taskHash=0], rdc=null, trans=null], nodeId=b9ac5cfc-61c8-4440-9c8f-9ed50577f2c9]
                        at org.apache.ignite.internal.processors.cache.query.GridCacheQueryFutureAdapter.onPage(GridCacheQueryFutureAdapter.java:383)
                        at org.apache.ignite.internal.processors.cache.query.GridCacheDistributedQueryFuture.onNodeLeft(GridCacheDistributedQueryFuture.java:152)
                        at org.apache.ignite.internal.processors.cache.query.GridCacheDistributedQueryManager.sendRequest(GridCacheDistributedQueryManager.java:821)
                        at org.apache.ignite.internal.processors.cache.query.GridCacheDistributedQueryManager.queryDistributed(GridCacheDistributedQueryManager.java:570)
                        at org.apache.ignite.internal.processors.cache.query.GridCacheDistributedQueryManager.scanQueryDistributed(GridCacheDistributedQueryManager.java:610)
                        at org.apache.ignite.internal.processors.cache.query.GridCacheQueryAdapter.executeScanQuery(GridCacheQueryAdapter.java:550)
                        at org.apache.ignite.internal.processors.cache.GridCacheAdapter.igniteIterator(GridCacheAdapter.java:3894)
                        at org.apache.ignite.internal.processors.cache.GridCacheAdapter.igniteIterator(GridCacheAdapter.java:3869)
                        at org.apache.ignite.internal.processors.cache.IgniteCacheProxyImpl.iterator(IgniteCacheProxyImpl.java:1568)
                        at org.apache.ignite.internal.processors.cache.GatewayProtectedCacheProxy.iterator(GatewayProtectedCacheProxy.java:1465)
                        ... 7 more
                Caused by: class org.apache.ignite.internal.cluster.ClusterTopologyCheckedException: Remote node has left topology: b9ac5cfc-61c8-4440-9c8f-9ed50577f2c9
                        ... 16 more
    2019-02-12 10:52:21.694 org.apache.ignite.logger.java.JavaLogger info
    INFO: Rebalancing scheduled [order=[myCache]]
    2019-02-12 10:52:21.695 org.apache.ignite.logger.java.JavaLogger info
    INFO: Rebalancing started [top=AffinityTopologyVersion [topVer=150, minorTopVer=0], evt=NODE_LEFT, node=b9ac5cfc-61c8-4440-9c8f-9ed50577f2c9]

那么这里出什么问题了?如何解决这个问题? 点燃xml的配置如下所示:

<bean id="igniteSelfConfiguration" class="org.apache.ignite.configuration.IgniteConfiguration">
        <property name="clientMode" value="false"/>
        <property name="peerClassLoadingEnabled" value="true"/>
        <property name="deploymentMode" value="CONTINUOUS"/>
        <property name="peerClassLoadingMissedResourcesCacheSize" value="0"/>

        <property name="lifecycleBeans">
             <list>
                 <bean class="com.eigpay.splitter.infrastructure.communication.provider.chief.message.MyLifecycleBean"/>
             </list>
        </property>


        <property name="failureDetectionTimeout" value="60000"/>

        <!-- Explicitly configure TCP discovery SPI to provide list of initial nodes. -->

        <property name="discoverySpi">
            <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
                <property name="ipFinder">
                    <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
                    </bean>
                </property>
            </bean>
        </property>

        <!-- Template cache configuration. -->

        <property name="cacheConfiguration">
            <bean class="org.apache.ignite.configuration.CacheConfiguration">
                <property name="name" value="myCache"/>
                <property name="cacheMode" value="PARTITIONED"/>
                <property name="backups" value="1"/>
                <property name="readFromBackup" value="false"/>
                 <property name="writeSynchronizationMode" value="FULL_SYNC"/>
            </bean>
        </property>
        <property name="metricsLogFrequency" value="0"/>
    </bean>

1 个答案:

答案 0 :(得分:0)

“远程节点已离开拓扑”表示远程节点已崩溃,遭受非常长的GC或存在网络问题。