I am trying to run Ignite on my local machine and faced a problem. When I specify localhost address and port for TcpDiscoveryVmIpFinder the ignite doesn't start. It is stuck and I have the following in the logs:
2019-04-17 16:45:57 DEBUG [ ] TcpDiscoverySpi:123 - Registered SPI MBean: org.apache:clsLdr=3053903b,group=SPIs,name=TcpDiscoverySpi
2019-04-17 16:45:57 DEBUG [ ] TcpDiscoverySpi:123 - Connection check frequency is calculated: 3333
2019-04-17 16:45:57 DEBUG [ ] TcpDiscoverySpi:123 - Message worker started [locNodeId=975988a6-0da5-4dc6-a3f6-2e601aa8b4f4]
2019-04-17 16:45:57 DEBUG [ ] TcpDiscoverySpi:123 - Failed to bind to local port (will try next port within range) [port=47500, localHost=0.0.0.0/0.0.0.0]
2019-04-17 16:45:57 DEBUG [ ] TcpDiscoverySpi:123 - Failed to bind to local port (will try next port within range) [port=47501, localHost=0.0.0.0/0.0.0.0]
2019-04-17 16:45:57 INFO [ ] TcpDiscoverySpi:128 - Successfully bound to TCP port [port=47502, localHost=0.0.0.0/0.0.0.0, locNodeId=975988a6-0da5-4dc6-a3f6-2e601aa8b4f4]
2019-04-17 16:45:57 DEBUG [ ] TcpDiscoverySpi:123 - Local node initialized: TcpDiscoveryNode [id=975988a6-0da5-4dc6-a3f6-2e601aa8b4f4, addrs=[0:0:0:0:0:0:0:1%lo0, ..., 127.0.0.1], sockAddrs=[/[]:47502, /0:0:0:0:0:0:0:1%lo0:47502, /127.0.0.1:47502], discPort=47502, order=0, intOrder=0, lastExchangeTime=1555544757964, loc=true, ver=2.3.0#20171027-sha1:8add7fd5, isClient=false]
2019-04-17 16:45:57 DEBUG [ ] GridContinuousProcessor:123 - collectDiscoveryData [node=975988a6-0da5-4dc6-a3f6-2e601aa8b4f4, loc=975988a6-0da5-4dc6-a3f6-2e601aa8b4f4, locInfos={}, clientInfos={}]
2019-04-17 16:45:58 DEBUG [ ] TcpDiscoverySpi:123 - Message has been sent directly to address [msg=TcpDiscoveryJoinRequestMessage [node=TcpDiscoveryNode [id=975988a6-0da5-4dc6-a3f6-2e601aa8b4f4, addrs=[0:0:0:0:0:0:0:1%lo0, [local_network_address], 127.0.0.1], sockAddrs=[/[local_network_address]:47502, /0:0:0:0:0:0:0:1%lo0:47502, /127.0.0.1:47502], discPort=47502, order=0, intOrder=0, lastExchangeTime=1555544757964, loc=true, ver=2.3.0#20171027-sha1:8add7fd5, isClient=false], dataPacket=org.apache.ignite.spi.discovery.tcp.internal.DiscoveryDataPacket@1662cf61, super=TcpDiscoveryAbstractMessage [sndNodeId=null, id=85321bd2a61-975988a6-0da5-4dc6-a3f6-2e601aa8b4f4, verifierNodeId=null, topVer=0, pendingIdx=0, failedNodes=null, isClient=false]], addr=/127.0.0.1:47500, rmtNodeId=01b0888d-83f1-49a7-8333-bacf66e2e843]
2019-04-17 16:45:58 DEBUG [ ] TcpDiscoverySpi:123 - Concurrent discovery SPI start has been detected (local node should wait).
2019-04-17 16:45:58 DEBUG [ ] GridTimeoutProcessor:123 - Timeout has occurred [obj=CancelableTask [id=65321bd2a61-c88dcf6f-fcc3-4bde-97a6-f74d94cb4e00, endTime=1555544758778, period=3000, cancel=false, task=org.apache.ignite.internal.processors.query.GridQueryProcessor$2@50612dbb], process=true]
2019-04-17 16:46:00 DEBUG [ ] TcpDiscoverySpi:123 - Message has been sent directly to address [msg=TcpDiscoveryJoinRequestMessage [node=TcpDiscoveryNode [id=975988a6-0da5-4dc6-a3f6-2e601aa8b4f4, addrs=[0:0:0:0:0:0:0:1%lo0, [local_network_address], 127.0.0.1], sockAddrs=[/[local_network_address]:47502, /0:0:0:0:0:0:0:1%lo0:47502, /127.0.0.1:47502], discPort=47502, order=0, intOrder=0, lastExchangeTime=1555544757964, loc=true, ver=2.3.0#20171027-sha1:8add7fd5, isClient=false], dataPacket=org.apache.ignite.spi.discovery.tcp.internal.DiscoveryDataPacket@1662cf61, super=TcpDiscoveryAbstractMessage [sndNodeId=null, id=85321bd2a61-975988a6-0da5-4dc6-a3f6-2e601aa8b4f4, verifierNodeId=null, topVer=0, pendingIdx=0, failedNodes=null, isClient=false]], addr=/127.0.0.1:47500, rmtNodeId=01b0888d-83f1-49a7-8333-bacf66e2e843]
2019-04-17 16:46:00 DEBUG [ ] TcpDiscoverySpi:123 - Concurrent discovery SPI start has been detected (local node should wait).
2019-04-17 16:46:00 DEBUG [ ] TcpCommunicationSpi:123 - Balancing data [min0=0, minIdx=0, max0=-1, maxIdx=-1]
2019-04-17 16:46:00 DEBUG [ ] ClientListenerProcessor:123 - Balancing data [min0=0, minIdx=0, max0=-1, maxIdx=-1]
2019-04-17 16:46:00 DEBUG [ ] GridTcpRestProtocol:123 - Balancing data [min0=0, minIdx=0, max0=-1, maxIdx=-1]
2019-04-17 16:46:00 DEBUG [ ] GridTimeoutProcessor:123 - Timeout has occurred [obj=CancelableTask [id=85321bd2a61-c88dcf6f-fcc3-4bde-97a6-f74d94cb4e00, endTime=1555544760928, period=3000, cancel=false, task=MetricsUpdater [prevGcTime=-1, prevCpuTime=-1, super=org.apache.ignite.internal.managers.discovery.GridDiscoveryManager$MetricsUpdater@10c6eb9b]], process=true]
2019-04-17 16:46:01 DEBUG [ ] GridTimeoutProcessor:123 - Timeout has occurred [obj=CancelableTask [id=65321bd2a61-c88dcf6f-fcc3-4bde-97a6-f74d94cb4e00, endTime=1555544761782, period=3000, cancel=false, task=org.apache.ignite.internal.processors.query.GridQueryProcessor$2@50612dbb], process=true]
2019-04-17 16:46:02 DEBUG [ ] TcpDiscoverySpi:123 - Message has been sent directly to address [msg=TcpDiscoveryJoinRequestMessage [node=TcpDiscoveryNode [id=975988a6-0da5-4dc6-a3f6-2e601aa8b4f4, addrs=[0:0:0:0:0:0:0:1%lo0, [local_network_address], 127.0.0.1], sockAddrs=[/[local_network_address]:47502, /0:0:0:0:0:0:0:1%lo0:47502, /127.0.0.1:47502], discPort=47502, order=0, intOrder=0, lastExchangeTime=1555544757964, loc=true, ver=2.3.0#20171027-sha1:8add7fd5, isClient=false], dataPacket=org.apache.ignite.spi.discovery.tcp.internal.DiscoveryDataPacket@1662cf61, super=TcpDiscoveryAbstractMessage [sndNodeId=null, id=85321bd2a61-975988a6-0da5-4dc6-a3f6-2e601aa8b4f4, verifierNodeId=null, topVer=0, pendingIdx=0, failedNodes=null, isClient=false]], addr=/127.0.0.1:47500, rmtNodeId=01b0888d-83f1-49a7-8333-bacf66e2e843]
2019-04-17 16:46:02 DEBUG [ ] TcpDiscoverySpi:123 - Concurrent discovery SPI start has been detected (local node should wait).
2019-04-17 16:46:02 DEBUG [ ] GridTimeoutProcessor:123 - Timeout has occurred [obj=CancelableTask [id=55321bd2a61-c88dcf6f-fcc3-4bde-97a6-f74d94cb4e00, endTime=1555544762764, period=10000, cancel=false, task=org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing$11@8c0f063], process=true]
2019-04-17 16:46:03 DEBUG [ ] GridTimeoutProcessor:123 - Timeout has occurred [obj=CancelableTask [id=85321bd2a61-c88dcf6f-fcc3-4bde-97a6-f74d94cb4e00, endTime=1555544763951, period=3000, cancel=false, task=MetricsUpdater [prevGcTime=101, prevCpuTime=3990, super=org.apache.ignite.internal.managers.discovery.GridDiscoveryManager$MetricsUpdater@10c6eb9b]], process=true]
2019-04-17 16:46:04 DEBUG [ ] TcpDiscoverySpi:123 - Message has been added to queue: TcpDiscoveryStatusCheckMessage [creatorNode=TcpDiscoveryNode [id=975988a6-0da5-4dc6-a3f6-2e601aa8b4f4, addrs=[0:0:0:0:0:0:0:1%lo0, [local_network_address], 127.0.0.1], sockAddrs=[/[local_network_address]:47502, /0:0:0:0:0:0:0:1%lo0:47502, /127.0.0.1:47502], discPort=47502, order=0, intOrder=0, lastExchangeTime=1555544757964, loc=true, ver=2.3.0#20171027-sha1:8add7fd5, isClient=false], failedNodeId=null, status=0, super=TcpDiscoveryAbstractMessage [sndNodeId=null, id=56321bd2a61-975988a6-0da5-4dc6-a3f6-2e601aa8b4f4, verifierNodeId=null, topVer=0, pendingIdx=0, failedNodes=null, isClient=false]]
2019-04-17 16:46:04 DEBUG [ ] TcpDiscoverySpi:123 - Processing message [cls=TcpDiscoveryStatusCheckMessage, id=56321bd2a61-975988a6-0da5-4dc6-a3f6-2e601aa8b4f4]
2019-04-17 16:46:04 DEBUG [ ] TcpDiscoverySpi:123 - Ignore message, local node order is not initialized [msg=TcpDiscoveryStatusCheckMessage [creatorNode=TcpDiscoveryNode [id=975988a6-0da5-4dc6-a3f6-2e601aa8b4f4, addrs=[0:0:0:0:0:0:0:1%lo0, [local_network_address], 127.0.0.1], sockAddrs=[/[local_network_address]:47502, /0:0:0:0:0:0:0:1%lo0:47502, /127.0.0.1:47502], discPort=47502, order=0, intOrder=0, lastExchangeTime=1555544757964, loc=true, ver=2.3.0#20171027-sha1:8add7fd5, isClient=false], failedNodeId=null, status=0, super=TcpDiscoveryAbstractMessage [sndNodeId=null, id=56321bd2a61-975988a6-0da5-4dc6-a3f6-2e601aa8b4f4, verifierNodeId=null, topVer=0, pendingIdx=0, failedNodes=null, isClient=false]], locNode=TcpDiscoveryNode [id=975988a6-0da5-4dc6-a3f6-2e601aa8b4f4, addrs=[0:0:0:0:0:0:0:1%lo0, [local_network_address], 127.0.0.1], sockAddrs=[/[local_network_address]:47502, /0:0:0:0:0:0:0:1%lo0:47502, /127.0.0.1:47502], discPort=47502, order=0, intOrder=0, lastExchangeTime=1555544757964, loc=true, ver=2.3.0#20171027-sha1:8add7fd5, isClient=false]]
2019-04-17 16:46:04 DEBUG [ ] TcpDiscoverySpi:123 - Message has been sent directly to address [msg=TcpDiscoveryJoinRequestMessage [node=TcpDiscoveryNode [id=975988a6-0da5-4dc6-a3f6-2e601aa8b4f4, addrs=[0:0:0:0:0:0:0:1%lo0, [local_network_address], 127.0.0.1], sockAddrs=[/[local_network_address]:47502, /0:0:0:0:0:0:0:1%lo0:47502, /127.0.0.1:47502], discPort=47502, order=0, intOrder=0, lastExchangeTime=1555544757964, loc=true, ver=2.3.0#20171027-sha1:8add7fd5, isClient=false], dataPacket=org.apache.ignite.spi.discovery.tcp.internal.DiscoveryDataPacket@1662cf61, super=TcpDiscoveryAbstractMessage [sndNodeId=null, id=85321bd2a61-975988a6-0da5-4dc6-a3f6-2e601aa8b4f4, verifierNodeId=null, topVer=0, pendingIdx=0, failedNodes=null, isClient=false]], addr=/127.0.0.1:47500, rmtNodeId=01b0888d-83f1-49a7-8333-bacf66e2e843]
2019-04-17 16:46:04 DEBUG [ ] TcpDiscoverySpi:123 - Concurrent discovery SPI start has been detected (local node should wait).
...
My config:
<bean id="ignite" class="org.apache.ignite.IgniteSpringBean">
<property name="configuration">
<bean id="ignite.cfg" class="org.apache.ignite.configuration.IgniteConfiguration">
<property name="includeEventTypes">
<util:constant static-field="org.apache.ignite.events.EventType.EVTS_CACHE"/>
</property>
<property name="metricsLogFrequency" value="${metricsLogFrequency:0}"/>
<property name="cacheConfiguration">
<list>
<ref bean="authCacheConfig"/>
<ref bean="sessionCacheConfig"/>
<ref bean="loginCacheConfig"/>
</list>
</property>
<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">
<property name="addresses">
<list>
<value>127.0.0.1:47500</value>
</list>
</property>
</bean>
</property>
</bean>
</property>
</bean>
</property>
</bean>
I tried to play with different ports, localhost instead of 127.0.0.1, but it didn't help. Any idea what's missing here?
P.S. After additional debugging I found out that, we are sending a message here: org.apache.ignite.spi.discovery.tcp.ServerImpl#sendJoinRequestMessage and receiving RES_WAIT(200) and retrying the same over and over again.
Node should be able to discover itself.
In your case it does not seem to be the case. It has bound to port 27502
, it can't find Ignite cluster at 127.0.0.1:47500
.
Either add port range to VmFinder list or reduce localPortRange
to 1.