I've deployed Ignite bare-metal and in Kubernetes in test and production
but I'm now trying to deploy for a new project in a new cluster with Docker
and it is proving difficult. I can't figure out what port it is trying to
use or how to force it to use a specific one.

Note that I've removed the "--net=host" option which the docs
<https://apacheignite.readme.io/docs/docker-deployment> mention since that
would expose the cluster on the node's public IPs.

Note that if I use --net=host it works as expected.

sudo docker run -d -it --name=ignite --restart=unless-stopped \
-e CONFIG_URI="/ignite/config.xml" \
-e OPTION_LIBS="ignite-rest-http,ignite-visor-console,ignite-web" \
-e JVM_OPTS="-Xms1g -Xmx10g -server -XX:+AggressiveOpts
-XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true
-DIGNITE_QUIET=false -Dcom.sun.management.jmxremote.port=49112" \
-e IGNITE_WORK_DIR=/persistence \
-v /mnt/vol0/ignite:/persistence \
-v /root/ignite/config.xml:/ignite/config.xml \
-p ${arr[$host]}:11211:11211 \
-p ${arr[$host]}:47100:47100 \
-p ${arr[$host]}:47500:47500 \
-p ${arr[$host]}:49112:49112 \
-p ${arr[$host]}:49100:49100 \
-p ${arr[$host]}:10800:10800 \
-p ${arr[$host]}:8080:8080 \
apacheignite/ignite:2.8.1

This is in a loop so ${arr[$host]} will be replaced with one of the private
network's IPs.
You can see from the logs that the TCPDiscovery gets connections but
whatever happens next isn't successful so the nodes keep retrying and the
logs below just repeat forever:

[12:46:42,934][INFO][tcp-disco-sock-reader-[20ec0423
172.17.0.1:35998]-#10][TcpDiscoverySpi]
> Finished serving remote node connection [rmtAddr=/172.17.0.1:35998,
> rmtPort=35998
> [12:46:45,637][INFO][tcp-disco-srvr-[:47500]-#3][TcpDiscoverySpi] TCP
> discovery accepted incoming connection [rmtAddr=/172.17.0.1,
> rmtPort=36016]
> [12:46:45,637][INFO][tcp-disco-srvr-[:47500]-#3][TcpDiscoverySpi] TCP
> discovery spawning a new thread for connection [rmtAddr=/172.17.0.1,
> rmtPort=36016]
> [12:46:45,637][INFO][tcp-disco-sock-reader-[]-#11][TcpDiscoverySpi]
> Started serving remote node connection [rmtAddr=/172.17.0.1:36016,
> rmtPort=36016]
> [12:46:45,639][INFO][tcp-disco-sock-reader-[20ec0423 
> 172.17.0.1:36016]-#11][TcpDiscoverySpi]
> Finished serving remote node connection [rmtAddr=/172.17.0.1:36016,
> rmtPort=36016
> [12:46:45,661][INFO][tcp-disco-srvr-[:47500]-#3][TcpDiscoverySpi] TCP
> discovery accepted incoming connection [rmtAddr=/10.131.60.224,
> rmtPort=40325]
> [12:46:45,661][INFO][tcp-disco-srvr-[:47500]-#3][TcpDiscoverySpi] TCP
> discovery spawning a new thread for connection [rmtAddr=/10.131.60.224,
> rmtPort=40325]
> [12:46:45,661][INFO][tcp-disco-sock-reader-[]-#12][TcpDiscoverySpi]
> Started serving remote node connection [rmtAddr=/10.131.60.224:40325,
> rmtPort=40325]
> [12:46:45,662][INFO][tcp-disco-sock-reader-[8433be36 
> 10.131.60.224:40325]-#12][TcpDiscoverySpi]
> Initialized connection with remote server node
> [nodeId=8433be36-2855-4ff3-a849-35c3ebb25545, rmtAddr=/10.131.60.224:40325
> ]
> [12:46:45,676][INFO][tcp-disco-sock-reader-[8433be36 
> 10.131.60.224:40325]-#12][TcpDiscoverySpi]
> Finished serving remote node connection [rmtAddr=/10.131.60.224:40325,
> rmtPort=40325
>

The config.xml being used is below and the docker command is:

What have I missed in this config? What port does it need that isn't being
set/opened?

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans";
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
       xsi:schemaLocation="
        http://www.springframework.org/schema/beans
        http://www.springframework.org/schema/beans/spring-beans.xsd";>
  <bean id="ignite.cfg"
class="org.apache.ignite.configuration.IgniteConfiguration">
    <!-- Explicitly configure TCP discovery SPI to provide list of
initial nodes. -->
    <property name="discoverySpi">
      <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
        <property name="localPort" value="47500"/>
        <property name="ipFinder">
          <!--
              Ignite provides several options for automatic discovery
that can be used
              instead os static IP based discovery. For information on
all options refer
              to our documentation:
http://apacheignite.readme.io/docs/cluster-config
          -->
          <!-- Uncomment static IP finder to enable static-based
discovery of initial nodes. -->
          <bean
class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
            <!--          <bean
class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">-->
            <property name="addresses">
              <list>
                <!-- In distributed environment, replace with actual
host IP address. -->
                <value>10.131.53.147:47500</value>
                <value>10.131.77.79:47500</value>
                <value>10.131.60.224:47500</value>
                <value>10.131.77.111:47500</value>
                <value>10.131.77.93:47500</value>
                <value>10.131.77.84:47500</value>
              </list>
            </property>
          </bean>
        </property>
      </bean>
    </property>
    <property name="communicationSpi">
      <bean class="org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi">
        <property name="localPort" value="47100"/>
      </bean>
    </property>
  </bean>
</beans>

Regards,
Courtney Robinson
Founder and CEO, Hypi
Tel: ++44 208 123 2413 (GMT+0) <https://hypi.io>

<https://hypi.io>
https://hypi.io

Reply via email to