Elasticsearch cluster configuration problem
brunolinsalves opened this issue · comments
Hi,
I'm using ambar, but I want to use an elasticsearch cluster (with two nodes). So, I changed docker-compose.yml to the following:
version: "2.1"
networks:
internal_network:
services:
elasticsearch1:
image: ambar/ambar-es:latest
container_name: elasticsearch1
environment:
- cluster.name=docker-cluster
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
ulimits:
memlock:
soft: -1
hard: -1
mem_limit: 1g
volumes:
- /dados/system/es/es-01:/usr/share/elasticsearch/data
ports:
- 9200:9200
networks:
- internal_network
elasticsearch2:
image: ambar/ambar-es:latest
environment:
- cluster.name=docker-cluster
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
- "discovery.zen.ping.unicast.hosts=elasticsearch1"
ulimits:
memlock:
soft: -1
hard: -1
mem_limit: 1g
volumes:
- /dados/system/es/es-02:/usr/share/elasticsearch/data
networks:
- internal_network
But, when I execute the command: curl -X GET "localhost:9200/_cluster/health?pretty", I notice that the cluster was not mounted correctly:
{
"cluster_name" : "elasticsearch",
"status" : "yellow",
"timed_out" : false,
"number_of_nodes" : 1,
"number_of_data_nodes" : 1,
"active_primary_shards" : 4,
"active_shards" : 4,
"relocating_shards" : 0,
"initializing_shards" : 0,
"unassigned_shards" : 4,
"delayed_unassigned_shards" : 0,
"number_of_pending_tasks" : 0,
"number_of_in_flight_fetch" : 0,
"task_max_waiting_in_queue_millis" : 0,
"active_shards_percent_as_number" : 50.0
}
If I use the image used by the amber Dockerfile (elasticsearch:5.6.3), the cluster mounts perfectly.
Can anybody help me?
Thanks!
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.