无法向备份节点发送更新请求

时间:2014-12-04 09:21:32

标签: gridgain

网络版:6.5.5
缓存模式:替换为 缓存K-V类型:[整数,整数[]]
节点启动模式:CMD ggstart -v -i
问题描述:当我只启动一个节点时,它可以正确计算并且结果是正确的,但是,当我用示例启动多个节点时,它不起作用,异常信息如下。

SampleComputeNumTask.java:

    @Override
    public Collection<CbJob<Long, Integer[]>> splitJob(Serializable... args) throws CJobExcuteException {
        Collection<CbJob<Long, Integer[]>> list = new ArrayList<CbJob<Long, Integer[]>>();
        loadCache(args);
        GridCache<Integer, Integer[]> cache = grid.cache("share-hqfx");
        for (GridCacheEntry<Integer, Integer[]> entry : cache.entrySet()) {
            list.add(new CbJob<Long, Integer[]>(entry.getKey(), new MyCall(), entry.getValue()));
        }
        return list;
    }

    @Override
    public void loadCache(Serializable... args) throws CJobExcuteException {
        GridCache<Integer, Integer[]> cache = grid.cache("share-hqfx");
        try {
            cache.globalClearAll(0);
        } catch (GridException e1) {
            e1.printStackTrace();
        }
        int j = 0;
        int a = 0;
        int len = args == null ? 1000 : (Integer) args[0];
        Integer[] arg = new Integer[len];
        for (int i = 1; i < 1000000; i++) {
            arg[a] = i;
            a++;
            if (a == 1000 || i == 1000000) {
                ++j;
                try {
                    cache.putx(j, arg);
                } catch (GridException e) {
                    e.printStackTrace();
                }
                a = 0;
                arg = new Integer[1000];
            }
        }
    }

异常追踪:

