Issue of ignite run in docker

classic Classic list List threaded Threaded
4 messages Options
Joe chen Joe chen
Reply | Threaded
Open this post in threaded view
|

Issue of ignite run in docker

I wish ignite run in docker and share data between different computer.
First I use  default bridge network  and  "export port" by docker parameter "-p 47500-47509:47500:47509".
But it seem not work.

So I decide to use overlay network. I referent docker official document to build docker overlay network with swarm.
I run httpd container on computer0 to proxy tomcat container on computer1 and It work fine. So I think the docker overlay network is workable.

Then I run Ignite container on computer0 and  another Ignite on computer1

 # docker -H :4000 run -d --name ignite0 --net sris4 --env="constraint:node==t0srv" base/ignite
4b318089a747b63b41dfd4b46552a1178feb21c6439f5618fa253041d308df7a
 # docker -H :4000 run -d --name ignite1 --net sris4 --env="constraint:node==t1srv" base/ignite
8578c039e823433251999db42acfbd5aeddd3f0de10dac51eb5c419c01a02955
# docker -H :4000 ps
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS                               NAMES
8578c039e823        base/ignite         "bin/ignite.sh /bin/s"   2 minutes ago       Up 2 minutes                                            t1srv/ignite1
4b318089a747        base/ignite         "bin/ignite.sh /bin/s"   2 minutes ago       Up 2 minutes                                            t0srv/ignite0
# docker -H :4000 logs  ignite0 
[23:52:46]    __________  ________________
[23:52:46]   /  _/ ___/ |/ /  _/_  __/ __/
[23:52:46]  _/ // (7 7    // /  / / / _/  
[23:52:46] /___/\___/_/|_/___/ /_/ /___/ 
[23:52:46]
[23:52:46] ver. 1.6.0#20160518-sha1:0b22c45b
[23:52:46] 2016 Copyright(C) Apache Software Foundation
[23:52:46]
[23:52:46] Ignite documentation: http://ignite.apache.org
[23:52:46]
[23:52:46] Quiet mode.
[23:52:46]   ^-- Logging to file '/opt/ignite/work/log/ignite-4b7bd44a.0.log'
[23:52:46]   ^-- To see **FULL** console log here add -DIGNITE_QUIET=false or "-v" to ignite.{sh|bat}
[23:52:46]
[23:52:46] OS: Linux 4.5.2-aufs amd64
[23:52:46] VM information: Java(TM) SE Runtime Environment 1.8.0_92-b14 Oracle Corporation Java HotSpot(TM) 64-Bit Server VM 25.92-b14
[23:52:46] Configured plugins:
[23:52:46]   ^-- None
[23:52:46]
[23:52:46] Security status [authentication=off, tls/ssl=off]
[23:53:08] Performance suggestions for grid  (fix if possible)
[23:53:08] To disable, set -DIGNITE_PERFORMANCE_SUGGESTIONS_DISABLED=true
[23:53:08]   ^-- Decrease number of backups (set 'backups' to 0)
[23:53:08]
[23:53:08] To start Console Management & Monitoring run ignitevisorcmd.{sh|bat}
[23:53:08]
[23:53:08] Ignite node started OK (id=4b7bd44a)
[23:53:08] Topology snapshot [ver=1, servers=1, clients=0, CPUs=16, heap=1.0GB]
[23:53:39] Topology snapshot [ver=2, servers=2, clients=0, CPUs=18, heap=2.0GB]
[23:53:39] Topology snapshot [ver=3, servers=1, clients=0, CPUs=16, heap=1.0GB]
[23:54:09] Topology snapshot [ver=5, servers=2, clients=0, CPUs=18, heap=2.0GB]
[23:54:09] Topology snapshot [ver=5, servers=1, clients=0, CPUs=16, heap=1.0GB]
[23:54:40] Topology snapshot [ver=7, servers=2, clients=0, CPUs=18, heap=2.0GB]
[23:54:40] Topology snapshot [ver=7, servers=1, clients=0, CPUs=16, heap=1.0GB]
# docker -H :4000 logs  ignite1
[23:53:09]    __________  ________________
[23:53:09]   /  _/ ___/ |/ /  _/_  __/ __/
[23:53:09]  _/ // (7 7    // /  / / / _/  
[23:53:09] /___/\___/_/|_/___/ /_/ /___/ 
[23:53:09]
[23:53:09] ver. 1.6.0#20160518-sha1:0b22c45b
[23:53:09] 2016 Copyright(C) Apache Software Foundation
[23:53:09]
[23:53:09] Ignite documentation: http://ignite.apache.org
[23:53:09]
[23:53:09] Quiet mode.
[23:53:09]   ^-- Logging to file '/opt/ignite/work/log/ignite-5bb10d6a.0.log'
[23:53:09]   ^-- To see **FULL** console log here add -DIGNITE_QUIET=false or "-v" to ignite.{sh|bat}
[23:53:09]
[23:53:09] OS: Linux 4.5.2-aufs amd64
[23:53:09] VM information: Java(TM) SE Runtime Environment 1.8.0_92-b14 Oracle Corporation Java HotSpot(TM) 64-Bit Server VM 25.92-b14
[23:53:09] Configured plugins:
[23:53:09]   ^-- None
[23:53:09]
[23:53:09] Security status [authentication=off, tls/ssl=off]
[23:54:35] Performance suggestions for grid  (fix if possible)
[23:54:35] To disable, set -DIGNITE_PERFORMANCE_SUGGESTIONS_DISABLED=true
[23:54:35]   ^-- Decrease number of backups (set 'backups' to 0)
[23:54:35]
[23:54:35] To start Console Management & Monitoring run ignitevisorcmd.{sh|bat}
[23:54:35]
[23:54:35] Ignite node started OK (id=5bb10d6a)
[23:54:35] Topology snapshot [ver=1, servers=1, clients=0, CPUs=2, heap=1.0GB]

