Unable to connect to Local Node Only

classic Classic list List threaded Threaded
7 messages Options
Oru Oru
Reply | Threaded
Open this post in threaded view
|

Unable to connect to Local Node Only

This post has NOT been accepted by the mailing list yet.
Hi There! I am trying to connect to a locally running Ignite Server (run via ignite.bat) from my Java App. The problem is strange! I am able to connect to all nodes running in VM Ware from windows 8. However without those VM ware Linux nodes running on the pc, I can't connect to the local running Ignite server. I am using 127.0.0.1 as an address in IP Finder but it says Failed to connect to any address from IP Finder. Here is my Java code - TcpDiscoverySpi tcpDiscoverySpi = new TcpDiscoverySpi(); TcpDiscoveryVmIpFinder ipFinder = new TcpDiscoveryVmIpFinder(); List addressList = new ArrayList<>(); addressList.add("127.0.0.1:47500"); addressList.add("192.168.25.1"); addressList.add("192.168.1.101"); addressList.add("192.168.56.1"); addressList.add("192.168.10.1"); addressList.add("localhost"); ipFinder.setAddresses(addressList); tcpDiscoverySpi.setIpFinder(ipFinder); tcpDiscoverySpi.setLocalAddress("127.0.0.1"); OptimizedMarshaller optimize = new OptimizedMarshaller(); optimize.setRequireSerializable(false); IgniteConfiguration cfg = new IgniteConfiguration(); cfg.setLocalHost("127.0.0.1"); cfg.setClientMode(true); cfg.setPeerClassLoadingEnabled(false); cfg.setMarshaller(optimize); cfg.setMarshaller(optimize); cfg.setDiscoverySpi(tcpDiscoverySpi); Ignite ignite = Ignition.start(cfg);
vkulichenko vkulichenko
Reply | Threaded
Open this post in threaded view
|

Re: Unable to connect to Local Node Only

Hi,

Can you please subscribe to the mailing list so that we receive email notification for your posts? You can refer to this instruction: http://apache-ignite-users.70518.x6.nabble.com/mailing_list/MailingListOptions.jtp?forum=1

As for your issue, I reproduced it and it looks weird for me, so I started the thread on dev@ list about this. For now can you please try to use non-loopback address instead of 127.0.0.1 in the IP finder? Does it work for you this way?

-Val
Oru Oru
Reply | Threaded
Open this post in threaded view
|

Re: Unable to connect to Local Node Only

Hello and thanks for the reply.
No i am not able to connect using any local ip also. I can only connect to local server if i have an active remote server node running.

On Nov 6, 2015 5:01 AM, "vkulichenko [via Apache Ignite Users]" <[hidden email]> wrote:
Hi,

Can you please subscribe to the mailing list so that we receive email notification for your posts? You can refer to this instruction: http://apache-ignite-users.70518.x6.nabble.com/mailing_list/MailingListOptions.jtp?forum=1

As for your issue, I reproduced it and it looks weird for me, so I started the thread on dev@ list about this. For now can you please try to use non-loopback address instead of 127.0.0.1 in the IP finder? Does it work for you this way?

-Val


If you reply to this email, your message will be added to the discussion below:
http://apache-ignite-users.70518.x6.nabble.com/Unable-to-connect-to-Local-Node-Only-tp1852p1855.html
To unsubscribe from Unable to connect to Local Node Only, click here.
NAML
vkulichenko vkulichenko
Reply | Threaded
Open this post in threaded view
|

Re: Unable to connect to Local Node Only

Oru wrote
No i am not able to connect using any local ip also. I can only connect to
local server if i have an active remote server node running.
This is correct behavior. Client node will not start until there is a server node available. It will keep trying and join the cluster once there is at least one server.

-Val
Oru Oru
Reply | Threaded
Open this post in threaded view
|

Is this also correct behavior? Unable to connect to Local Node Only

I know that's the correct behavior, but that's not the issue here.
The issue is that even though there is a local server running still the local client is unable to connect to it locally.
This is when TCPDiscoverySPI is in use.
Is this also correct behavior?
vkulichenko vkulichenko
Reply | Threaded
Open this post in threaded view
|

Re: Is this also correct behavior? Unable to connect to Local Node Only

Hi,

I'm a bit confused :) Can you please clarify what you meant by "I can only connect to local server if i have an active remote server node running."?

Does it work for you if you remove 127.0.0.1 from IP finder list and use a local non-loopback address instead (like 192.168.x.x, for example)?

-Val
Oru Oru
Reply | Threaded
Open this post in threaded view
|

Re: Is this also correct behavior? Unable to connect to Local Node Only

I migrated to Linux. Goodbye Microsoft! Problem Solved!