Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] - Troubleshooting Connection Issues When Setting Up an OpenSearch Cluster Across Multiple Ubuntu Virtual Machines #17068

Open
toituhoclaptrinh opened this issue Jan 21, 2025 · 0 comments
Labels
bug Something isn't working Cluster Manager untriaged

Comments

@toituhoclaptrinh
Copy link

Describe the bug

Troubleshooting Connection Issues When Setting Up an OpenSearch Cluster Across Multiple Ubuntu Virtual Machines

Related component

Cluster Manager

To Reproduce

I am trying to set up an OpenSearch cluster with 2 nodes on two different Ubuntu 22.04 virtual machine instances with the following IPs:
os01: 10.34.132.37
os02: 10.34.132.230

I have pinged and confirmed that they can communicate with each other.

On each instance, I will install OpenSearch using Docker (specifically Docker Compose) as follows:
Instance IP 10.34.132.37:
`version: '3.8'

services:
os01:
restart: always
image: opensearchproject/opensearch:2.15.0
environment:
- cluster.name=opensearch-cluster
- node.name=os01
- discovery.seed_hosts=10.34.132.37,10.34.132.230
- cluster.initial_master_nodes=10.34.132.37,10.34.132.230
- "OPENSEARCH_JAVA_OPTS=-Xms2g -Xmx2g"
- bootstrap.memory_lock=true
- network.host=0.0.0.0
- OPENSEARCH_INITIAL_ADMIN_PASSWORD=a!Str0ng686#@!
ulimits:
memlock:
soft: -1
hard: -1
volumes:
# - ./custom-opensearch.yml:/usr/share/opensearch/config/opensearch.yml
- os-data1:/usr/share/opensearch/data
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "1"
ports:
- 9200:9200
- 9600:9600
- 9300:9300
networks:
- opensearch-network
kibana:
restart: always
image: opensearchproject/opensearch-dashboards:2.15.0
environment:
OPENSEARCH_HOSTS: '["https://10.34.132.37:9200", "https://10.34.132.230:9200"]'
OPENSEARCH_USERNAME: "admin"
OPENSEARCH_PASSWORD: "a!Str0ng686#@!"
server.host: "0.0.0.0"
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "1"
depends_on:
- os01
ports:
- 5601:5601
networks:
- opensearch-network

volumes:
os-data1:

networks:
opensearch-network:
driver: bridge`

Instance IP 10.34.132.230:

`version: '3.8'

services:
os02:
restart: always
image: opensearchproject/opensearch:2.15.0
environment:
- cluster.name=opensearch-cluster
- node.name=os02
- discovery.seed_hosts=10.34.132.37,10.34.132.230
- cluster.initial_master_nodes=10.34.132.37,10.34.132.230
- "OPENSEARCH_JAVA_OPTS=-Xms2g -Xmx2g"
- bootstrap.memory_lock=true
- network.host=0.0.0.0
- OPENSEARCH_INITIAL_ADMIN_PASSWORD=a!Str0ng686#@!
ulimits:
memlock:
soft: -1
hard: -1
volumes:
# - ./custom-opensearch.yml:/usr/share/opensearch/config/opensearch.yml
- os-data1:/usr/share/opensearch/data
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "1"
ports:
- 9200:9200
- 9600:9600
- 9300:9300
networks:
- opensearch-network

volumes:
os-data1:

networks:
opensearch-network:
driver: bridge
`

However, when I run it, it shows an error like this:

Image

I have also tried customizing the settings in opensearch.yml like this:

`cluster.name: test-cluster

node.name: node-1
node.roles: [master, data, ingest]

network.host: 0.0.0.0
http.port: 9200

discovery.seed_hosts:

  • 10.34.132.37
  • 10.34.132.230

cluster.initial_master_nodes:

  • node-1
  • node-2

bootstrap.memory_lock: true
plugins.security.disabled: true

cluster.name: test-cluster
node.name: node-2
node.roles: [master, data, ingest]

network.host: 0.0.0.0
http.port: 9200

discovery.seed_hosts:

  • 10.34.132.37
  • 10.34.132.230

cluster.initial_master_nodes:

  • node-1
  • node-2

bootstrap.memory_lock: true
plugins.security.disabled: true

`

Can you help me with this?

Expected behavior

I want them to connect with each other and be on the same OpenSearch cluster.

Additional Details

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Cluster Manager untriaged
Projects
Status: 🆕 New
Development

No branches or pull requests

1 participant