You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Chetan Jayaram <ch...@gmail.com> on 2018/07/19 07:04:37 UTC
[TcpDiscoverySpi] Failed to connect to any address from IP finder
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
Re: [TcpDiscoverySpi] Failed to connect to any address from IP
finder
Posted by chetanj <ch...@gmail.com>.
interesting.. I am not getting any logs in the Work directory. and this is
the only code which i execute, so not sure why its starting the client.
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Re: [TcpDiscoverySpi] Failed to connect to any address from IP finder
Posted by Evgenii Zhuravlev <e....@gmail.com>.
Which issue? As I said, embedded mode was deprecated a long time ago, as
this docs says:
https://apacheignite-fs.readme.io/docs/ignitecontext-igniterdd#section-ignitecontext
and looks like it was discontinued. Consider starting a separate Ignite
cluster and using standalone mode to avoid data consistency and performance
issues.
2018-07-20 5:43 GMT+03:00 chetanj <ch...@gmail.com>:
> I think we are deviating from the point. The core issue still remains.
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>
Re: [TcpDiscoverySpi] Failed to connect to any address from IP
finder
Posted by chetanj <ch...@gmail.com>.
I think we are deviating from the point. The core issue still remains.
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Re: [TcpDiscoverySpi] Failed to connect to any address from IP finder
Posted by Evgenii Zhuravlev <e....@gmail.com>.
how? You will start a client node, connect to your cluster and will
interact with it via this client.
2018-07-19 13:08 GMT+03:00 chetanj <ch...@gmail.com>:
> I am now explicitly setting the clientmode as False in the java code.
>
> "You can use ExampleNodeStartup to start Ignite node from idea."
>
> --- this defeats the purpose of executing spark code across Ignite nodes.
>
>
>
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>
Re: [TcpDiscoverySpi] Failed to connect to any address from IP
finder
Posted by chetanj <ch...@gmail.com>.
I am now explicitly setting the clientmode as False in the java code.
"You can use ExampleNodeStartup to start Ignite node from idea."
--- this defeats the purpose of executing spark code across Ignite nodes.
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Re: [TcpDiscoverySpi] Failed to connect to any address from IP finder
Posted by Evgenii Zhuravlev <e....@gmail.com>.
As you using integration with spark, it enables clientMode flag internally
- it doesn't make any sense to create new server each time for integrating
with spark - you should have already started server nodes. You can use
ExampleNodeStartup to start Ignite node from idea.
2018-07-19 12:34 GMT+03:00 chetanj <ch...@gmail.com>:
> Yes i have recompiled, get the same error still. as told earlier i have
> removed the explicit declaration for setclientmode.
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>
Re: [TcpDiscoverySpi] Failed to connect to any address from IP
finder
Posted by chetanj <ch...@gmail.com>.
Yes i have recompiled, get the same error still. as told earlier i have
removed the explicit declaration for setclientmode.
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Re: [TcpDiscoverySpi] Failed to connect to any address from IP finder
Posted by Evgenii Zhuravlev <e....@gmail.com>.
Well, then you can try to recompile it or rerun Idea. I see that clientMode
was explicitly set in IgniteConfiguration.
2018-07-19 12:21 GMT+03:00 chetanj <ch...@gmail.com>:
>
> Interesting.. I am not getting any logs in the Work directory. for the
> server node.
> Intellij code is the only piece is run, so not sure why its starting the
> client.
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>
Re: [TcpDiscoverySpi] Failed to connect to any address from IP
finder
Posted by chetanj <ch...@gmail.com>.
Interesting.. I am not getting any logs in the Work directory. for the
server node.
Intellij code is the only piece is run, so not sure why its starting the
client.
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Re: [TcpDiscoverySpi] Failed to connect to any address from IP finder
Posted by Evgenii Zhuravlev <e....@gmail.com>.
You still starting a client node. Do you have logs for server node?
2018-07-19 12:11 GMT+03:00 chetanj <ch...@gmail.com>:
> log.txt <http://apache-ignite-users.70518.x6.nabble.com/file/t1931/log.txt>
>
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>
Re: [TcpDiscoverySpi] Failed to connect to any address from IP
finder
Posted by chetanj <ch...@gmail.com>.
log.txt <http://apache-ignite-users.70518.x6.nabble.com/file/t1931/log.txt>
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Re: [TcpDiscoverySpi] Failed to connect to any address from IP finder
Posted by Evgenii Zhuravlev <e....@gmail.com>.
well, then please share the full log from the node.
2018-07-19 12:05 GMT+03:00 chetanj <ch...@gmail.com>:
> I am not using both Code and Config.xml at the same time. I just shared to
> demonstrate that either of the approaches do not work.
>
> Step1 : First i try with the xml config. it didnt work
> Step2 : then i tried via the code, it didnt work.
>
> currently both my server and client nodes are not running.
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>
Re: [TcpDiscoverySpi] Failed to connect to any address from IP
finder
Posted by chetanj <ch...@gmail.com>.
I am not using both Code and Config.xml at the same time. I just shared to
demonstrate that either of the approaches do not work.
Step1 : First i try with the xml config. it didnt work
Step2 : then i tried via the code, it didnt work.
currently both my server and client nodes are not running.
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Re: [TcpDiscoverySpi] Failed to connect to any address from IP finder
Posted by Evgenii Zhuravlev <e....@gmail.com>.
I don't understand which configuration you use - you sharing both java code
and xml config, which configures the same thing. Which configuration you
use?
2018-07-19 11:58 GMT+03:00 chetanj <ch...@gmail.com>:
> there are no other clients running, not even the server node. I have
> specified the range in the default-config.xml
>
> <bean
> class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.
> TcpDiscoveryVmIpFinder">
> <property name="addresses">
> <list>
>
> <value>127.0.0.1:47500..47509</value>
>
> Btw, thanks for the speedy response and appreciate your help.
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>
Re: [TcpDiscoverySpi] Failed to connect to any address from IP
finder
Posted by chetanj <ch...@gmail.com>.
there are no other clients running, not even the server node. I have
specified the range in the default-config.xml
<bean
class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
<property name="addresses">
<list>
<value>127.0.0.1:47500..47509</value>
Btw, thanks for the speedy response and appreciate your help.
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Re: [TcpDiscoverySpi] Failed to connect to any address from IP finder
Posted by Evgenii Zhuravlev <e....@gmail.com>.
If you're facing the same error, most possible that other node(most
possible client) already was started on the port 47500. At the same time,
you server node starts on the next port(47501 for example). But your
configuration contains only one address in ipFinder - 47500. You need to
make sure that all nodes stopped, add more than one ip in your ipFinder
config and start it again.
Anyway, in any case, all this information(regarding ports, etc.) can be
found in logs.
Evgenii
2018-07-19 11:46 GMT+03:00 Evgenii Zhuravlev <e....@gmail.com>:
> then can you share the full reproducer?
>
> 2018-07-19 11:44 GMT+03:00 chetanj <ch...@gmail.com>:
>
>> changing it to "false" setClientMode(false) , still gives the same
>> IP_FINDER
>> error
>>
>>
>>
>> --
>> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>>
>
>
Re: [TcpDiscoverySpi] Failed to connect to any address from IP finder
Posted by Evgenii Zhuravlev <e....@gmail.com>.
then can you share the full reproducer?
2018-07-19 11:44 GMT+03:00 chetanj <ch...@gmail.com>:
> changing it to "false" setClientMode(false) , still gives the same
> IP_FINDER
> error
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>
Re: [TcpDiscoverySpi] Failed to connect to any address from IP
finder
Posted by chetanj <ch...@gmail.com>.
changing it to "false" setClientMode(false) , still gives the same IP_FINDER
error
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Re: [TcpDiscoverySpi] Failed to connect to any address from IP finder
Posted by Chetan Jayaram <ch...@gmail.com>.
Yes, mistake at my end. i made it to "False" but it still gives me the same
error.
On Thu, Jul 19, 2018 at 4:41 PM, Evgenii Zhuravlev <e.zhuravlev.wk@gmail.com
> wrote:
> ignite.bat starts server node. As you see in your java code which you
> starts from idea:IgniteConfiguration().setClientMode(true). Client mode
> will be started only after it will be connected to server node.
>
> Evgenii
>
> 2018-07-19 11:35 GMT+03:00 chetanj <ch...@gmail.com>:
>
>> @ezhuravlev
>>
>> I am not starting the server node via ignite.bat. The main issue i am
>> facing
>> is executing the Ignite in Intellij.
>>
>> 1. Do i have to start the server node separately [ignite.bat] . I am
>> currently executing Ignite from Intellij - Run Edit configuration with VM
>> parameters ->
>>
>>
>> -DIGNITE_HOME=<path to the -> apache-ignite-fabric-2.6.0-bin >
>> -Djava.net.preferIPv4Stack=true
>>
>> 2. TCP IP parameter is optional in the default-config.xml, but whether it
>> include or not, i am still getting the IP_FINDER error.
>>
>> I included the entire in my code (thanks @WT) :
>> val igniteContext = new IgniteContext(sparkContext,
>> () =>{
>> val tcpDiscoverySpi: TcpDiscoverySpi = new TcpDiscoverySpi
>> val ipFinder: TcpDiscoveryVmIpFinder = new TcpDiscoveryVmIpFinder
>> val addressList: java.util.List[String] = new
>> java.util.ArrayList[String]
>> addressList.add("127.0.0.1:47500")
>> ipFinder.setAddresses(addressList)
>> tcpDiscoverySpi.setIpFinder(ipFinder)
>> tcpDiscoverySpi.setLocalAddress("127.0.0.1")
>> val igniteConf : IgniteConfiguration = new
>>
>> IgniteConfiguration().setClientMode(true).setDiscoverySpi(tc
>> pDiscoverySpi)
>> igniteConf})
>>
>> but still face the same error.
>>
>> [16:27:41] 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]
>>
>>
>>
>>
>>
>> --
>> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>>
>
>
Re: [TcpDiscoverySpi] Failed to connect to any address from IP finder
Posted by Evgenii Zhuravlev <e....@gmail.com>.
ignite.bat starts server node. As you see in your java code which you
starts from idea:IgniteConfiguration().setClientMode(true). Client mode
will be started only after it will be connected to server node.
Evgenii
2018-07-19 11:35 GMT+03:00 chetanj <ch...@gmail.com>:
> @ezhuravlev
>
> I am not starting the server node via ignite.bat. The main issue i am
> facing
> is executing the Ignite in Intellij.
>
> 1. Do i have to start the server node separately [ignite.bat] . I am
> currently executing Ignite from Intellij - Run Edit configuration with VM
> parameters ->
>
>
> -DIGNITE_HOME=<path to the -> apache-ignite-fabric-2.6.0-bin >
> -Djava.net.preferIPv4Stack=true
>
> 2. TCP IP parameter is optional in the default-config.xml, but whether it
> include or not, i am still getting the IP_FINDER error.
>
> I included the entire in my code (thanks @WT) :
> val igniteContext = new IgniteContext(sparkContext,
> () =>{
> val tcpDiscoverySpi: TcpDiscoverySpi = new TcpDiscoverySpi
> val ipFinder: TcpDiscoveryVmIpFinder = new TcpDiscoveryVmIpFinder
> val addressList: java.util.List[String] = new
> java.util.ArrayList[String]
> addressList.add("127.0.0.1:47500")
> ipFinder.setAddresses(addressList)
> tcpDiscoverySpi.setIpFinder(ipFinder)
> tcpDiscoverySpi.setLocalAddress("127.0.0.1")
> val igniteConf : IgniteConfiguration = new
>
> IgniteConfiguration().setClientMode(true).setDiscoverySpi(tcpDiscoverySpi)
> igniteConf})
>
> but still face the same error.
>
> [16:27:41] 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]
>
>
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>
Re: [TcpDiscoverySpi] Failed to connect to any address from IP
finder
Posted by chetanj <ch...@gmail.com>.
@ezhuravlev
I am not starting the server node via ignite.bat. The main issue i am facing
is executing the Ignite in Intellij.
1. Do i have to start the server node separately [ignite.bat] . I am
currently executing Ignite from Intellij - Run Edit configuration with VM
parameters ->
-DIGNITE_HOME=<path to the -> apache-ignite-fabric-2.6.0-bin >
-Djava.net.preferIPv4Stack=true
2. TCP IP parameter is optional in the default-config.xml, but whether it
include or not, i am still getting the IP_FINDER error.
I included the entire in my code (thanks @WT) :
val igniteContext = new IgniteContext(sparkContext,
() =>{
val tcpDiscoverySpi: TcpDiscoverySpi = new TcpDiscoverySpi
val ipFinder: TcpDiscoveryVmIpFinder = new TcpDiscoveryVmIpFinder
val addressList: java.util.List[String] = new
java.util.ArrayList[String]
addressList.add("127.0.0.1:47500")
ipFinder.setAddresses(addressList)
tcpDiscoverySpi.setIpFinder(ipFinder)
tcpDiscoverySpi.setLocalAddress("127.0.0.1")
val igniteConf : IgniteConfiguration = new
IgniteConfiguration().setClientMode(true).setDiscoverySpi(tcpDiscoverySpi)
igniteConf})
but still face the same error.
[16:27:41] 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]
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Re: [TcpDiscoverySpi] Failed to connect to any address from IP finder
Posted by Evgenii Zhuravlev <e....@gmail.com>.
Hi,
From the part of the log you've provided, I see that you starting client
node - it needs server nodes to connect to. At the same time, ignite.bat
script starts server node.
Regards,
Evgenii
2018-07-19 10:04 GMT+03:00 Chetan Jayaram <ch...@gmail.com>:
> 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
>
>