从 Docker 容器中的 Ignite 客户端连接到另一个 Docker 容器中的 Ignite 服务器问题

Connection from Ignite Client in Docker container to Ignite Server in another Docker container Issues

我已经在基于CentOS 7Docker 容器中安装了Ignite 服务器运行ning。我正在使用此命令 运行 Ignite Server Docker container:

docker run -dit --net=streams-net --name=ignite -p 47100:47100 -p 47500:47500 -p 47501:47501 -p 47502:47502 -p 47503:47503 -p 47504:47504 -p 47505:47505 -p 47506:47506 -p 47507:47507 -p 47508:47508 -p 47509:47509 -p 11211:11211 -p 49112:49112 ignite:latest

这是我的服务器配置:

<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="
        http://www.springframework.org/schema/beans
        http://www.springframework.org/schema/beans/spring-beans.xsd">
    <bean id="ignite.cfg" class="org.apache.ignite.configuration.IgniteConfiguration">
        <property name="cacheConfiguration">
            <list>
                <!-- Partitioned cache example configuration (Atomic mode). -->
                <bean class="org.apache.ignite.configuration.CacheConfiguration">
                    <property name="name" value="default"/>
                    <property name="atomicityMode" value="ATOMIC"/>
                    <property name="backups" value="1"/>
                </bean>
            </list>
        </property>

        <!-- 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">
                    <!--
                        Ignite provides several options for automatic discovery that can be used
                        instead os static IP based discovery. For information on all options refer
                        to our documentation: http://apacheignite.readme.io/docs/cluster-config
                    -->
                    <!-- Uncomment static IP finder to enable static-based discovery of initial nodes. -->
                    <!--<bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">-->
                    <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
                        <property name="addresses">
                            <list>
                                <!-- In distributed environment, replace with actual host IP address. -->
                                <value>172.20.0.2:47500..47509</value>
                            </list>
                        </property>
                    </bean>
                </property>
            </bean>
        </property>
    </bean>
</beans>

从主机 (Mac OS) 到 Docker 中的 Ignite 服务器的连接工作正常,但是当我尝试 运行 我在另一个 Docker 容器中的客户端应用程序(基于 Jboss/Wildfly 图像)出现异常。 TelnetWildfly 容器到 Ignite 容器已成功连接。

这是我的客户端代码:


        TcpDiscoveryVmIpFinder ipFinder = new TcpDiscoveryVmIpFinder();
        ipFinder.setAddresses(Arrays.asList("172.20.0.2:47500..47509"));

        TcpDiscoverySpi discoverySpi = new TcpDiscoverySpi();
        discoverySpi.setLocalPort(47500);
        discoverySpi.setLocalPortRange(9);
        discoverySpi.setIpFinder(ipFinder);

        TcpCommunicationSpi commSpi = new TcpCommunicationSpi();
        commSpi.setLocalPort(47100);

        IgniteConfiguration cfg = new IgniteConfiguration();
        cfg.setDiscoverySpi(discoverySpi);
        cfg.setCommunicationSpi(commSpi);
        cfg.setClientMode(true);
        //cfg.setPeerClassLoadingEnabled(true);

        try (Ignite ignite = Ignition.start(cfg)) {
            IgniteCache<Integer, String> cache = ignite.getOrCreateCache("data");
            for (int i = 100; i < 110; i++) {
                cache.put(i, Integer.toString(i));
                System.out.println("Record was added " + i);
            }
            Thread.sleep(999999);
        }  

这是来自客户端的日志:

2019-12-19 09:11:37,936 INFO  [io.smallrye.metrics] (MSC service thread 1-8) MicroProfile: Metrics activated
2019-12-19 09:11:38,105 INFO  [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 76) WFLYCLINF0002: Started client-mappings cache from ejb container
2019-12-19 09:11:38,713 INFO  [stdout] (ServerService Thread Pool -- 81) [09:11:38] (wrn) Failed to resolve IGNITE_HOME automatically for class codebase [class=class o.a.i.i.util.IgniteUtils, e=URI scheme is not "file"]
2019-12-19 09:11:38,715 ERROR [stderr] (ServerService Thread Pool -- 81)
2019-12-19 09:11:38,722 WARNING [] (ServerService Thread Pool -- 81) Failed to resolve default logging config file: config/java.util.logging.properties
2019-12-19 09:11:38,724 ERROR [stderr] (ServerService Thread Pool -- 81) Console logging handler is not configured.
2019-12-19 09:11:38,727 WARNING [org.apache.ignite.internal.util.typedef.G] (ServerService Thread Pool -- 81) Ignite work directory is not provided, automatically resolved to: /opt/jboss/ignite/work
2019-12-19 09:11:38,871 INFO  [org.apache.ignite.internal.IgniteKernal] (ServerService Thread Pool -- 81)