Ignite0 and Ignite1 does not communicate to each other normally.

# docker -H :4000 exec -it ignite1 bash
root@8578c039e823:/opt/ignite# ping ignite0                                                                                                
PING ignite0 (10.0.1.2): 56 data bytes
64 bytes from 10.0.1.2: icmp_seq=0 ttl=64 time=0.367 ms
64 bytes from 10.0.1.2: icmp_seq=1 ttl=64 time=0.364 ms
^C--- ignite0 ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.364/0.365/0.367/0.000 ms
root@8578c039e823:/opt/ignite# ping ignite1
PING ignite1 (10.0.1.3): 56 data bytes
64 bytes from 10.0.1.3: icmp_seq=0 ttl=64 time=0.061 ms
64 bytes from 10.0.1.3: icmp_seq=1 ttl=64 time=0.053 ms
^C--- ignite1 ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.053/0.057/0.061/0.000 ms
root@8578c039e823:/opt/ignite# </dev/tcp/ignite0/47500 && echo Port is open || echo Port is closed 
Port is open
root@8578c039e823:/opt/ignite# </dev/tcp/ignite1/47500 && echo Port is open || echo Port is closed
Port is open
root@8578c039e823:/opt/ignite# </dev/tcp/ignite1/4444 && echo Port is open || echo Port is closed
bash: connect: Connection refused
bash: /dev/tcp/ignite1/4444: Connection refused
Port is closed

Test port accessibility and it seems work find. But Ignote0 and Ignite1 is not clustering well.
Anybody help?

Thanks a lot.

====
Dockerfile
====
FROM base/java8

RUN set -x \
 && apt-get update \
 && apt-get -y install zip

# Ignite version
ENV IGNITE_VERSION 1.6.0
COPY files/apache-ignite-fabric-${IGNITE_VERSION}-bin.zip /opt/ignite.zip
# Ignite home
ENV IGNITE_HOME /opt/ignite
RUN set -x\
 && cd /opt \
 && unzip ignite.zip \
 && mv /opt/apache-ignite-fabric-${IGNITE_VERSION}-bin ${IGNITE_HOME} \
 && rm ignite.zip
COPY files/ignite.xml $IGNITE_HOME
WORKDIR ${IGNITE_HOME}
ENTRYPOINT ["bin/ignite.sh"]
CMD ignite.xml

====
ignite.xml
====
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:security="http://www.springframework.org/schema/security"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
        xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.1.xsd
          http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.1.xsd
          http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-4.0.xsd">

        <!-- ignite session replication -->

        <bean id="ignite.cfg" class="org.apache.ignite.configuration.IgniteConfiguration">
                <property name="cacheConfiguration">
                        <list>
                                <!-- Partitioned cache example configuration (Atomic mode). -->
                                <!-- <bean class="org.apache.ignite.configuration.CacheConfiguration">
                                        <property name="atomicityMode" value="ATOMIC" /> <property name="backups"
                                        value="1" /> </bean> -->
                                <bean id="partitioned" class="org.apache.ignite.configuration.CacheConfiguration">
                                        <!-- Cache name. -->
                                        <property name="name" value="partitioned" />
                                        <!-- Cache mode. -->
                                        <property name="cacheMode" value="PARTITIONED" />
                                        <property name="backups" value="1" />

                                        <!-- Set up LRU eviction policy with 10000 sessions limit. -->
                                        <!--
                                        <property name="evictionPolicy">
                                                <bean
                                                        class="org.apache.ignite.cache.eviction.lru.CacheLruEvictionPolicy">
                                                        <property name="maxSize" value="10000" />
                                                </bean>
                                        </property>
                                         -->
                                </bean>
                        </list>
                </property>

                <!-- 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="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"-->
                                        <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
                                                <!--property name="multicastGroup" value="228.10.10.157"/-->
                                                <property name="addresses">
                                                        <list>
                                                                <value>10.0.1.2:47500..47509</value>
                                                                <value>10.0.1.3:47500..47509</value>
                                                        </list>
                                                </property>
                                        </bean>
                                </property>
                        </bean>
                </property>
        </bean>
</beans>

--
scsi
Nikolai Tikhonov Nikolai Tikhonov
Reply | Threaded
Open this post in threaded view
|

Re: Issue of ignite run in docker

Hi Joe Chen,

Could you please run ignite in verbose mode and share logs? In verbose mode Ignite prints useful information which should clarify your issue.

