Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

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

Ask Question

I have installed Ignite server running inside Docker container based on CentOS 7 . I'm using this command to run 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

Here is my server config:

<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">
                <!-- 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">
                                <!-- 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>

The connection from the host machine (Mac OS) to Ignite server in Docker is working and its fine, but when I'm trying to run my client application in another Docker container (based on Jboss/Wildfly image) I get an exception. Telnet from Wildfly container to Ignite container is successfully connected.

Here is my client code:

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);

Here is log from client:

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
>>> 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,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$1.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$1.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$1.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
                I think there is some limitation/restriction of reflection imposed by JBoss which prevents Ignite node from starting correctly. Can you put together a reproducer to a Github somewhere?
– alamar
                Dec 19, 2019 at 11:38
                Excuse me, but I don't understand your question. What is reproducer? And what I need to put together to a Github?
– msavenko
                Dec 19, 2019 at 12:13
                You need to figure out the minimal runnable self-contained code which shows this behavior, and put it somewhere so that we could look at it.
– alamar
                Dec 19, 2019 at 12:17
                OK. There is nothing unusual here. This code works fine outside from the Docker container when app deployed in Wildfly and it throws Ecxeption when I`m trying to run it inside Docker. drive.google.com/open?id=1Dl-MjIJatfBUawlc0MoY1sBCwz-tu24u
– msavenko
                Dec 19, 2019 at 12:58
                Can you share a Dockerfile or command line for the problematic client image? Please make effort to provide a runnable reproducer, not just source code which requires a lot of guessing and setting up.
– alamar
                Dec 19, 2019 at 13:15

To get rid of this problem, you need to add the file IgniteApp/src/main/application/META-INF/jboss-deployment-structure.xml with the following content:

<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>

This is as per Mockito, Java 9 and java.lang.ClassNotFoundException: sun.reflect.ReflectionFactory

After that, the client node will start without errors. I were not able to check whether it can connect to dockerized server node with the configuration(s) that you have provided.

Please note that you may need to add some JVM args via -e JAVA_OPTS='...' docker option as per Ignite documentation when using Java 11.

I have filed a JIRA issue to deal with this usability problem: IGNITE-12483

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question. Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.