>>>    __________  ________________
>>>   /  _/ ___/ |/ /  _/_  __/ __/
>>>  _/ // (7 7    // /  / / / _/
>>> /___/\___/_/|_/___/ /_/ /___/
>>>
>>> ver. 2.7.6#20190911-sha1:21f7ca41
>>> 2019 Copyright(C) Apache Software Foundation
>>>
>>> Ignite documentation: http://ignite.apache.org

2019-12-19 09:11:38,875 INFO  [stdout] (ServerService Thread Pool -- 81) [09:11:38]    __________  ________________
2019-12-19 09:11:38,876 INFO  [stdout] (ServerService Thread Pool -- 81) [09:11:38]   /  _/ ___/ |/ /  _/_  __/ __/
2019-12-19 09:11:38,878 INFO  [stdout] (ServerService Thread Pool -- 81) [09:11:38]  _/ // (7 7    // /  / / / _/
2019-12-19 09:11:38,881 INFO  [stdout] (ServerService Thread Pool -- 81) [09:11:38] /___/\___/_/|_/___/ /_/ /___/
2019-12-19 09:11:38,881 INFO  [stdout] (ServerService Thread Pool -- 81) [09:11:38]
2019-12-19 09:11:38,883 INFO  [stdout] (ServerService Thread Pool -- 81) [09:11:38] ver. 2.7.6#20190911-sha1:21f7ca41
2019-12-19 09:11:38,884 INFO  [stdout] (ServerService Thread Pool -- 81) [09:11:38] 2019 Copyright(C) Apache Software Foundation
2019-12-19 09:11:38,885 INFO  [stdout] (ServerService Thread Pool -- 81) [09:11:38]
2019-12-19 09:11:38,886 INFO  [stdout] (ServerService Thread Pool -- 81) [09:11:38] Ignite documentation: http://ignite.apache.org
2019-12-19 09:11:38,887 INFO  [stdout] (ServerService Thread Pool -- 81) [09:11:38]
2019-12-19 09:11:38,887 INFO  [stdout] (ServerService Thread Pool -- 81) [09:11:38] Quiet mode.
2019-12-19 09:11:38,898 INFO  [stdout] (ServerService Thread Pool -- 81) [09:11:38]   ^-- Logging by 'JavaLogger [quiet=true, config=null]'
2019-12-19 09:11:38,899 INFO  [stdout] (ServerService Thread Pool -- 81) [09:11:38]   ^-- To see **FULL** console log here add -DIGNITE_QUIET=false or "-v" to ignite.{sh|bat}
2019-12-19 09:11:38,900 INFO  [stdout] (ServerService Thread Pool -- 81) [09:11:38]
2019-12-19 09:11:38,900 INFO  [org.apache.ignite.internal.IgniteKernal] (ServerService Thread Pool -- 81) Config URL: n/a
2019-12-19 09:11:38,922 INFO  [org.apache.ignite.internal.IgniteKernal] (ServerService Thread Pool -- 81) IgniteConfiguration [igniteInstanceName=null, pubPoolSize=8, svcPoolSize=8, callbackPoolSize=8, stripedPoolSize=8, sysPoolSize=8, mgmtPoolSize=4, igfsPoolSize=4, dataStreamerPoolSize=8, utilityCachePoolSize=8, utilityCacheKeepAliveTime=60000, p2pPoolSize=2, qryPoolSize=8, igniteHome=null, igniteWorkDir=/opt/jboss/ignite/work, mbeanSrv=org.jboss.as.jmx.PluggableMBeanServerImpl@6dfabbe3, nodeId=518ef744-d8da-41e4-a907-a2d8b541e89c, marsh=BinaryMarshaller [], marshLocJobs=false, daemon=false, p2pEnabled=false, netTimeout=5000, sndRetryDelay=1000, sndRetryCnt=3, metricsHistSize=10000, metricsUpdateFreq=2000, metricsExpTime=9223372036854775807, discoSpi=TcpDiscoverySpi [addrRslvr=null, sockTimeout=0, ackTimeout=0, marsh=null, reconCnt=10, reconDelay=2000, maxAckTimeout=600000, forceSrvMode=false, clientReconnectDisabled=false, internalLsnr=null], segPlc=STOP, segResolveAttempts=2, waitForSegOnStart=true, allResolversPassReq=true, segChkFreq=10000, commSpi=TcpCommunicationSpi [connectGate=null, connPlc=org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi$FirstConnectionPolicy@612791b7, enableForcibleNodeKill=false, enableTroubleshootingLog=false, locAddr=null, locHost=null, locPort=47100, locPortRange=100, shmemPort=-1, directBuf=true, directSndBuf=false, idleConnTimeout=600000, connTimeout=5000, maxConnTimeout=600000, reconCnt=10, sockSndBuf=32768, sockRcvBuf=32768, msgQueueLimit=0, slowClientQueueLimit=0, nioSrvr=null, shmemSrv=null, usePairedConnections=false, connectionsPerNode=1, tcpNoDelay=true, filterReachableAddresses=false, ackSndThreshold=32, unackedMsgsBufSize=0, sockWriteTimeout=2000, boundTcpPort=-1, boundTcpShmemPort=-1, selectorsCnt=4, selectorSpins=0, addrRslvr=null, ctxInitLatch=java.util.concurrent.CountDownLatch@3ba79825[Count = 1], stopping=false], evtSpi=org.apache.ignite.spi.eventstorage.NoopEventStorageSpi@56c02b1c, colSpi=NoopCollisionSpi [], deploySpi=LocalDeploymentSpi [], indexingSpi=org.apache.ignite.spi.indexing.noop.NoopIndexingSpi@7368d9cb, addrRslvr=null, encryptionSpi=org.apache.ignite.spi.encryption.noop.NoopEncryptionSpi@24279471, clientMode=true, rebalanceThreadPoolSize=1, 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=60000, hadoopCfg=null, 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, sslCtxFactory=null, 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, activeOnStart=true, autoActivation=true, longQryWarnTimeout=3000, sqlConnCfg=null, cliConnCfg=ClientConnectorConfiguration [host=null, port=10800, portRange=100, sockSndBufSize=0, sockRcvBufSize=0, tcpNoDelay=true, maxOpenCursorsPerConn=128, threadPoolSize=8, idleTimeout=0, jdbcEnabled=true, odbcEnabled=true, thinCliEnabled=true, sslEnabled=false, useIgniteSslCtxFactory=true, sslClientAuth=false, sslCtxFactory=null], mvccVacuumThreadCnt=2, mvccVacuumFreq=5000, authEnabled=false, failureHnd=null, commFailureRslvr=null]
2019-12-19 09:11:38,923 INFO  [org.apache.ignite.internal.IgniteKernal] (ServerService Thread Pool -- 81) Daemon mode: off
2019-12-19 09:11:38,925 INFO  [stdout] (ServerService Thread Pool -- 81) [09:11:38] OS: Linux 4.9.184-linuxkit amd64
2019-12-19 09:11:38,926 INFO  [org.apache.ignite.internal.IgniteKernal] (ServerService Thread Pool -- 81) OS: Linux 4.9.184-linuxkit amd64
2019-12-19 09:11:38,927 INFO  [org.apache.ignite.internal.IgniteKernal] (ServerService Thread Pool -- 81) OS user: jboss
2019-12-19 09:11:38,937 INFO  [org.apache.ignite.internal.IgniteKernal] (ServerService Thread Pool -- 81) PID: 318
2019-12-19 09:11:38,938 INFO  [stdout] (ServerService Thread Pool -- 81) [09:11:38] VM information: OpenJDK Runtime Environment 11.0.5+10-LTS Oracle Corporation OpenJDK 64-Bit Server VM 11.0.5+10-LTS
2019-12-19 09:11:38,939 INFO  [org.apache.ignite.internal.IgniteKernal] (ServerService Thread Pool -- 81) Language runtime: Java Platform API Specification ver. 11
2019-12-19 09:11:38,940 INFO  [org.apache.ignite.internal.IgniteKernal] (ServerService Thread Pool -- 81) VM information: OpenJDK Runtime Environment 11.0.5+10-LTS Oracle Corporation OpenJDK 64-Bit Server VM 11.0.5+10-LTS
2019-12-19 09:11:38,941 INFO  [org.apache.ignite.internal.IgniteKernal] (ServerService Thread Pool -- 81) VM total memory: 0.5GB
2019-12-19 09:11:38,942 INFO  [org.apache.ignite.internal.IgniteKernal] (ServerService Thread Pool -- 81) Remote Management [restart: off, REST: off, JMX (remote: off)]
2019-12-19 09:11:38,943 INFO  [org.apache.ignite.internal.IgniteKernal] (ServerService Thread Pool -- 81) Logger: JavaLogger [quiet=true, config=null]
2019-12-19 09:11:38,943 INFO  [org.apache.ignite.internal.IgniteKernal] (ServerService Thread Pool -- 81) IGNITE_HOME=null
2019-12-19 09:11:38,944 INFO  [org.apache.ignite.internal.IgniteKernal] (ServerService Thread Pool -- 81) VM arguments: [-D[Standalone], -Xms64m, -Xmx512m, -XX:MetaspaceSize=96M, -XX:MaxMetaspaceSize=256m, -Djava.net.preferIPv4Stack=true, -Djboss.modules.system.pkgs=org.jboss.byteman, -Djava.awt.headless=true, --add-exports=java.base/sun.nio.ch=ALL-UNNAMED, --add-exports=jdk.unsupported/sun.misc=ALL-UNNAMED, --add-exports=jdk.unsupported/sun.reflect=ALL-UNNAMED, -Dorg.jboss.boot.log.file=/opt/jboss/wildfly/standalone/log/server.log, -Dlogging.configuration=file:/opt/jboss/wildfly/standalone/configuration/logging.properties]
2019-12-19 09:11:38,957 INFO  [org.apache.ignite.internal.IgniteKernal] (ServerService Thread Pool -- 81) Configured caches [in 'sysMemPlc' dataRegion: ['ignite-sys-cache']]
2019-12-19 09:11:38,967 WARNING [org.apache.ignite.internal.GridDiagnostic] (pub-#22) Initial heap size is 64MB (should be no less than 512MB, use -Xms512m -Xmx512m).
2019-12-19 09:11:38,978 INFO  [stdout] (pub-#22) [09:11:38] Initial heap size is 64MB (should be no less than 512MB, use -Xms512m -Xmx512m).
2019-12-19 09:11:39,063 INFO  [stdout] (ServerService Thread Pool -- 81) [09:11:39] Configured plugins:
2019-12-19 09:11:39,064 INFO  [org.apache.ignite.internal.processors.plugin.IgnitePluginProcessor] (ServerService Thread Pool -- 81) Configured plugins:
2019-12-19 09:11:39,064 INFO  [stdout] (ServerService Thread Pool -- 81) [09:11:39]   ^-- None
2019-12-19 09:11:39,065 INFO  [org.apache.ignite.internal.processors.plugin.IgnitePluginProcessor] (ServerService Thread Pool -- 81)   ^-- None
2019-12-19 09:11:39,066 INFO  [stdout] (ServerService Thread Pool -- 81) [09:11:39]
2019-12-19 09:11:39,067 INFO  [org.apache.ignite.internal.processors.plugin.IgnitePluginProcessor] (ServerService Thread Pool -- 81)
2019-12-19 09:11:39,071 INFO  [stdout] (ServerService Thread Pool -- 81) [09:11:39] Configured failure handler: [hnd=StopNodeOrHaltFailureHandler [tryStop=false, timeout=0, super=AbstractFailureHandler [ignoredFailureTypes=[SYSTEM_WORKER_BLOCKED, SYSTEM_CRITICAL_OPERATION_TIMEOUT]]]]
2019-12-19 09:11:39,071 INFO  [org.apache.ignite.internal.processors.failure.FailureProcessor] (ServerService Thread Pool -- 81) Configured failure handler: [hnd=StopNodeOrHaltFailureHandler [tryStop=false, timeout=0, super=AbstractFailureHandler [ignoredFailureTypes=[SYSTEM_WORKER_BLOCKED, SYSTEM_CRITICAL_OPERATION_TIMEOUT]]]]
2019-12-19 09:11:39,121 INFO  [org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi] (ServerService Thread Pool -- 81) Successfully bound communication NIO server to TCP port [port=47100, locHost=0.0.0.0/0.0.0.0, selectorsCnt=4, selectorSpins=0, pairedConn=false]
2019-12-19 09:11:39,125 WARNING [org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi] (ServerService Thread Pool -- 81) Message queue limit is set to 0 which may lead to potential OOMEs when running cache operations in FULL_ASYNC or PRIMARY_SYNC modes due to message queues growth on sender and receiver sides.
2019-12-19 09:11:39,126 INFO  [stdout] (ServerService Thread Pool -- 81) [09:11:39] Message queue limit is set to 0 which may lead to potential OOMEs when running cache operations in FULL_ASYNC or PRIMARY_SYNC modes due to message queues growth on sender and receiver sides.
2019-12-19 09:11:39,147 WARNING [org.apache.ignite.spi.checkpoint.noop.NoopCheckpointSpi] (ServerService Thread Pool -- 81) Checkpoints are disabled (to enable configure any GridCheckpointSpi implementation)
2019-12-19 09:11:39,183 WARNING [org.apache.ignite.internal.managers.collision.GridCollisionManager] (ServerService Thread Pool -- 81) Collision resolution is disabled (all jobs will be activated upon arrival).
2019-12-19 09:11:39,190 INFO  [stdout] (ServerService Thread Pool -- 81) [09:11:39] Security status [authentication=off, tls/ssl=off]
2019-12-19 09:11:39,191 INFO  [org.apache.ignite.internal.IgniteKernal] (ServerService Thread Pool -- 81) Security status [authentication=off, tls/ssl=off]
2019-12-19 09:11:39,341 SEVERE [org.apache.ignite.internal.IgniteKernal] (ServerService Thread Pool -- 81) Exception during start processors, node will be stopped and close connections: class org.apache.ignite.binary.BinaryObjectException: Failed to find empty constructor for class: org.apache.ignite.internal.processors.platform.websession.PlatformDotNetSessionLockResult
    at deployment.StreamsApp.ear//org.apache.ignite.internal.binary.BinaryClassDescriptor.constructor(BinaryClassDescriptor.java:981)
    at deployment.StreamsApp.ear//org.apache.ignite.internal.binary.BinaryClassDescriptor.<init>(BinaryClassDescriptor.java:267)
    at deployment.StreamsApp.ear//org.apache.ignite.internal.binary.BinaryContext.registerPredefinedType(BinaryContext.java:1063)
    at deployment.StreamsApp.ear//org.apache.ignite.internal.binary.BinaryContext.registerPredefinedType(BinaryContext.java:1048)

2019-12-19 09:11:39,355 SEVERE [org.apache.ignite.internal.IgniteKernal] (ServerService Thread Pool -- 81) Got exception while starting (will rollback startup routine).: class org.apache.ignite.binary.BinaryObjectException: Failed to find empty constructor for class: org.apache.ignite.internal.processors.platform.websession.PlatformDotNetSessionLockResult
    at deployment.StreamsApp.ear//org.apache.ignite.internal.binary.BinaryClassDescriptor.constructor(BinaryClassDescriptor.java:981)
    at deployment.StreamsApp.ear//org.apache.ignite.internal.binary.BinaryClassDescriptor.<init>(BinaryClassDescriptor.java:267)
    at deployment.StreamsApp.ear//org.apache.ignite.internal.binary.BinaryContext.registerPredefinedType(BinaryContext.java:1063)
    at deployment.StreamsApp.ear//org.apache.ignite.internal.binary.BinaryContext.registerPredefinedType(BinaryContext.java:1048)
    at deployment.StreamsApp.ear//org.apache.ignite.internal.binary.BinaryContext.<init>(BinaryContext.java:350)
    at deployment.StreamsApp.ear//org.apache.ignite.internal.processors.cache.binary.CacheObjectBinaryProcessorImpl.start(CacheObjectBinaryProcessorImpl.java:208)
    at deployment.StreamsApp.ear//org.apache.ignite.internal.IgniteKernal.startProcessor(IgniteKernal.java:1700)
    at deployment.StreamsApp.ear//org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:1013)
    at deployment.StreamsApp.ear//org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:2038)
    at org.jboss.as.ee@18.0.1.Final//org.jboss.as.ee.component.BasicComponent.createInstance(BasicComponent.java:88)
    at org.jboss.as.ejb3@18.0.1.Final//org.jboss.as.ejb3.component.singleton.SingletonComponent.getComponentInstance(SingletonComponent.java:127)
    at org.jboss.as.ejb3@18.0.1.Final//org.jboss.as.ejb3.component.singleton.SingletonComponent.start(SingletonComponent.java:141)
    at org.jboss.as.ee@18.0.1.Final//org.jboss.as.ee.component.ComponentStartService.run(ComponentStartService.java:54)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at org.jboss.threads@2.3.3.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
    at org.jboss.threads@2.3.3.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1982)
    at org.jboss.threads@2.3.3.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
    at org.jboss.threads@2.3.3.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1348)
    at java.base/java.lang.Thread.run(Thread.java:834)
    at org.jboss.threads@2.3.3.Final//org.jboss.threads.JBossThread.run(JBossThread.java:485)