ENTRYPOINT ["bin/ignite.sh -v"]

Also you opened ports for Discovery, but need to open ports for Communication too.

 -p 47100-47109:47100-47109 

On Sat, May 28, 2016 at 3:12 AM, Joe chen <[hidden email]> wrote:
I wish ignite run in docker and share data between different computer.
First I use  default bridge network  and  "export port" by docker parameter "-p 47500-47509:47500:47509".
But it seem not work.

So I decide to use overlay network. I referent docker official document to build docker overlay network with swarm.
I run httpd container on computer0 to proxy tomcat container on computer1 and It work fine. So I think the docker overlay network is workable.

Then I run Ignite container on computer0 and  another Ignite on computer1

 # docker -H :4000 run -d --name ignite0 --net sris4 --env="constraint:node==t0srv" base/ignite
4b318089a747b63b41dfd4b46552a1178feb21c6439f5618fa253041d308df7a
 # docker -H :4000 run -d --name ignite1 --net sris4 --env="constraint:node==t1srv" base/ignite
8578c039e823433251999db42acfbd5aeddd3f0de10dac51eb5c419c01a02955
# docker -H :4000 ps
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS                               NAMES
8578c039e823        base/ignite         "bin/ignite.sh /bin/s"   2 minutes ago       Up 2 minutes                                            t1srv/ignite1
4b318089a747        base/ignite         "bin/ignite.sh /bin/s"   2 minutes ago       Up 2 minutes                                            t0srv/ignite0
# docker -H :4000 logs  ignite0 
[23:52:46]    __________  ________________
[23:52:46]   /  _/ ___/ |/ /  _/_  __/ __/
[23:52:46]  _/ // (7 7    // /  / / / _/  
[23:52:46] /___/\___/_/|_/___/ /_/ /___/ 
[23:52:46]
[23:52:46] ver. 1.6.0#20160518-sha1:0b22c45b
[23:52:46] 2016 Copyright(C) Apache Software Foundation
[23:52:46]
[23:52:46] Ignite documentation: http://ignite.apache.org
[23:52:46]
[23:52:46] Quiet mode.
[23:52:46]   ^-- Logging to file '/opt/ignite/work/log/ignite-4b7bd44a.0.log'
[23:52:46]   ^-- To see **FULL** console log here add -DIGNITE_QUIET=false or "-v" to ignite.{sh|bat}
[23:52:46]
[23:52:46] OS: Linux 4.5.2-aufs amd64
[23:52:46] VM information: Java(TM) SE Runtime Environment 1.8.0_92-b14 Oracle Corporation Java HotSpot(TM) 64-Bit Server VM 25.92-b14
[23:52:46] Configured plugins:
[23:52:46]   ^-- None
[23:52:46]
[23:52:46] Security status [authentication=off, tls/ssl=off]
[23:53:08] Performance suggestions for grid  (fix if possible)
[23:53:08] To disable, set -DIGNITE_PERFORMANCE_SUGGESTIONS_DISABLED=true
[23:53:08]   ^-- Decrease number of backups (set 'backups' to 0)
[23:53:08]
[23:53:08] To start Console Management & Monitoring run ignitevisorcmd.{sh|bat}
[23:53:08]
[23:53:08] Ignite node started OK (id=4b7bd44a)
[23:53:08] Topology snapshot [ver=1, servers=1, clients=0, CPUs=16, heap=1.0GB]
[23:53:39] Topology snapshot [ver=2, servers=2, clients=0, CPUs=18, heap=2.0GB]
[23:53:39] Topology snapshot [ver=3, servers=1, clients=0, CPUs=16, heap=1.0GB]
[23:54:09] Topology snapshot [ver=5, servers=2, clients=0, CPUs=18, heap=2.0GB]
[23:54:09] Topology snapshot [ver=5, servers=1, clients=0, CPUs=16, heap=1.0GB]
[23:54:40] Topology snapshot [ver=7, servers=2, clients=0, CPUs=18, heap=2.0GB]
[23:54:40] Topology snapshot [ver=7, servers=1, clients=0, CPUs=16, heap=1.0GB]
# docker -H :4000 logs  ignite1
[23:53:09]    __________  ________________
[23:53:09]   /  _/ ___/ |/ /  _/_  __/ __/
[23:53:09]  _/ // (7 7    // /  / / / _/  
[23:53:09] /___/\___/_/|_/___/ /_/ /___/ 
[23:53:09]
[23:53:09] ver. 1.6.0#20160518-sha1:0b22c45b
[23:53:09] 2016 Copyright(C) Apache Software Foundation
[23:53:09]
[23:53:09] Ignite documentation: http://ignite.apache.org
[23:53:09]
[23:53:09] Quiet mode.
[23:53:09]   ^-- Logging to file '/opt/ignite/work/log/ignite-5bb10d6a.0.log'
[23:53:09]   ^-- To see **FULL** console log here add -DIGNITE_QUIET=false or "-v" to ignite.{sh|bat}
[23:53:09]
[23:53:09] OS: Linux 4.5.2-aufs amd64
[23:53:09] VM information: Java(TM) SE Runtime Environment 1.8.0_92-b14 Oracle Corporation Java HotSpot(TM) 64-Bit Server VM 25.92-b14
[23:53:09] Configured plugins:
[23:53:09]   ^-- None
[23:53:09]
[23:53:09] Security status [authentication=off, tls/ssl=off]
[23:54:35] Performance suggestions for grid  (fix if possible)
[23:54:35] To disable, set -DIGNITE_PERFORMANCE_SUGGESTIONS_DISABLED=true
[23:54:35]   ^-- Decrease number of backups (set 'backups' to 0)
[23:54:35]
[23:54:35] To start Console Management & Monitoring run ignitevisorcmd.{sh|bat}
[23:54:35]
[23:54:35] Ignite node started OK (id=5bb10d6a)
[23:54:35] Topology snapshot [ver=1, servers=1, clients=0, CPUs=2, heap=1.0GB]

