Hi, Of course it could not work, because in brige mode a container address
can not be bound on the host address ! But I think I nailed it eventually.
The configuration directives for BasicAddressResolver must be written for the
whole cluster, in the right direction, so I have put a different forced @IP for
each container on each node. With hosts being 10.17.10.55 and 10.17.10.56,
holding respectively containers with @IP 192.168.10.10 and 192.168.10.20, here
is my working config file :
10.17.10.55
10.17.10.56
Only "consistentId" differs and local network container setup of course.
Regards
Le 13-Dec-2022 07:06:36 +0100, [email protected] a crit:
Hi, localAddress is a property of TcpDIscoverySpi configuration and localHost
is the property of IgniteConfiguration.
Could you please show the whole ignite-config.xml with localHost
property defined?
--
Best regards,
Aleksandr
On 2022/12/08 15:44:41 [email protected] wrote:
> Hi, I t seems the property "localHost" is not valid. Is it supposed to be the
> same as "localAddress" ?
> https://ignite.apache.org/docs/latest/clustering/network-configuration I have
> read the docs about BasicAddressResolver but none of my attemps worked. It
> has been mentioned as a solution here [email protected]/msg30041.html"
> target="_blank">https://www.mail-archive.com/[email protected]/msg30041.html
> but unfortunately no example is provided. So I have tried alternatively :
> but no result so far, I am still investigating. Regards
>
> Le 07-Dec-2022 15:18:45 +0100, [email protected] a crit:
> Here is a javadoc for BasicAddressResolver that has an example
> https://ignite.apache.org/releases/latest/javadoc/org/apache/ignite/configuration/BasicAddressResolver.html
> Also, you could setup config file to have the property localHost set to your
> host IP for each container.
>
> 10.17.10.55 I hope it will work for you. -- Best regards, Aleksandr
>
> On 2022/12/07 12:49:27 [email protected] wrote:
> > Hello again, This is my main problem : I can't use "network" mode because
> > we already use user namespaces on these machines. And it's not compatible.
> > Some posts here and there suggested BasicAddressResolver could be solution,
> > but no example was provided and I am not really sure about what is offers
> > and what it doesn't. So I gave a try, but it seems it is not a workaround.
> > If there is no way to cluster it with NAT involved, I will have to find
> > another database. Regards
> >
> > Le 07-Dec-2022 13:38:50 +0100, [email protected] a crit:
> > Thank you for the valuable information. "with forced IP 192.168.1.99" -- I
> > think this is the reason. Ignite node does not know that its real IP is
> > 10.17.10.55. If it is possible to use host docker network I believe it
> > should help. https://docs.docker.com/network/host/ So, try to run both
> > docker containers with --network host. -- Best regards, Aleksandr
> >
> > On 2022/12/07 10:35:13 [email protected] wrote:
> > > Hi, 10.17.10.55 and 10.17.10.56 are the addresses of the VMs hosting the
> > > containers.
> > > My Ignite containers are based on the official image. So when I am logged
> > > (with "docker exec") into the one hosted on 10.17.10.55, with forced IP
> > > 192.168.1.99 (as it is not possible to force an address withing the
> > > "default" range) : bash-5.1# hostname
> > > aac1698dd409 bash-5.1# ip a
> > > 1: lo: mtu 65536 qdisc noqueue state UNKNOWN qlen 1000
> > > link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
> > > inet 127.0.0.1/8 scope host lo
> > > valid_lft forever preferred_lft forever
> > > 11982: eth0@if11983: mtu 1500 qdisc noqueue state UP
> > > link/ether 02:42:c0:a8:01:63 brd ff:ff:ff:ff:ff:ff
> > > inet 192.168.1.99/16 brd 192.168.255.255 scope global eth0
> > > valid_lft forever preferred_lft forever
> > > bash-5.1# ping 10.17.10.56
> > > PING 10.17.10.56 (10.17.10.56): 56 data bytes
> > > 64 bytes from 10.17.10.56: seq=0 ttl=63 time=0.413 ms
> > > 64 bytes from 10.17.10.56: seq=1 ttl=63 time=0.352 ms
> > > bash-5.1# echo "10800 11211 47100 47500" | xargs -n 1 nc -vz 10.17.10.56
> > > 10.17.10.56 (10.17.10.56:10800) open
> > > 10.17.10.56 (10.17.10.56:11211) open
> > > 10.17.10.56 (10.17.10.56:47100) open
> > > 10.17.10.56 (10.17.10.56:47500) open It seems ports exposed by the
> > > container hosted by the other VM can be reached. And of course, form the
> > > host itself : echo "10800 11211 47100 47500" | xargs -n 1 nc -vz
> > > 10.17.10.56
> > > Connection to 10.17.10.56 10800 port [tcp/*] succeeded!
> > > Connection to 10.17.10.56 11211 port [tcp/*] succeeded!
> > > Connection to 10.17.10.56 47100 port [tcp/*] succeeded!
> > > Connection to 10.17.10.56 47500 port [tcp/*] succeeded! echo "10800 11211
> > > 47100 47500" | xargs -n 1 nc -vz 10.17.10.55
> > > Connection to 10.17.10.55 10800 port [tcp/*] succeeded!
> > > Connection to 10.17.10.55 11211 port [tcp/*] succeeded!
> > > Connection to 10.17.10.55 47100 port [tcp/*] succeeded!
> > > Connection to 10.17.10.55 47500 port [tcp/*] succeeded! Without adding
> > > the forced IP and the BasicAddressResolver I had the same results.
> > > Regards
> > >
> > > Le 07-Dec-2022 11:03:55 +0100, [email protected] a crit:
> > > Thanks for the clarification. It seems like your containers could not see
> > > each other via network. Could you please perform "cross check" out of the
> > > container? Say, you enter to the container with ip 10.17.10.55 and try to
> > > perform check to 10.17.10.56. You can use 'docker exec -it bash' to enter
> > > to the container. If there is no connection between containers, try to
> > > configure the docker network for therm. More info here
> > > https://docs.docker.com/network/network-tutorial-standalone/ -- Best
> > > regards, Aleksandr
> > >
> > > On 2022/12/06 08:27:20 [email protected] wrote:
> > > > Hi, Here is the whole configuration file with my latest experiements :
> > > >
> > > > 10.17.10.55
> > > > 10.17.10.56
> > > >
> > > > 10.17.10.55 and 56 are the external addresses of the the hosts. Of
> > > > course each node as a different interfal IP address and ConsistendId.
> > > > Regards
> > > >
> > > > Le 05-Dec-2022 12:59:39 +0100, [email protected] a crit:
> > > > Hi, could you please share the TCP/IP Discovery configuration? If you
> > > > have not configured it please check this
> > > > https://ignite.apache.org/docs/latest/clustering/tcp-ip-discovery --
> > > > Best regards, Aleksandr
> > > >
> > > > On 2022/11/25 11:27:19 [email protected] wrote:
> > > > > Hi, I am trying to setup a two nodes replicated cluster, in an
> > > > > active/passive way. On each node, a Java webapp will be accessing the
> > > > > local database instance using JDBC. The app itself is stateless, but
> > > > > I need synced datas from the database. Ignite seems to be a nice
> > > > > choice, as I don't need advanced SQL features but replication and
> > > > > simplicity. So I am running an Ignite container on two differents
> > > > > hosts (10.17.10.55 and 10.17.10.56), using : docker run -v
> > > > > "/tmp/ignite.xml:/opt/ignite/apache-ignite/config/default-config.xml"
> > > > > -p "10800:10800" -p "11211:11211" -p "47100:47100" -p "47500:47500"
> > > > > -p "49112:49112" apacheignite/ignite:latest And here is the content
> > > > > of the file "ignite.xml" (of course, "consistentId" value is
> > > > > different for each host, the rest is the same).
> > > > >
> > > > > 10.17.10.55
> > > > > 10.17.10.56
> > > > >
> > > > > As far as I can see, when the containers are up, ports are exposed
> > > > > and firewall does not block communications (I have runned these two
> > > > > commands on both hosts, in order to "cross check"): echo "10800 11211
> > > > > 47100 47500" | xargs nc -vz 10.17.10.55
> > > > > Connection to 10.17.10.55 10800 port [tcp/*] succeeded!
> > > > > Connection to 10.17.10.55 11211 port [tcp/*] succeeded!
> > > > > Connection to 10.17.10.55 47100 port [tcp/*] succeeded!
> > > > > Connection to 10.17.10.55 47500 port [tcp/*] succeeded! echo "10800
> > > > > 11211 47100 47500" | xargs nc -vz 10.17.10.56
> > > > > Connection to 10.17.10.56 10800 port [tcp/*] succeeded!
> > > > > Connection to 10.17.10.56 11211 port [tcp/*] succeeded!
> > > > > Connection to 10.17.10.56 47100 port [tcp/*] succeeded!
> > > > > Connection to 10.17.10.56 47500 port [tcp/*] succeeded! But the two
> > > > > Ignite instances don't seem to communicate, as I get an error message
> > > > > like : Failed to connect to any address from IP finder (make sure IP
> > > > > finder addresses are correct and firewalls are disabled on all host
> > > > > machines): [/10.17.10.55:47500, /10.17.10.56:47500] Did I miss
> > > > > something ? A quick and dirty try with a local docker-compose and a
> > > > > config file which is the base of the one I tried here was running
> > > > > flawlessly. Regards
> > > > >
> > > > > -------------------------------------------------------------------------------------------------
> > > > > FreeMail powered by mail.fr
> > > > >
> > > > -------------------------------------------------------------------------------------------------
> > > > FreeMail powered by mail.fr
> > > >
> > > > -------------------------------------------------------------------------------------------------
> > > > FreeMail powered by mail.fr
> > > >
> > >
> > > -------------------------------------------------------------------------------------------------
> > > FreeMail powered by mail.fr
> > >
> >
> > -------------------------------------------------------------------------------------------------
> > FreeMail powered by mail.fr
> >
>
> -------------------------------------------------------------------------------------------------
> FreeMail powered by mail.fr
>
-------------------------------------------------------------------------------------------------
FreeMail powered by mail.fr