2019-12-19 09:11:39,364 WARNING [org.apache.ignite.internal.IgniteKernal] (ServerService Thread Pool -- 81) Attempt to stop starting grid. This operation cannot be guaranteed to be successful.
2019-12-19 09:11:39,380 INFO  [stdout] (ServerService Thread Pool -- 81) [09:11:39] Ignite node stopped OK [uptime=00:00:02.180]
2019-12-19 09:11:39,381 INFO  [org.apache.ignite.internal.IgniteKernal] (ServerService Thread Pool -- 81)

>>> +---------------------------------------------------------------------------------+
>>> Ignite ver. 2.7.6#20190911-sha1:21f7ca41c4348909e2fd26ccf59b5b2ce1f4474e stopped OK
>>> +---------------------------------------------------------------------------------+
>>> Grid uptime: 00:00:02.180


2019-12-19 09:11:39,404 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 81) MSC000001: Failed to start service jboss.deployment.subunit."StreamsApp.ear"."Streams.jar".component.Main.START: org.jboss.msc.service.StartException in service jboss.deployment.subunit."StreamsApp.ear"."Streams.jar".component.Main.START: java.lang.IllegalStateException: WFLYEE0042: Failed to construct component instance
    at org.jboss.as.ee@18.0.1.Final//org.jboss.as.ee.component.ComponentStartService.run(ComponentStartService.java:57)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at org.jboss.threads@2.3.3.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
    at org.jboss.threads@2.3.3.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1982)
    at org.jboss.threads@2.3.3.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
    at org.jboss.threads@2.3.3.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1348)
    at java.base/java.lang.Thread.run(Thread.java:834)
    at org.jboss.threads@2.3.3.Final//org.jboss.threads.JBossThread.run(JBossThread.java:485)