Ignite0 and Ignite1 does not communicate to each other normally.

# docker -H :4000 exec -it ignite1 bash
root@8578c039e823:/opt/ignite# ping ignite0                                                                                                
PING ignite0 (10.0.1.2): 56 data bytes
64 bytes from 10.0.1.2: icmp_seq=0 ttl=64 time=0.367 ms
64 bytes from 10.0.1.2: icmp_seq=1 ttl=64 time=0.364 ms
^C--- ignite0 ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.364/0.365/0.367/0.000 ms
root@8578c039e823:/opt/ignite# ping ignite1
PING ignite1 (10.0.1.3): 56 data bytes
64 bytes from 10.0.1.3: icmp_seq=0 ttl=64 time=0.061 ms
64 bytes from 10.0.1.3: icmp_seq=1 ttl=64 time=0.053 ms
^C--- ignite1 ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.053/0.057/0.061/0.000 ms
root@8578c039e823:/opt/ignite# </dev/tcp/ignite0/47500 && echo Port is open || echo Port is closed 
Port is open
root@8578c039e823:/opt/ignite# </dev/tcp/ignite1/47500 && echo Port is open || echo Port is closed
Port is open
root@8578c039e823:/opt/ignite# </dev/tcp/ignite1/4444 && echo Port is open || echo Port is closed
bash: connect: Connection refused
bash: /dev/tcp/ignite1/4444: Connection refused
Port is closed

Test port accessibility and it seems work find. But Ignote0 and Ignite1 is not clustering well.
Anybody help?

Thanks a lot.

====
Dockerfile
====
FROM base/java8

RUN set -x \
 && apt-get update \
 && apt-get -y install zip

# Ignite version
ENV IGNITE_VERSION 1.6.0
COPY files/apache-ignite-fabric-${IGNITE_VERSION}-bin.zip /opt/ignite.zip
# Ignite home
ENV IGNITE_HOME /opt/ignite
RUN set -x\
 && cd /opt \
 && unzip ignite.zip \
 && mv /opt/apache-ignite-fabric-${IGNITE_VERSION}-bin ${IGNITE_HOME} \
 && rm ignite.zip
COPY files/ignite.xml $IGNITE_HOME
WORKDIR ${IGNITE_HOME}
ENTRYPOINT ["bin/ignite.sh"]
CMD ignite.xml

====
ignite.xml
====
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:security="http://www.springframework.org/schema/security"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
        xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.1.xsd
          http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.1.xsd
          http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-4.0.xsd">

        <!-- ignite session replication -->

        <bean id="ignite.cfg" class="org.apache.ignite.configuration.IgniteConfiguration">
                <property name="cacheConfiguration">
                        <list>
                                <!-- Partitioned cache example configuration (Atomic mode). -->
                                <!-- <bean class="org.apache.ignite.configuration.CacheConfiguration">
                                        <property name="atomicityMode" value="ATOMIC" /> <property name="backups"
                                        value="1" /> </bean> -->
                                <bean id="partitioned" class="org.apache.ignite.configuration.CacheConfiguration">
                                        <!-- Cache name. -->
                                        <property name="name" value="partitioned" />
                                        <!-- Cache mode. -->
                                        <property name="cacheMode" value="PARTITIONED" />
                                        <property name="backups" value="1" />

                                        <!-- Set up LRU eviction policy with 10000 sessions limit. -->
                                        <!--
                                        <property name="evictionPolicy">
                                                <bean
                                                        class="org.apache.ignite.cache.eviction.lru.CacheLruEvictionPolicy">
                                                        <property name="maxSize" value="10000" />
                                                </bean>
                                        </property>
                                         -->
                                </bean>
                        </list>
                </property>

                <!-- 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="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"-->
                                        <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
                                                <!--property name="multicastGroup" value="228.10.10.157"/-->
                                                <property name="addresses">
                                                        <list>
                                                                <value>10.0.1.2:47500..47509</value>
                                                                <value>10.0.1.3:47500..47509</value>
                                                        </list>
                                                </property>
                                        </bean>
                                </property>
                        </bean>
                </property>
        </bean>
</beans>

--
scsi

Alexei Scherbakov Alexei Scherbakov
Reply | Threaded
Open this post in threaded view
|

Re: Issue of ignite run in docker

In reply to this post by Joe chen
Have you tried the recommended approach to run Ignite in docker? [1]


