docker容器上的点火服务

docker容器上的点火服务,docker,ignite,gridgain,Docker,Ignite,Gridgain,我正在docker容器中运行我的Gridgain服务器,并已部署该服务。我正在主机上运行Intellij,并试图访问Gridgain docker容器中部署的服务。我总是收到如下错误消息 运行命令以启动容器: docker run -it --net host -p 47500:47500 -p 47100:47100 apacheignite 错误消息: Failed to connect to any address from IP finder (will retry to join t

我正在docker容器中运行我的Gridgain服务器,并已部署该服务。我正在主机上运行Intellij,并试图访问Gridgain docker容器中部署的服务。我总是收到如下错误消息

运行命令以启动容器:

docker run -it --net host -p 47500:47500 -p 47100:47100 apacheignite
错误消息:

Failed to connect to any address from IP finder (will retry to join topology every 2 secs): [/192.168.99.100:47500]
Docker机器默认IP为:192.168.99.100

服务器和客户端中的我的TCP配置:

<property name="discoverySpi">
    <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
        <property name="localPort" value="47500"/>
        <property name="localPortRange" value="10"/>
        <!-- Setting up IP finder for this cluster -->
        <property name="ipFinder">
            <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
                <property name="addresses">
                    <list>
                        <value>192.168.99.100:47500</value>
                    </list>
                </property>
            </bean>
        </property>
    </bean>
</property>  
但我可以使用visor工具连接到节点,使用ip和端口,如192.168.99.100:11211。你能帮我解决这个连接问题吗

更新:

服务器节点日志:

 [14:18:55,219][INFO][main][IgniteKernal%sample] 

>>>    __________  ________________  
>>>   /  _/ ___/ |/ /  _/_  __/ __/  
>>>  _/ // (7 7    // /  / / / _/    
>>> /___/\___/_/|_/___/ /_/ /___/   
>>> 
>>> ver. 1.7.7#20170213-sha1:d72046dd
>>> 2017 Copyright(C) Apache Software Foundation
>>> 
>>> Ignite documentation: http://ignite.apache.org

[14:18:55,221][INFO][main][IgniteKernal%sample] Config URL: jar:file:/opt/ignite/gridgain-enterprise-fabric-7.7.7/libs/GridGainExample-1.0-SNAPSHOT.jar!/sample.xml
[14:18:55,221][INFO][main][IgniteKernal%sample] Daemon mode: off
[14:18:55,221][INFO][main][IgniteKernal%sample] OS: Linux 4.4.59-boot2docker amd64
[14:18:55,222][INFO][main][IgniteKernal%sample] OS user: root
[14:18:55,222][INFO][main][IgniteKernal%sample] PID: 53
[14:18:55,223][INFO][main][IgniteKernal%sample] Language runtime: Java Platform API Specification ver. 1.8
[14:18:55,223][INFO][main][IgniteKernal%sample] VM information: OpenJDK Runtime Environment 1.8.0_111-8u111-b14-2~bpo8+1-b14 Oracle Corporation OpenJDK 64-Bit Server VM 25.111-b14
[14:18:55,224][INFO][main][IgniteKernal%sample] VM total memory: 0.97GB
[14:18:55,224][INFO][main][IgniteKernal%sample] Remote Management [restart: on, REST: on, JMX (remote: on, port: 49112, auth: off, ssl: off)]
[14:18:55,224][INFO][main][IgniteKernal%sample] IGNITE_HOME=/opt/ignite/gridgain-enterprise-fabric-7.7.7
[14:18:55,227][INFO][main][IgniteKernal%sample] VM arguments: [-Xms1g, -Xmx1g, -XX:+AggressiveOpts, -XX:MaxMetaspaceSize=256m, -DIGNITE_QUIET=true, -DIGNITE_SUCCESS_FILE=/opt/ignite/gridgain-enterprise-fabric-7.7.7/work/ignite_success_bd343e0b-1fef-4e48-9fd7-c7dff57fa897, -Dcom.sun.management.jmxremote, -Dcom.sun.management.jmxremote.port=49112, -Dcom.sun.management.jmxremote.authenticate=false, -Dcom.sun.management.jmxremote.ssl=false, -DIGNITE_HOME=/opt/ignite/gridgain-enterprise-fabric-7.7.7, -DIGNITE_PROG_NAME=/opt/ignite/gridgain-enterprise-fabric-7.7.7/bin/ignite.sh]
[14:18:55,228][INFO][main][IgniteKernal%sample] Configured caches ['ignite-marshaller-sys-cache', 'ignite-sys-cache', 'ignite-atomics-sys-cache', 'SampleCache']
[14:18:55,240][INFO][main][IgniteKernal%sample] 3-rd party licenses can be found at: /opt/ignite/gridgain-enterprise-fabric-7.7.7/libs/licenses
[14:18:55,362][INFO][main][IgnitePluginProcessor] Configured plugins:
[14:18:55,362][INFO][main][IgnitePluginProcessor]   ^-- GridGain 7.7.7#20170213-sha1:2de56164
[14:18:55,362][INFO][main][IgnitePluginProcessor]   ^-- 2017 Copyright(C) GridGain Systems
[14:18:55,362][INFO][main][IgnitePluginProcessor] 
[14:18:55,499][INFO][main][TcpCommunicationSpi] IPC shared memory server endpoint started [port=48100, tokDir=/opt/ignite/gridgain-enterprise-fabric-7.7.7/work/ipc/shmem/933b16a3-4634-4f05-9ccb-7421856af81b-53]
[14:18:55,499][INFO][main][TcpCommunicationSpi] Successfully bound shared memory communication to TCP port [port=48100, locHost=0.0.0.0/0.0.0.0]
[14:18:55,517][INFO][main][TcpCommunicationSpi] Successfully bound to TCP port [port=47100, locHost=0.0.0.0/0.0.0.0]
[14:18:55,562][WARNING][main][NoopCheckpointSpi] Checkpoints are disabled (to enable configure any GridCheckpointSpi implementation)
[14:18:55,606][WARNING][main][GridCollisionManager] Collision resolution is disabled (all jobs will be activated upon arrival).
[14:18:55,613][WARNING][main][NoopSwapSpaceSpi] Swap space is disabled. To enable use FileSwapSpaceSpi.
[14:18:55,615][INFO][main][IgniteKernal%sample] Security status [authentication=off, tls/ssl=off]
[14:18:55,938][INFO][main][GridTcpRestProtocol] Command protocol successfully started [name=TCP binary, host=0.0.0.0/0.0.0.0, port=11211]
[14:18:55,985][WARNING][main][GridPluginProvider] Rolling updates are disabled. GridGain version update will require full cluster restart. Consider changing 'GridGainConfiguration.rollingUpdatesEnabled' configuration property.
[14:18:56,197][INFO][main][IgniteKernal%sample] Non-loopback local IPs: 10.0.2.15, 172.17.0.1, 172.18.0.1, 192.168.99.100
[14:18:56,197][INFO][main][IgniteKernal%sample] Enabled local MACs: 024258C6D970, 0242F66F408F, 08002733608E, 08002763D2CC
[14:18:56,244][INFO][main][TcpDiscoverySpi] Successfully bound to TCP port [port=49600, localHost=0.0.0.0/0.0.0.0, locNodeId=933b16a3-4634-4f05-9ccb-7421856af81b]
[14:18:56,594][INFO][main][GridCacheProcessor] Started cache [name=SampleCache, mode=PARTITIONED]
[14:18:56,616][INFO][main][GridCacheProcessor] Started cache [name=ignite-sys-cache, mode=REPLICATED]
[14:18:56,618][INFO][main][GridCacheProcessor] Started cache [name=ignite-atomics-sys-cache, mode=PARTITIONED]
[14:18:56,619][INFO][main][GridCacheProcessor] Started cache [name=ignite-marshaller-sys-cache, mode=REPLICATED]
[14:18:56,749][INFO][exchange-worker-#20%sample%][GridCachePartitionExchangeManager] Skipping rebalancing (nothing scheduled) [top=AffinityTopologyVersion [topVer=1, minorTopVer=0], evt=NODE_JOINED, node=933b16a3-4634-4f05-9ccb-7421856af81b]
[14:18:56,854][INFO][srvc-deploy-#21%sample%][GridServiceProcessor] Starting service instance [name=GridGainService, execId=fe7cdb63-1276-4dca-8177-d2a80cfc857e]
[14:18:56,910][INFO][main][IgniteKernal%sample] Performance suggestions for grid 'sample' (fix if possible)
[14:18:56,910][INFO][main][IgniteKernal%sample] To disable, set -DIGNITE_PERFORMANCE_SUGGESTIONS_DISABLED=true
[14:18:56,910][INFO][main][IgniteKernal%sample]   ^-- Decrease number of backups (set 'backups' to 0)
[14:18:56,911][INFO][main][IgniteKernal%sample] 
[14:18:56,911][INFO][main][IgniteKernal%sample] To start Console Management & Monitoring run ignitevisorcmd.{sh|bat}
[14:18:56,912][INFO][main][IgniteKernal%sample] 
[14:18:56,912][INFO][main][IgniteKernal%sample] 

>>> +----------------------------------------------------------------------+
>>> Ignite ver. 1.7.7#20170213-sha1:d72046dd61bba3acff25d961aaf2b703f01760b3
>>> +----------------------------------------------------------------------+
>>> OS name: Linux 4.4.59-boot2docker amd64
>>> CPU(s): 1
>>> Heap: 1.0GB
>>> VM name: 53@default
>>> Grid name: sample
>>> Local node [ID=933B16A3-4634-4F05-9CCB-7421856AF81B, order=1, clientMode=false]
>>> Local node addresses: [172.17.0.1/10.0.2.15, 172.18.0.1/127.0.0.1, 192.168.99.100/172.17.0.1, win7-pc.rouat.rotest/172.18.0.1, /192.168.99.100]
>>> Local ports: TCP:11211 TCP:47100 TCP:48100 TCP:49600 

[14:18:56,914][INFO][main][GridDiscoveryManager] Topology snapshot [ver=1, servers=1, clients=0, CPUs=1, heap=1.0GB]
更新(05-10): 如果有人给我举一些很好的工作例子,我还是不走运如何在Gridgain服务网格中部署服务,该服务网格在Docker容器中运行,并从主机访问该服务。

 I guess it should be simple i was able to access the tomcat and Cassandra without any issues with the Docker Container ip address. What is the ip i need to use inside the ipfinder configuration. 
尝试在org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi中设置“localAddress”属性,应该会有所帮助

另外,请看一下“IgniteConfiguration.setAddressResolver”。您可以使用它将内部IP映射到外部IP

尝试在org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi中设置“localAddress”属性,应该会有所帮助


另外,请看一下“IgniteConfiguration.setAddressResolver”。您可以使用它将内部IP映射到外部IP如果您使用-p将本地端口映射到外部,请使用-p将其映射到网络主机如果您使用-p将本地端口映射到外部,请使用-p将其映射到网络主机如果您不转发它,您如何连接到11211?你能用这些端口中的任何一个远程登录到192.168.99.100吗?同时附上服务器节点的日志。它绑定到哪个地址?我已经暴露了DockerFile中的端口11211什么是49600,为什么没有47500?你能附上完整的日志文件吗?如果你不转发它,你怎么可能连接到11211?你能用这些端口中的任何一个远程登录到192.168.99.100吗?同时附上服务器节点的日志。它绑定到哪个地址?我已经暴露了DockerFile中的端口11211什么是49600,为什么没有47500?您可以附加完整的日志文件吗?在哪里可以找到IgniteConfiguration.setAddressResolver的示例。我试了些东西。这里什么是私有地址,什么是公共地址,我必须给出什么值,我不太清楚。只需添加映射,例如:,其中key是您的内部地址(在docker容器中)和value-externaladdress。此外,在关于本地端口的登录消息中没有47500端口。检查您的主机上是否已打开。如果使用“-net=host”,没有AddressResolver,一切都应该正常。我可以在这里找到IgniteConfiguration.setAddressResolver的示例。我试了些东西。这里什么是私有地址,什么是公共地址,我必须给出什么值,我不太清楚。只需添加映射,例如:,其中key是您的内部地址(在docker容器中)和value-externaladdress。此外,在关于本地端口的登录消息中没有47500端口。检查您的主机上是否已打开。如果您使用“-net=host”,那么在没有AddressResolver的情况下,一切都应该正常工作
 I guess it should be simple i was able to access the tomcat and Cassandra without any issues with the Docker Container ip address. What is the ip i need to use inside the ipfinder configuration.