Caused by: java.lang.IllegalStateException: WFLYEE0042: Failed to construct component instance
    at org.jboss.as.ee@18.0.1.Final//org.jboss.as.ee.component.BasicComponent.constructComponentInstance(BasicComponent.java:163)
    at org.jboss.as.ee@18.0.1.Final//org.jboss.as.ee.component.BasicComponent.constructComponentInstance(BasicComponent.java:134)
    at org.jboss.as.ee@18.0.1.Final//org.jboss.as.ee.component.BasicComponent.createInstance(BasicComponent.java:88)
    at org.jboss.as.ejb3@18.0.1.Final//org.jboss.as.ejb3.component.singleton.SingletonComponent.getComponentInstance(SingletonComponent.java:127)
    at org.jboss.as.ejb3@18.0.1.Final//org.jboss.as.ejb3.component.singleton.SingletonComponent.start(SingletonComponent.java:141)
    at org.jboss.as.ee@18.0.1.Final//org.jboss.as.ee.component.ComponentStartService.run(ComponentStartService.java:54)
    ... 8 more
Caused by: javax.ejb.EJBException: class org.apache.ignite.binary.BinaryObjectException: Failed to find empty constructor for class: org.apache.ignite.internal.processors.platform.websession.PlatformDotNetSessionLockResult
    at org.jboss.as.ejb3@18.0.1.Final//org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:246)

    ... 13 more