2016-05-28 3:12 GMT+03:00 Joe chen <[hidden email]>:
I wish ignite run in docker and share data between different computer.
First I use  default bridge network  and  "export port" by docker parameter "-p 47500-47509:47500:47509".
But it seem not work.

So I decide to use overlay network. I referent docker official document to build docker overlay network with swarm.
I run httpd container on computer0 to proxy tomcat container on computer1 and It work fine. So I think the docker overlay network is workable.

Then I run Ignite container on computer0 and  another Ignite on computer1

 # docker -H :4000 run -d --name ignite0 --net sris4 --env="constraint:node==t0srv" base/ignite
4b318089a747b63b41dfd4b46552a1178feb21c6439f5618fa253041d308df7a
 # docker -H :4000 run -d --name ignite1 --net sris4 --env="constraint:node==t1srv" base/ignite
8578c039e823433251999db42acfbd5aeddd3f0de10dac51eb5c419c01a02955
# docker -H :4000 ps
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS                               NAMES
8578c039e823        base/ignite         "bin/ignite.sh /bin/s"   2 minutes ago       Up 2 minutes                                            t1srv/ignite1
4b318089a747        base/ignite         "bin/ignite.sh /bin/s"   2 minutes ago       Up 2 minutes                                            t0srv/ignite0
# docker -H :4000 logs  ignite0 
[23:52:46]    __________  ________________
[23:52:46]   /  _/ ___/ |/ /  _/_  __/ __/
[23:52:46]  _/ // (7 7    // /  / / / _/  
[23:52:46] /___/\___/_/|_/___/ /_/ /___/ 
[23:52:46]
[23:52:46] ver. 1.6.0#20160518-sha1:0b22c45b
[23:52:46] 2016 Copyright(C) Apache Software Foundation
[23:52:46]
[23:52:46] Ignite documentation: http://ignite.apache.org
[23:52:46]
[23:52:46] Quiet mode.
[23:52:46]   ^-- Logging to file '/opt/ignite/work/log/ignite-4b7bd44a.0.log'
[23:52:46]   ^-- To see **FULL** console log here add -DIGNITE_QUIET=false or "-v" to ignite.{sh|bat}
[23:52:46]
[23:52:46] OS: Linux 4.5.2-aufs amd64
[23:52:46] VM information: Java(TM) SE Runtime Environment 1.8.0_92-b14 Oracle Corporation Java HotSpot(TM) 64-Bit Server VM 25.92-b14
[23:52:46] Configured plugins:
[23:52:46]   ^-- None
[23:52:46]
[23:52:46] Security status [authentication=off, tls/ssl=off]
[23:53:08] Performance suggestions for grid  (fix if possible)
[23:53:08] To disable, set -DIGNITE_PERFORMANCE_SUGGESTIONS_DISABLED=true
[23:53:08]   ^-- Decrease number of backups (set 'backups' to 0)
[23:53:08]
[23:53:08] To start Console Management & Monitoring run ignitevisorcmd.{sh|bat}
[23:53:08]
[23:53:08] Ignite node started OK (id=4b7bd44a)
[23:53:08] Topology snapshot [ver=1, servers=1, clients=0, CPUs=16, heap=1.0GB]
[23:53:39] Topology snapshot [ver=2, servers=2, clients=0, CPUs=18, heap=2.0GB]
[23:53:39] Topology snapshot [ver=3, servers=1, clients=0, CPUs=16, heap=1.0GB]
[23:54:09] Topology snapshot [ver=5, servers=2, clients=0, CPUs=18, heap=2.0GB]
[23:54:09] Topology snapshot [ver=5, servers=1, clients=0, CPUs=16, heap=1.0GB]
[23:54:40] Topology snapshot [ver=7, servers=2, clients=0, CPUs=18, heap=2.0GB]
[23:54:40] Topology snapshot [ver=7, servers=1, clients=0, CPUs=16, heap=1.0GB]
# docker -H :4000 logs  ignite1
[23:53:09]    __________  ________________
[23:53:09]   /  _/ ___/ |/ /  _/_  __/ __/
[23:53:09]  _/ // (7 7    // /  / / / _/  
[23:53:09] /___/\___/_/|_/___/ /_/ /___/ 
[23:53:09]
[23:53:09] ver. 1.6.0#20160518-sha1:0b22c45b
[23:53:09] 2016 Copyright(C) Apache Software Foundation
[23:53:09]
[23:53:09] Ignite documentation: http://ignite.apache.org
[23:53:09]
[23:53:09] Quiet mode.
[23:53:09]   ^-- Logging to file '/opt/ignite/work/log/ignite-5bb10d6a.0.log'
[23:53:09]   ^-- To see **FULL** console log here add -DIGNITE_QUIET=false or "-v" to ignite.{sh|bat}
[23:53:09]
[23:53:09] OS: Linux 4.5.2-aufs amd64
[23:53:09] VM information: Java(TM) SE Runtime Environment 1.8.0_92-b14 Oracle Corporation Java HotSpot(TM) 64-Bit Server VM 25.92-b14
[23:53:09] Configured plugins:
[23:53:09]   ^-- None
[23:53:09]
[23:53:09] Security status [authentication=off, tls/ssl=off]
[23:54:35] Performance suggestions for grid  (fix if possible)
[23:54:35] To disable, set -DIGNITE_PERFORMANCE_SUGGESTIONS_DISABLED=true
[23:54:35]   ^-- Decrease number of backups (set 'backups' to 0)
[23:54:35]
[23:54:35] To start Console Management & Monitoring run ignitevisorcmd.{sh|bat}
[23:54:35]
[23:54:35] Ignite node started OK (id=5bb10d6a)
[23:54:35] Topology snapshot [ver=1, servers=1, clients=0, CPUs=2, heap=1.0GB]

