MemgraphDB Replication

:bug: Bug Report

Description

This must be obvious setting somewhere which i would like to clarified. I have memgraphDB docker running on two node. I want to make one node as main , other one as replica. I couldn’t register replica on main using " REGISTER REPLICA pnode2 ASYNC TO <Node 2 IP Address>:1000" . Because i am getting node2 docker ip using docker inspect command on node2, but that docker IP is private (bridge network). In this case where is the option to set IP or hostname accessible from node1 for memgraphDB replication.

  1. Is it change in docker bridge network
  2. Is it HostIP setting change in memgraphDB conf file, if so where it is ?
  3. Is it runtime command line option to set the docker IP ?
  4. Is this configurable within memgraphDB

Steps to reproduce

(Write your steps here:)

Step 1: docker run -p 7687:7687 -p 7444:7444 -v mg_lib:/var/lib/memgraph memgraph/memgraph ( on node 1)
Step 2: docker run -p 7687:7687 -p 7444:7444 -v mg_lib:/var/lib/memgraph memgraph/memgraph ( on node2)
Step 3: docker inspect -f ‘{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}’ ==> find the IP on node2
Step 4: docker run -it --entrypoint=mgconsole memgraph/memgraph --host ( connect to node 2 memgraphDB)
Step 5: SET REPLICATION ROLE TO REPLICA WITH PORT 10000 ==> to assign replica role
Step 6: docker run -p 7687:7687 -p 7444:7444 -v mg_lib:/var/lib/memgraph memgraph/memgraph ( on node1)
Step 7: docker run -it --entrypoint=mgconsole memgraph/memgraph --host ( connect to node1 memgraphDB)
Step 8: REGISTER REPLICA name ASYNC TO <socket_address>; (socket address is IP from node2:1000)

Expected behavior

If i do the same on single node i am able to replicate, the question is how to do the same in two node setup using docker container

(Write what you thought would happen.)

Actual behavior

(Write what happened. Add full console log messages and screenshots, if applicable.)

Your environment

  • Memgraph version used
    Latest
  • Operating system and version (e.g., Ubuntu 20.04.2 LTS)
    Ubuntu 20

Added this as additional info inside [BUG] Replication issues in SYNC mode · Issue #373 · memgraph/memgraph · GitHub

1 Like