Caused by: class org.apache.ignite.binary.BinaryObjectException: Failed to find empty constructor for class: org.apache.ignite.internal.processors.platform.websession.PlatformDotNetSessionLockResult
    at deployment.StreamsApp.ear//org.apache.ignite.internal.binary.BinaryClassDescriptor.constructor(BinaryClassDescriptor.java:981)
    at deployment.StreamsApp.ear//org.apache.ignite.internal.binary.BinaryClassDescriptor.<init>(BinaryClassDescriptor.java:267)
    at deployment.StreamsApp.ear//org.apache.ignite.internal.binary.BinaryContext.registerPredefinedType(BinaryContext.java:1063)
    at deployment.StreamsApp.ear.Streams.jar//ru.sbrf.streams.cache.IgniteInitializer.init(IgniteInitializer.java:34)
    at deployment.StreamsApp.ear.Streams.jar//ru.sbrf.streams.Main.startup(Main.java:23)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at org.jboss.as.ee@18.0.1.Final//org.jboss.as.ee.component.ManagedReferenceLifecycleMethodInterceptor.processInvocation(ManagedReferenceLifecycleMethodInterceptor.java:96)
    at org.jboss.invocation@1.5.2.Final//org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
    at org.jboss.invocation@1.5.2.Final//org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:509)
    at org.jboss.as.weld.common@18.0.1.Final//org.jboss.as.weld.interceptors.Jsr299BindingsInterceptor.delegateInterception(Jsr299BindingsInterceptor.java:79)
    at org.jboss.as.weld.common@18.0.1.Final//org.jboss.as.weld.interceptors.Jsr299BindingsInterceptor.doLifecycleInterception(Jsr299BindingsInterceptor.java:126)
    at org.jboss.as.weld.common@18.0.1.Final//org.jboss.as.weld.interceptors.Jsr299BindingsInterceptor.processInvocation(Jsr299BindingsInterceptor.java:112)
    at org.jboss.invocation@1.5.2.Final//org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
    at org.jboss.invocation@1.5.2.Final//org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:509)
    at org.jboss.weld.core@3.1.2.Final//org.jboss.weld.module.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:81)
    at org.jboss.as.weld.common@18.0.1.Final//org.jboss.as.weld.ejb.EjbRequestScopeActivationInterceptor.processInvocation(EjbRequestScopeActivationInterceptor.java:89)
    at org.jboss.invocation@1.5.2.Final//org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
    at org.jboss.as.ee@18.0.1.Final//org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50)
    at org.jboss.invocation@1.5.2.Final//org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
    at org.jboss.as.ejb3@18.0.1.Final//org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:237)
    ... 28 more