Ignite0 and Ignite1 does not communicate to each other normally.

# docker -H :4000 exec -it ignite1 bash
root@8578c039e823:/opt/ignite# ping ignite0                                                                                                
PING ignite0 (10.0.1.2): 56 data bytes
64 bytes from 10.0.1.2: icmp_seq=0 ttl=64 time=0.367 ms
64 bytes from 10.0.1.2: icmp_seq=1 ttl=64 time=0.364 ms
^C--- ignite0 ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.364/0.365/0.367/0.000 ms
root@8578c039e823:/opt/ignite# ping ignite1
PING ignite1 (10.0.1.3): 56 data bytes
64 bytes from 10.0.1.3: icmp_seq=0 ttl=64 time=0.061 ms
64 bytes from 10.0.1.3: icmp_seq=1 ttl=64 time=0.053 ms
^C--- ignite1 ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.053/0.057/0.061/0.000 ms
root@8578c039e823:/opt/ignite# </dev/tcp/ignite0/47500 && echo Port is open || echo Port is closed 
Port is open
root@8578c039e823:/opt/ignite# </dev/tcp/ignite1/47500 && echo Port is open || echo Port is closed
Port is open
root@8578c039e823:/opt/ignite# </dev/tcp/ignite1/4444 && echo Port is open || echo Port is closed
bash: connect: Connection refused
bash: /dev/tcp/ignite1/4444: Connection refused
Port is closed

Test port accessibility and it seems work find. But Ignote0 and Ignite1 is not clustering well.
Anybody help?

Thanks a lot.

====
Dockerfile
====
FROM base/java8

RUN set -x \
 && apt-get update \
 && apt-get -y install zip

# Ignite version
ENV IGNITE_VERSION 1.6.0
COPY files/apache-ignite-fabric-${IGNITE_VERSION}-bin.zip /opt/ignite.zip
# Ignite home
ENV IGNITE_HOME /opt/ignite
RUN set -x\
 && cd /opt \
 && unzip ignite.zip \
 && mv /opt/apache-ignite-fabric-${IGNITE_VERSION}-bin ${IGNITE_HOME} \
 && rm ignite.zip
COPY files/ignite.xml $IGNITE_HOME
WORKDIR ${IGNITE_HOME}
ENTRYPOINT ["bin/ignite.sh"]
CMD ignite.xml

====
ignite.xml
====
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:security="http://www.springframework.org/schema/security"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
        xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.1.xsd
          http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.1.xsd
          http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-4.0.xsd">

        <!-- ignite session replication -->

        <bean id="ignite.cfg" class="org.apache.ignite.configuration.IgniteConfiguration">
                <property name="cacheConfiguration">
                        <list>
                                <!-- Partitioned cache example configuration (Atomic mode). -->
                                <!-- <bean class="org.apache.ignite.configuration.CacheConfiguration">
                                        <property name="atomicityMode" value="ATOMIC" /> <property name="backups"
                                        value="1" /> </bean> -->
                                <bean id="partitioned" class="org.apache.ignite.configuration.CacheConfiguration">
                                        <!-- Cache name. -->
                                        <property name="name" value="partitioned" />
                                        <!-- Cache mode. -->
                                        <property name="cacheMode" value="PARTITIONED" />
                                        <property name="backups" value="1" />

                                        <!-- Set up LRU eviction policy with 10000 sessions limit. -->
                                        <!--
                                        <property name="evictionPolicy">
                                                <bean
                                                        class="org.apache.ignite.cache.eviction.lru.CacheLruEvictionPolicy">
                                                        <property name="maxSize" value="10000" />
                                                </bean>
                                        </property>
                                         -->
                                </bean>
                        </list>
                </property>

                <!-- 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="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"-->
                                        <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
                                                <!--property name="multicastGroup" value="228.10.10.157"/-->
                                                <property name="addresses">
                                                        <list>
                                                                <value>10.0.1.2:47500..47509</value>
                                                                <value>10.0.1.3:47500..47509</value>
                                                        </list>
                                                </property>
                                        </bean>
                                </property>
                        </bean>
                </property>
        </bean>
</beans>

--
scsi



--

Best regards,
Alexei Scherbakov
Joe chen Joe chen
Reply | Threaded
Open this post in threaded view
|

Re: Issue of ignite run in docker

In reply to this post by Nikolai Tikhonov


nikolay,

I use docker overlay  network, It  seems  no  need to export port to  outside.
docker  in comput0 and comput1 can ping to each other.