[16:02:03,880][ERROR][gridgain-#60%rest-null%][GridDhtAtomicUpdateFuture] Failed to send update request to backup node (did node leave the grid?): 5e1b14d3-eb17-499d-9f0e-0de9a4a00c90
    class org.gridgain.grid.GridException: Failed to deploy class for local deployment [clsName=java.lang.Integer, ldr=GridUriDeploymentClassLoader [urls=[file:/F:/gridgain-fabric-ent/tmp/grid/gg.uri.deployment.tmp/41ed7058-4555-47d7-83e2-773436b2d12e/dirzip_SampleComputeTask5391357847454873740.gar/]]]
    For more information see:
        Troubleshooting:      http://bit.ly/GridGain-Troubleshooting
        Documentation Center: http://bit.ly/GridGain-Documentation

        at org.gridgain.grid.kernal.processors.cache.GridCacheDeploymentManager.registerClass(GridCacheDeploymentManager.java:624)
        at org.gridgain.grid.kernal.processors.cache.GridCacheDeploymentManager.registerClass(GridCacheDeploymentManager.java:562)
        at org.gridgain.grid.kernal.processors.cache.GridCacheMessage.prepareObject(GridCacheMessage.java:181)
        at org.gridgain.grid.kernal.processors.cache.GridCacheMessage.marshalCollection(GridCacheMessage.java:478)
        at org.gridgain.grid.kernal.processors.cache.distributed.dht.atomic.GridDhtAtomicUpdateRequest.prepareMarshal(GridDhtAtomicUpdateRequest.java:576)
        at org.gridgain.grid.kernal.processors.cache.GridCacheIoManager.onSend(GridCacheIoManager.java:334)
        at org.gridgain.grid.kernal.processors.cache.GridCacheIoManager.send(GridCacheIoManager.java:362)
        at org.gridgain.grid.kernal.processors.cache.GridCacheIoManager.send(GridCacheIoManager.java:350)
        at org.gridgain.grid.kernal.processors.cache.GridCacheIoManager.send(GridCacheIoManager.java:557)
        at org.gridgain.grid.kernal.processors.cache.distributed.dht.atomic.GridDhtAtomicUpdateFuture.map(GridDhtAtomicUpdateFuture.java:324)
        at org.gridgain.grid.kernal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.updateAllAsyncInternal0(GridDhtAtomicCache.java:1005)
        at org.gridgain.grid.kernal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.updateAllAsyncInternal(GridDhtAtomicCache.java:854)
        at org.gridgain.grid.kernal.processors.cache.distributed.dht.atomic.GridNearAtomicUpdateFuture.mapSingle(GridNearAtomicUpdateFuture.java:740)
        at org.gridgain.grid.kernal.processors.cache.distributed.dht.atomic.GridNearAtomicUpdateFuture.map0(GridNearAtomicUpdateFuture.java:581)
        at org.gridgain.grid.kernal.processors.cache.distributed.dht.atomic.GridNearAtomicUpdateFuture.mapOnTopology(GridNearAtomicUpdateFuture.java:454)
        at org.gridgain.grid.kernal.processors.cache.distributed.dht.atomic.GridNearAtomicUpdateFuture.map(GridNearAtomicUpdateFuture.java:319)
        at org.gridgain.grid.kernal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache$13.apply(GridDhtAtomicCache.java:662)
        at org.gridgain.grid.kernal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache$13.apply(GridDhtAtomicCache.java:660)
        at org.gridgain.grid.kernal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.asyncOp(GridDhtAtomicCache.java:584)
        at org.gridgain.grid.kernal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.updateAllAsync0(GridDhtAtomicCache.java:660)
        at org.gridgain.grid.kernal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.putxAsync(GridDhtAtomicCache.java:343)
        at org.gridgain.grid.kernal.processors.cache.GridCacheAdapter.putxAsync(GridCacheAdapter.java:2284)
        at org.gridgain.grid.kernal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.putx(GridDhtAtomicCache.java:329)
        at org.gridgain.grid.kernal.processors.cache.GridCacheProxyImpl.putx(GridCacheProxyImpl.java:705)
        at com.topgether.cbgrid.datagrid.SampleComputeNumTask.loadCache(SampleComputeNumTask.java:64)
        at com.topgether.cbgrid.datagrid.SampleComputeNumTask.splitJob(SampleComputeNumTask.java:38)
        at com.topgether.cbgrid.datagrid.CGridTask.split(CGridTask.java:53)
        at com.topgether.cbgrid.datagrid.CGridTask.split(CGridTask.java:1)
        at org.gridgain.grid.compute.GridComputeTaskSplitAdapter.map(GridComputeTaskSplitAdapter.java:111)
        at org.gridgain.grid.kernal.processors.task.GridTaskWorker$2.call(GridTaskWorker.java:404)
        at org.gridgain.grid.kernal.processors.task.GridTaskWorker$2.call(GridTaskWorker.java:402)
        at org.gridgain.grid.util.GridUtils.wrapThreadLoader(GridUtils.java:6078)
        at org.gridgain.grid.kernal.processors.task.GridTaskWorker.body(GridTaskWorker.java:401)
        at org.gridgain.grid.util.worker.GridWorker.run(GridWorker.java:151)
        at org.gridgain.grid.kernal.processors.task.GridTaskProcessor.startTask(GridTaskProcessor.java:607)
        at org.gridgain.grid.kernal.processors.task.GridTaskProcessor.execute(GridTaskProcessor.java:365)
        at org.gridgain.grid.kernal.GridComputeImpl.execute(GridComputeImpl.java:122)
        at org.gridgain.grid.kernal.processors.rest.handlers.task.GridTaskCommandHandler.handleAsyncUnsafe(GridTaskCommandHandler.java:191)
        at org.gridgain.grid.kernal.processors.rest.handlers.task.GridTaskCommandHandler.handleAsync(GridTaskCommandHandler.java:138)
        at org.gridgain.grid.kernal.processors.rest.GridRestProcessor.handleRequest(GridRestProcessor.java:203)
        at org.gridgain.grid.kernal.processors.rest.GridRestProcessor.access$100(GridRestProcessor.java:61)
        at org.gridgain.grid.kernal.processors.rest.GridRestProcessor$2.body(GridRestProcessor.java:109)
        at org.gridgain.grid.util.worker.GridWorker.run(GridWorker.java:151)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)

配置:

<bean id="grid.cfg" class="org.gridgain.grid.GridConfiguration">
    <!-- Cache configurations. -->
    <property name="cacheConfiguration">
        <list>
            <bean class="org.gridgain.grid.cache.GridCacheConfiguration">
                <property name="name" value="share-hqfx" />
                <property name="cacheMode" value="REPLICATED" />
                <property name="queryIndexEnabled" value="true" />
            </bean>
        </list>
    </property>
    <property name="restJettyPath" value="#{ systemEnvironment['GRIDGAIN_HOME'] }/config/jetty-config.xml" />

    <property name="deploymentSpi">
        <bean class="org.gridgain.grid.spi.deployment.uri.GridUriDeploymentSpi">
            <property name="temporaryDirectoryPath" value="#{ systemEnvironment['GRIDGAIN_HOME'] }/tmp/grid" />
        </bean>
    </property>

    <property name="discoverySpi">
        <bean class="org.gridgain.grid.spi.discovery.tcp.GridTcpDiscoverySpi">
            <property name="ipFinder">
                <bean class="org.gridgain.grid.spi.discovery.tcp.ipfinder.vm.GridTcpDiscoveryVmIpFinder">
                    <property name="addresses">
                        <list>
                            <!-- In distributed environment, replace with actual host IP address. -->
                            <value>127.0.0.1:47500..47509</value>
                        </list>
                    </property>
                </bean>
            </property>
        </bean>
    </property>

    <property name="deploymentMode" value="CONTINUOUS" />
</bean>

0 个答案:

没有答案