IT Manatee IT Manatee - 8 months ago 211
Apache Configuration Question

How to connect apache ignite node by static ip address

I have got a hetzner server with config:

<bean id="ignite-configuration" class="org.apache.ignite.IgniteSpringBean">
<property name="configuration">
<bean class="org.apache.ignite.configuration.IgniteConfiguration">
<property name="peerClassLoadingEnabled" value="true"/>
<property name="igniteInstanceName" value="statistic-server"/>

<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..47509</value>
</list>
</property>
</bean>
</property>
</bean>
</property>
</bean>
</property>
</bean>


I want to connect my Laptop to server like a server node. On my laptop I have next config:

<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>hetzner_ip_address:47500..47509</value>
</list>
</property>
</bean>
</property>
<property name="addressResolver">
<bean class="org.apache.ignite.configuration.BasicAddressResolver">
<constructor-arg>
<map>
<entry key="192.168.1.10" value="laptop_static_ip_address"/>
</map>
</constructor-arg>
</bean>
</property>
</bean>
</property>


Can I connect servers behind NAT by static ip address and how can I do this?

Answer Source

It's not very clear weather you have a client or server node behind NAT, but actually in Ignite a server node can sometimes establish connection with a client node, so you need to make sure that connections are allowed in both directions.

In case of NAT this means that in addition to AddressResolver you need to configure port forwarding on the router, or use SSH tunnel.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download