点燃 Docker

Ignite on Docker

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

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

Note:docker is configured to use the default machine with IP 192.168.99.100

点火启动带来 'Failed to connect ' 错误。

我的 IntelliJ Ignite 配置是:

 <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>

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

<value>192.168.99.100:47100</value>