2016-06-14 89 views
0

在Docker上(docker run -it --net=host --expose=8098 -p 47100:8098 [other options] apacheignite/ignite-docker),我启动了ignite-node(服务器模式),并在此节点上创建了缓存(复制)。在Docker上点燃

现在来自Intelij Idea,我创建了另一个点火节点(客户端模式),我想连接(查找)在docker上的节点,以获取已创建的缓存。

注:泊坞窗被配置为使用默认的机器IP 192.168.99.100

在Ignitation开始带来“无法连接”的错误。

我的IntelliJ点燃配置为:

<property name="discoverySpi"> 
       <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi"> 
        <property name="localPort" value="47100"/> 
        <!-- Setting up IP finder for this cluster --> 
        <property name="ipFinder"> 
         <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder"> 
          <property name="shared" value="true"/> 
          <property name="addresses"> 
           <list> 
            <!-- 
             Addresses and port range of the nodes from the first 
             cluster. 
             127.0.0.1 can be replaced with actual IP addresses or 
             host names. Port range is optional. 
            --> 
            <value>192.168.99.100:8098</value> 
           </list> 
          </property> 
         </bean> 
        </property> 
       </bean> 
      </property> 
+0

有什么问题或错误你试图解决? – BMitch

+0

哦,对不起。我忘了写问题。它带来了'连接失败'的错误。 我的所有配置是否正确? – emanuel07

回答

2

如果您要访问的端口通过docker run打开:

<value>192.168.99.100:47100</value> 
+0

和8098在哪里使用? 8098 is'nt我的容器端口号? – emanuel07

+0

不,当您指定'-p 47100:8098'时,您将端口8098从您的容器映射到您的物理机器,因此您的机器在8098上有一个空闲端口。如果您'sudo netstat -laputen | grep 8098'应该没有什么可见的 –

+0

好的,非常感谢,我明白了。但是我有一个问题,一般在哪里映射(8098)端口可以使用? – emanuel07