I wii try option -v and try to findout some used information.

--
Scsi

Hi Joe Chen,

Could you please run ignite in verbose mode and share logs? In verbose mode Ignite prints useful information which should clarify your issue.

ENTRYPOINT ["bin/ignite.sh -v"]

Also you opened ports for Discovery, but need to open ports for Communication too.

 -p 47100-47109:47100-47109 

On Sat, May 28, 2016 at 3:12 AM, Joe chen <[hidden email]> wrote:
I wish ignite run in docker and share data between different computer.
First I use  default bridge network  and  "export port" by docker parameter "-p 47500-47509:47500:47509".
But it seem not work.

So I decide to use overlay network. I referent docker official document to build docker overlay network with swarm.
I run httpd container on computer0 to proxy tomcat container on computer1 and It work fine. So I think the docker overlay network is workable.

Then I run Ignite container on computer0 and  another Ignite on computer1

 # docker -H :4000 run -d --name ignite0 --net sris4 --env="constraint:node==t0srv" base/ignite
4b318089a747b63b41dfd4b46552a1178feb21c6439f5618fa253041d308df7a
 # docker -H :4000 run -d --name ignite1 --net sris4 --env="constraint:node==t1srv" base/ignite
8578c039e823433251999db42acfbd5aeddd3f0de10dac51eb5c419c01a02955
# docker -H :4000 ps
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS                               NAMES
8578c039e823        base/ignite         "bin/ignite.sh /bin/s"   2 minutes ago       Up 2 minutes                                            t1srv/ignite1
4b318089a747        base/ignite         "bin/ignite.sh /bin/s"   2 minutes ago       Up 2 minutes                                            t0srv/ignite0
# docker -H :4000 logs  ignite0 
[23:52:46]    __________  ________________
[23:52:46]   /  _/ ___/ |/ /  _/_  __/ __/
[23:52:46]  _/ // (7 7    // /  / / / _/  
[23:52:46] /___/\___/_/|_/___/ /_/ /___/ 
[23:52:46]
[23:52:46] ver. 1.6.0#20160518-sha1:0b22c45b
[23:52:46] 2016 Copyright(C) Apache Software Foundation
[23:52:46]
[23:52:46] Ignite documentation: http://ignite.apache.org
[23:52:46]
[23:52:46] Quiet mode.
[23:52:46]   ^-- Logging to file '/opt/ignite/work/log/ignite-4b7bd44a.0.log'
[23:52:46]   ^-- To see **FULL** console log here add -DIGNITE_QUIET=false or "-v" to ignite.{sh|bat}
[23:52:46]
[23:52:46] OS: Linux 4.5.2-aufs amd64
[23:52:46] VM information: Java(TM) SE Runtime Environment 1.8.0_92-b14 Oracle Corporation Java HotSpot(TM) 64-Bit Server VM 25.92-b14
[23:52:46] Configured plugins:
[23:52:46]   ^-- None
[23:52:46]
[23:52:46] Security status [authentication=off, tls/ssl=off]
[23:53:08] Performance suggestions for grid  (fix if possible)
[23:53:08] To disable, set -DIGNITE_PERFORMANCE_SUGGESTIONS_DISABLED=true
[23:53:08]   ^-- Decrease number of backups (set 'backups' to 0)
[23:53:08]
[23:53:08] To start Console Management & Monitoring run ignitevisorcmd.{sh|bat}
[23:53:08]
[23:53:08] Ignite node started OK (id=4b7bd44a)
[23:53:08] Topology snapshot [ver=1, servers=1, clients=0, CPUs=16, heap=1.0GB]
[23:53:39] Topology snapshot [ver=2, servers=2, clients=0, CPUs=18, heap=2.0GB]
[23:53:39] Topology snapshot [ver=3, servers=1, clients=0, CPUs=16, heap=1.0GB]
[23:54:09] Topology snapshot [ver=5, servers=2, clients=0, CPUs=18, heap=2.0GB]
[23:54:09] Topology snapshot [ver=5, servers=1, clients=0, CPUs=16, heap=1.0GB]
[23:54:40] Topology snapshot [ver=7, servers=2, clients=0, CPUs=18, heap=2.0GB]
[23:54:40] Topology snapshot [ver=7, servers=1, clients=0, CPUs=16, heap=1.0GB]
# docker -H :4000 logs  ignite1
[23:53:09]    __________  ________________
[23:53:09]   /  _/ ___/ |/ /  _/_  __/ __/
[23:53:09]  _/ // (7 7    // /  / / / _/  
[23:53:09] /___/\___/_/|_/___/ /_/ /___/ 
[23:53:09]
[23:53:09] ver. 1.6.0#20160518-sha1:0b22c45b
[23:53:09] 2016 Copyright(C) Apache Software Foundation
[23:53:09]
[23:53:09] Ignite documentation: http://ignite.apache.org
[23:53:09]
[23:53:09] Quiet mode.
[23:53:09]   ^-- Logging to file '/opt/ignite/work/log/ignite-5bb10d6a.0.log'
[23:53:09]   ^-- To see **FULL** console log here add -DIGNITE_QUIET=false or "-v" to ignite.{sh|bat}
[23:53:09]
[23:53:09] OS: Linux 4.5.2-aufs amd64
[23:53:09] VM information: Java(TM) SE Runtime Environment 1.8.0_92-b14 Oracle Corporation Java HotSpot(TM) 64-Bit Server VM 25.92-b14
[23:53:09] Configured plugins:
[23:53:09]   ^-- None
[23:53:09]
[23:53:09] Security status [authentication=off, tls/ssl=off]
[23:54:35] Performance suggestions for grid  (fix if possible)
[23:54:35] To disable, set -DIGNITE_PERFORMANCE_SUGGESTIONS_DISABLED=true
[23:54:35]   ^-- Decrease number of backups (set 'backups' to 0)
[23:54:35]
[23:54:35] To start Console Management & Monitoring run ignitevisorcmd.{sh|bat}
[23:54:35]
[23:54:35] Ignite node started OK (id=5bb10d6a)
[23:54:35] Topology snapshot [ver=1, servers=1, clients=0, CPUs=2, heap=1.0GB]

