Java 如何通过静态ip地址连接apache ignite节点
我有一个配置为的hetzner服务器:Java 如何通过静态ip地址连接apache ignite节点,java,tcp,ip-address,ignite,Java,Tcp,Ip Address,Ignite,我有一个配置为的hetzner服务器: <bean id="ignite-configuration" class="org.apache.ignite.IgniteSpringBean"> <property name="configuration"> <bean class="org.apache.ignite.configuration.IgniteConfiguration"> <property
<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>
127.0.0.1:47500..47509
我想把我的笔记本电脑像服务器节点一样连接到服务器。在我的笔记本电脑上,我有下一个配置:
<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>
hetzner_ip_地址:47500..47509
我可以通过静态ip地址连接NAT后面的服务器吗?我该怎么做?现在还不清楚NAT后面是否有客户端或服务器节点,但实际上,在Ignite中,服务器节点有时可以与客户端节点建立连接,因此需要确保两个方向都允许连接
对于NAT,这意味着除了
地址解析程序
之外,您还需要在路由器上配置端口转发,或者使用SSH隧道。如果服务器在NAT之后,连接的唯一方法是在NAT盒上设置端口转发,并使用NAT设备的外部IP地址。这是不可能被允许的。另一种选择是VPN或SSH隧道。解释这些是StackOverflow的主题之外,因为它们是网络配置问题,与编程无关。Jim,你能给我一个链接,我可以在那里阅读它吗?NAT、VPN和SSH隧道都在web上有很好的文档记录。使用您最喜欢的搜索引擎。吉姆,对不起,但如果您知道,我必须在服务器节点上设置ssh隧道?非常感谢。我在我的hetzner服务器上创建了VPN服务器,并将我的客户端节点连接到VPN。