ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Josephine Barboza <josephine.barb...@nviz.com>
Subject RE: Node unable to join cluster
Date Mon, 27 Nov 2017 12:55:10 GMT
Hi Denis,

I was able to establish connection between the two nodes. The problem was that in AddressReslover
the internal-external address mapping was incorrect. I had to specify the socketAddress instead
of the address as the internal address for it to work.
addrs=[], sockAddrs=[/<>]

However after the nodes have started they both seem to be stuck. I believe the problem is
that TcpCommunicationSpi is not starting on the IP Address and port I have configured. Please
see the logs below. How do I change this? I have set the localhost on IgniteConfig as

Node 2:
2017-11-27 10:35:55  [exchange-worker-#28%nvIDNGB1%] WARN  TcpCommunicationSpi:471 - Connect
timed out (consider increasing 'failureDetectionTimeout' configuration property) [addr=/,
2017-11-27 10:35:55  [grid-nio-worker-tcp-comm-0-#17%nvIDNGB1%] INFO  TcpCommunicationSpi:463
- Established outgoing communication connection [locAddr=/, rmtAddr=/]


From: Denis Mekhanikov [mailto:dmekhanikov@gmail.com]
Sent: Thursday, November 23, 2017 7:13 PM
To: user@ignite.apache.org
Subject: Re: Node unable to join cluster


You should specify addresses in IP finder together with ports. So, it should be like that:
String[] addresses = {“”};
Then discovery SPI will be able to find itself, and the node will start.

Do you have nodes in your cluster, that are able to see each other locally? If not, then you
don't need an address resolver actually.


чт, 23 нояб. 2017 г. в 13:10, Josephine Barboza <josephine.barboza@nviz.com<mailto:josephine.barboza@nviz.com>>:

Still getting this error.
2017-11-23 08:59:27  [tcp-disco-msg-worker-#3%nvIDNGB1%] ERROR TcpDiscoverySpi:495 - Failed
to connect to next node [msg=TcpDiscoveryNodeAddedMessage [node=TcpDiscoveryNode [id=a11e7f8b-6d64-4620-a296-1a52fb253a48,
addrs=[], sockAddrs=[/<>], discPort=1510,
order=0, intOrder=3, lastExchangeTime=1511427557675, loc=false, ver=2.1.0#20170720-sha1:a6ca5c8a,
isClient=false], dataPacket=o.a.i.spi.discovery.tcp.internal.DiscoveryDataPacket@516aef1f<mailto:dataPacket=o.a.i.spi.discovery.tcp.internal.DiscoveryDataPacket@516aef1f>,
discardMsgId=null, discardCustomMsgId=null, top=null, clientTop=null, gridStartTime=1511427411342,
super=TcpDiscoveryAbstractMessage [sndNodeId=null, id=5470818ef51-36f0e1f5-fe2e-4b2c-9f9d-bdd4f95f6cb0,
verifierNodeId=36f0e1f5-fe2e-4b2c-9f9d-bdd4f95f6cb0, topVer=0, pendingIdx=0, failedNodes=null,
isClient=false]], err=connect timed out]
java.net.SocketTimeoutException: connect timed out

it looks like the node1  is trying to connect on private Iof node2P. If I give Public IP as
discovery Local Address nodes won’t start. Could someone help me understand what should
be the configuration when public and private IPs are involved? I have created the below address
resolver configuration

package com.hm.ignite.repositories;

import java.net.InetSocketAddress;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.apache.ignite.IgniteCheckedException;
import org.apache.ignite.configuration.AddressResolver;
import org.apache.ignite.internal.util.typedef.F;

public class AddressResolverImpl implements AddressResolver {
    /** Internal address on external address. */
    private static Map<InetSocketAddress, List<InetSocketAddress>> maps = new

    static {
        maps.put(new InetSocketAddress("", 47500), F.asList(new InetSocketAddress("",
        maps.put(new InetSocketAddress("", 47500), F.asList(new InetSocketAddress("",
        maps.put(new InetSocketAddress("", 47500), F.asList(new InetSocketAddress("",
        maps.put(new InetSocketAddress("", 47500), F.asList(new InetSocketAddress("",

    /** {@inheritDoc} */
    @Override public Collection<InetSocketAddress> getExternalAddresses(InetSocketAddress
        throws IgniteCheckedException {
        return maps.get(addr);

From: Josephine Barboza
Sent: Wednesday, November 22, 2017 5:13 PM
To: user@ignite.apache.org<mailto:user@ignite.apache.org>
Subject: RE: Node unable to join cluster

Hi Denis,

After adding the localAddress in TcpDiscoverySpi, the node is still not starting. It fails
with the below log messages

2017-11-22 11:25:36  [localhost-startStop-1] DEBUG TcpDiscoverySpi:452 - Handshake response
from local node: TcpDiscoveryHandshakeResponse [order=0, super=TcpDiscoveryAbstractMessage
[sndNodeId=null, id=089b073ef51-41a2ab42-639c-48f0-ad36-b75cd625939a, verifierNodeId=null,
topVer=0, pendingIdx=0, failedNodes=null, isClient=false]]
2017-11-22 11:25:36  [localhost-startStop-1] DEBUG TcpDiscoverySpi:452 - Failed to send join
request message [addr=/<>, msg=Failed to
send message to address [addr=/<>, msg=TcpDiscoveryJoinRequestMessage
[node=TcpDiscoveryNode [id=41a2ab42-639c-48f0-ad36-b75cd625939a, addrs=[0:0:0:0:0:0:0:1%lo,,,], sockAddrs=[/<>,
/0:0:0:0:0:0:0:1%lo:1510, /<>, /<>],
discPort=1510, order=0, intOrder=0, lastExchangeTime=1511349337034, loc=true, ver=2.1.0#20170720-sha1:a6ca5c8a,
isClient=false], dataPacket=org.apache.ignite.spi.discovery.tcp.internal.DiscoveryDataPacket@432a7606<mailto:dataPacket=org.apache.ignite.spi.discovery.tcp.internal.DiscoveryDataPacket@432a7606>,
super=TcpDiscoveryAbstractMessage [sndNodeId=null, id=343b073ef51-41a2ab42-639c-48f0-ad36-b75cd625939a,
verifierNodeId=null, topVer=0, pendingIdx=0, failedNodes=null, isClient=false]]]]

Below is my configuration

          // Comm spi
          TcpCommunicationSpi commSpi = new TcpCommunicationSpi();

    // IP Finder
          TcpDiscoveryVmIpFinder ipFinder = new TcpDiscoveryVmIpFinder();
          String[] addresses = {“”}; // This is the public IP of my VM
which has two ports open 1510 and 1511

          // Discovery SPI
    TcpDiscoverySpi discoverySpi = new TcpDiscoverySpi();

          // Address Resolver
          Map<String, String> addrMap = new Hashmap<>();
          addrMap.put(“”, “”);

    AddressResolver addrResolvr = new BasicAddressResolver(addrMap);


I am still unable to start a local node if I use the public IP in IPFinder.
What could be the issue here?

From: Denis Mekhanikov [mailto:dmekhanikov@gmail.com]
Sent: Tuesday, November 21, 2017 6:15 PM
To: user@ignite.apache.org<mailto:user@ignite.apache.org>
Subject: Re: Node unable to join cluster

Hi Josephine!

Make sure, that TcpDiscoveryVmIpFinder has address of the local node on the list.
Otherwise the first node won't be able to start, because discovery SPI won't find any nodes.

Also note, that TcpDiscoverySpi has localAddress and localPort properties. Try setting them
according to your public IP and port.

Refer to this page for more information: https://apacheignite.readme.io/docs/cluster-config


вт, 21 нояб. 2017 г. в 15:11, Josephine Barboza <josephine.barboza@nviz.com<mailto:josephine.barboza@nviz.com>>:

I have setup ignite instances on two different VMs and I’m trying to create a cluster using
Static IP discovery using TcpDiscoveryVmIpFinder.
I have a couple of questions:

  1.  Do I need to give loopback address or public IP for the node to start before trying
to connect to the other node in the cluster? What is the recommended configuration for production?
  2.  When I give loopback address/private IP it works(node starts before trying the connect
to other node) but when I give the public IP it does not. Both the ports for discoverySpi
and commSpi are open on the public IP and I have used address resolver as well to map the
private IP to the public IP. Is there any other configuration required?
  3.  Facing the same issue as mentioned in point 2 while connecting to the node on the second
VM where in spite of using address resolver the node is unable to join the topology.


IMPORTANT NOTICE: This email and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed. If you have received
this email in error, please notify the system manager and/or the sender immediately.
View raw message