Opensearch Deployment Docker compose in multiple node in different machine IP

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):
Docker compose file

opensearchproject/opensearch:latest

Describe the issue:
I need to connect the master node with slave node, but is not communication with each node, master node in one machine and slave node in one machine both are different IP how to solve

Master Node IP : 10.0.1.70
Slave Node IP : 10.0.1.86

Master Node Docker-compose file:
Master node

version: '3'
services:
  opensearch-master:
    image: opensearchproject/opensearch:latest
    container_name: opensearch-master
    environment:
      - cluster.name=opensearch-cluster
      - node.name=opensearch-master
      - discovery.seed_hosts=10.0.1.86:9200
      - cluster.initial_master_nodes=opensearch-master,10.0.1.86
      - bootstrap.memory_lock=true
      - "OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m"
    ulimits:
      memlock:
        soft: -1
        hard: -1
      nofile:
        soft: 65536
        hard: 65536
    volumes:
      - opensearch-data-master:/usr/share/opensearch/data
    ports:
      - 9200:9200
      - 9600:9600
    networks:
      - opensearch-net

  opensearch-dashboards:
    image: opensearchproject/opensearch-dashboards:latest
    container_name: opensearch-dashboards
    ports:
      - 5601:5601
    expose:
      - "5601"
    environment:
      - 'OPENSEARCH_HOSTS=["https://opensearch-master:9200","https://10.0.1.86:9200"]'
    networks:
      - opensearch-net

volumes:
  opensearch-data-master:

networks:
  opensearch-net:

slave - 1

version: '3'
services:
  opensearch-slave-1:
    image: opensearchproject/opensearch:latest
    container_name: opensearch-slave-1
    environment:
      - cluster.name=opensearch-cluster
      - node.name=opensearch-slave-1
      - discovery.seed_hosts=10.0.1.70:9200
      - cluster.initial_master_nodes=opensearch-slave-1,10.0.1.70
      - bootstrap.memory_lock=true
      - "OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m"
    ulimits:
      memlock:
        soft: -1
        hard: -1
      nofile:
        soft: 65536
        hard: 65536
    volumes:
      - opensearch-data-slave-1:/usr/share/opensearch/data
    ports:
      - 9200:9200
      - 9600:9600
    networks:
      - opensearch-net

volumes:
  opensearch-data-slave-1:

networks:
  opensearch-net:

I need the solve, can anyone help me
Configuration:

Relevant Logs or Screenshots:

Master node docker container logs

Slave node dokcer container logs

opensearch-slave-1  | [2024-01-18T12:51:23,757][WARN ][o.o.c.c.ClusterFormationFailureHelper] [opensearch-slave-1] cluster-manager not discovered yet, this node has not previously joined a bootstrapped cluster, and this node must discover cluster-manager-eligible nodes [opensearch-slave-1, 10.0.1.70] to bootstrap a cluster: have discovered [{opensearch-slave-1}{bm5lHvMaQ2W8tOJWcHxo6g}{4F5PX_48Q-m4Rn821TZYwA}{192.168.64.2}{192.168.64.2:9300}{dimr}{shard_indexing_pressure_enabled=true}]; discovery will continue using [10.0.1.70:9200] from hosts providers and [{opensearch-slave-1}{bm5lHvMaQ2W8tOJWcHxo6g}{4F5PX_48Q-m4Rn821TZYwA}{192.168.64.2}{192.168.64.2:9300}{dimr}{shard_indexing_pressure_enabled=true}] from last-known cluster state; node term 0, last-accepted version 0 in term 0
opensearch-slave-1  | [2024-01-18T12:51:23,852][INFO ][o.o.s.c.ConfigurationRepository] [opensearch-slave-1] Wait for cluster to be available ...
opensearch-slave-1  | [2024-01-18T12:51:24,213][ERROR][o.o.s.a.BackendRegistry  ] [opensearch-slave-1] Not yet initialized (you may need to run securityadmin)
opensearch-slave-1  | [2024-01-18T12:51:24,218][ERROR][o.o.s.a.BackendRegistry  ] [opensearch-slave-1] Not yet initialized (you may need to run securityadmin)
opensearch-slave-1  | [2024-01-18T12:51:24,852][INFO ][o.o.s.c.ConfigurationRepository] [opensearch-slave-1] Wait for cluster to be available ...
opensearch-slave-1  | [2024-01-18T12:51:25,852][INFO ][o.o.s.c.ConfigurationRepository] [opensearch-slave-1] Wait for cluster to be available ...
opensearch-slave-1  | [2024-01-18T12:51:26,714][ERROR][o.o.s.a.BackendRegistry  ] [opensearch-slave-1] Not yet initialized (you may need to run securityadmin)
opensearch-slave-1  | [2024-01-18T12:51:26,719][ERROR][o.o.s.a.BackendRegistry  ] [opensearch-slave-1] Not yet initialized (you may need to run securityadmin)
opensearch-slave-1  | [2024-01-18T12:51:26,853][INFO ][o.o.s.c.ConfigurationRepository] [opensearch-slave-1] Wait for cluster to be available ...
opensearch-slave-1  | [2024-01-18T12:51:27,853][INFO ][o.o.s.c.ConfigurationRepository] [opensearch-slave-1] Wait for cluster to be available ...
opensearch-slave-1  | [2024-01-18T12:51:28,853][INFO ][o.o.s.c.ConfigurationRepository] [opensearch-slave-1] Wait for cluster to be available ...
opensearch-slave-1  | [2024-01-18T12:51:29,215][ERROR][o.o.s.a.BackendRegistry  ] [opensearch-slave-1] Not yet initialized (you may need to run securityadmin)
opensearch-slave-1  | [2024-01-18T12:51:29,219][ERROR][o.o.s.a.BackendRegistry  ] [opensearch-slave-1] Not yet initialized (you may need to run securityadmin)
opensearch-slave-1  | [2024-01-18T12:51:29,853][INFO ][o.o.s.c.ConfigurationRepository] [opensearch-slave-1] Wait for cluster to be available ...
opensearch-slave-1  | [2024-01-18T12:51:30,854][INFO ][o.o.s.c.ConfigurationRepository] [opensearch-slave-1] Wait for cluster to be available ...
opensearch-slave-1  | [2024-01-18T12:51:31,716][ERROR][o.o.s.a.BackendRegistry  ] [opensearch-slave-1] Not yet initialized (you may need to run securityadmin)
opensearch-slave-1  | [2024-01-18T12:51:31,722][ERROR][o.o.s.a.BackendRegistry  ] [opensearch-slave-1] Not yet initialized (you may need to run securityadmin)
opensearch-slave-1  | [2024-01-18T12:51:31,854][INFO ][o.o.s.c.ConfigurationRepository] [opensearch-slave-1] Wait for cluster to be available ...

@Md_Rafi The discovery.seed_hosts and cluster.initial_master_nodes are pointing to themselves. You should include the other node in each configuration.

Master Node IP : 10.0.1.70
Slave Node IP : 10.0.1.86

No, each docker compose file are point to
Slave node docker compose is pointing to master node IP
Master node docker compose is pointing to slave node IP

One doubt regarding the discovery.seed_hosts and cluster.initial_master_node how to point

@Md_Rafi If you take a look at the docker example, you’ll notice that both containers have both nodes configured.
Have you tried that approach?