Ignite0 and Ignite1 does not communicate to each other normally.

# docker -H :4000 exec -it ignite1 bash
root@8578c039e823:/opt/ignite# ping ignite0                                                                                                
PING ignite0 (10.0.1.2): 56 data bytes
64 bytes from 10.0.1.2: icmp_seq=0 ttl=64 time=0.367 ms
64 bytes from 10.0.1.2: icmp_seq=1 ttl=64 time=0.364 ms
^C--- ignite0 ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.364/0.365/0.367/0.000 ms
root@8578c039e823:/opt/ignite# ping ignite1
PING ignite1 (10.0.1.3): 56 data bytes
64 bytes from 10.0.1.3: icmp_seq=0 ttl=64 time=0.061 ms
64 bytes from 10.0.1.3: icmp_seq=1 ttl=64 time=0.053 ms
^C--- ignite1 ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.053/0.057/0.061/0.000 ms
root@8578c039e823:/opt/ignite# </dev/tcp/ignite0/47500 && echo Port is open || echo Port is closed 
Port is open
root@8578c039e823:/opt/ignite# </dev/tcp/ignite1/47500 && echo Port is open || echo Port is closed
Port is open
root@8578c039e823:/opt/ignite# </dev/tcp/ignite1/4444 && echo Port is open || echo Port is closed
bash: connect: Connection refused
bash: /dev/tcp/ignite1/4444: Connection refused
Port is closed

Test port accessibility and it seems work find. But Ignote0 and Ignite1 is not clustering well.
Anybody help?

Thanks a lot.

====
Dockerfile
====
FROM base/java8

RUN set -x \
 && apt-get update \
 && apt-get -y install zip

# Ignite version
ENV IGNITE_VERSION 1.6.0
COPY files/apache-ignite-fabric-${IGNITE_VERSION}-bin.zip /opt/ignite.zip
# Ignite home
ENV IGNITE_HOME /opt/ignite
RUN set -x\
 && cd /opt \
 && unzip ignite.zip \
 && mv /opt/apache-ignite-fabric-${IGNITE_VERSION}-bin ${IGNITE_HOME} \
 && rm ignite.zip
COPY files/ignite.xml $IGNITE_HOME
WORKDIR ${IGNITE_HOME}
ENTRYPOINT ["bin/ignite.sh"]
CMD ignite.xml

====
ignite.xml
====
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:security="http://www.springframework.org/schema/security"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
        xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.1.xsd
          http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.1.xsd
          http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-4.0.xsd">

        <!-- ignite session replication -->

        <bean id="ignite.cfg" class="org.apache.ignite.configuration.IgniteConfiguration">
                <property name="cacheConfiguration">
                        <list>
                                <!-- Partitioned cache example configuration (Atomic mode). -->
                                <!-- <bean class="org.apache.ignite.configuration.CacheConfiguration">
                                        <property name="atomicityMode" value="ATOMIC" /> <property name="backups"
                                        value="1" /> </bean> -->
                                <bean id="partitioned" class="org.apache.ignite.configuration.CacheConfiguration">
                                        <!-- Cache name. -->
                                        <property name="name" value="partitioned" />
                                        <!-- Cache mode. -->
                                        <property name="cacheMode" value="PARTITIONED" />
                                        <property name="backups" value="1" />

                                        <!-- Set up LRU eviction policy with 10000 sessions limit. -->
                                        <!--
                                        <property name="evictionPolicy">
                                                <bean
                                                        class="org.apache.ignite.cache.eviction.lru.CacheLruEvictionPolicy">
                                                        <property name="maxSize" value="10000" />
                                                </bean>
                                        </property>
                                         -->
                                </bean>
                        </list>
                </property>

                <!-- 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="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"-->
                                        <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
                                                <!--property name="multicastGroup" value="228.10.10.157"/-->
                                                <property name="addresses">
                                                        <list>
                                                                <value>10.0.1.2:47500..47509</value>
                                                                <value>10.0.1.3:47500..47509</value>
                                                        </list>
                                                </property>
                                        </bean>
                                </property>
                        </bean>
                </property>
        </bean>
</beans>

--
scsi