Hello,
I am aware that this issue has been discussed in this forum in past. But
none of the resolution steps given helped resolve this.
I am facing the below issues ;
1. Apache Ignite version 2.6.0, [ issue occurs in versions 2.5.0, 2.4.0
]
IntelliJ
Spark-scala
Machine : standalone laptop.
OS : Windows.
2. Error : Failed to connect to any address from IP finder
[14:07:23,378][INFO][main][IgniteKernal] Non-loopback local IPs: 143.8.46.36
[14:07:23,378][INFO][main][IgniteKernal] Enabled local MACs: 0205857FEB80,
14ABC55A5CE4, 14ABC55A5CE5, 14ABC55A5CE8, 54EE75CEE461
[14:07:34,695][WARNING][tcp-client-disco-msg-worker-#4][TcpDiscoverySpi] Failed
to connect to any address from IP finder (will retry to join topology every
2000 ms; change 'reconnectDelay' to configure the frequency of retries): [/
127.0.0.1:47500, /127.0.0.1:47501, /127.0.0.1:47502, /127.0.0.1:47503, /
127.0.0.1:47504, /127.0.0.1:47505, /127.0.0.1:47506, /127.0.0.1:47507, /
127.0.0.1:47508, /127.0.0.1:47509]
I am able to successfully execute it from the cmdline and it works fine,
but when I try to execute this from Intellij (IDE) via the 'scala'
application code.
I tried couple of resolution steps, like fetching the
InetAddress.getLocalHost etc
import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi
import
org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder
import
org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder
import java.util.Collections
import org.apache.ignite.configuration.IgniteConfiguration
val nodeHost = InetAddress.getLocalHost.getHostName
val port = "47500"
val spi = new TcpDiscoverySpi
val ipFinder = new TcpDiscoveryMulticastIpFinder
ipFinder.setLocalAddress(nodeHost+ ':' + port)
// ipFinder.setAddresses(Collections.singletonList(nodeHost + ':' +
port))
spi.setIpFinder(ipFinder)
val cfg = new IgniteConfiguration()
cfg.setDiscoverySpi(spi)
interestingly this is similar to adding the IP address in the
default-config.xml and also the usual 127.0.0.1 but it still doesn’t work.
<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">
<property name="addresses">
<list>
<!-- In distributed environment, replace
with actual host IP address. -->
<value><my ip address> :47500..47509</value>
</list>
</property>
</bean>
</property>
</bean>
</property>
I have tried both approaches, the code and also the default-config.xml.
Interestingly these parameters are optional and I am executing this in my
standalone laptop.
Kindly provide resolution to fix this error. Is this a window-specifc
issue, but I am able to execute from the command console.
Regards,
Chetan Jayaram