2019-12-19 09:11:39,471 ERROR [org.jboss.as.controller.management-operation] (DeploymentScanner-threads - 2) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "StreamsApp.ear")]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.deployment.subunit.\"StreamsApp.ear\".\"Streams.jar\".component.Main.START" => "java.lang.IllegalStateException: WFLYEE0042: Failed to construct component instance
    Caused by: java.lang.IllegalStateException: WFLYEE0042: Failed to construct component instance
    Caused by: javax.ejb.EJBException: class org.apache.ignite.binary.BinaryObjectException: Failed to find empty constructor for class: org.apache.ignite.internal.processors.platform.websession.PlatformDotNetSessionLockResult
    Caused by: class org.apache.ignite.binary.BinaryObjectException: Failed to find empty constructor for class: org.apache.ignite.internal.processors.platform.websession.PlatformDotNetSessionLockResult"}}
2019-12-19 09:11:39,546 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) WFLYSRV0010: Deployed "StreamsApp.ear" (runtime-name : "StreamsApp.ear")
2019-12-19 09:11:39,548 INFO  [org.jboss.as.controller] (DeploymentScanner-threads - 2) WFLYCTL0183: Service status report
WFLYCTL0186:   Services which failed to start:      service jboss.deployment.subunit."StreamsApp.ear"."Streams.jar".component.Main.START: java.lang.IllegalStateException: WFLYEE0042: Failed to construct component instance
WFLYCTL0448: 2 additional services are down due to their dependencies being missing or failed

要解决这个问题,您需要添加包含以下内容的文件 IgniteApp/src/main/application/META-INF/jboss-deployment-structure.xml

<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.1">
    <deployment>
        <dependencies>
            <system export="true">
                <paths>
                    <path name="sun/reflect"/>
                </paths>
            </system>
        </dependencies>
    </deployment>
</jboss-deployment-structure>

这是根据

之后,客户端节点将正常启动。我无法检查它是否可以使用您提供的配置连接到 docker 化的服务器节点。

请注意,在使用 Java 11.

时,您可能需要通过 -e JAVA_OPTS='...' docker 选项 as per Ignite documentation 添加一些 JVM args

我已经提交了一个 JIRA 问题来处理这个可用性问题:IGNITE-12483