# Elasticsearch reporting unhealty status

**URL:** <https://discuss.elastic.co/t/elasticsearch-reporting-unhealty-status/176382>\
**Category:** Elasticsearch\
**Tags:** docker\
**Created:** [April 11, 2019, 10:45am UTC](https://discuss.elastic.co/t/elasticsearch-reporting-unhealty-status/176382 "2019-04-11T10:45:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Luis\_Pereira1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/luis_pereira1/32/43046_2.png) [@Luis\_Pereira1](https://discuss.elastic.co/u/Luis_Pereira1)\
**Post date:** [April 11, 2019, 10:45am UTC](https://discuss.elastic.co/t/elasticsearch-reporting-unhealty-status/176382/1 "2019-04-11T10:45:25Z")

</div>

hi,

Im having an issue after upgrading my elastic stack from version 6.7 to 7.0 the elasticsearch is reporting unhealthy status but the container is up.

 ![elastic%20unhealthy](https://us1.discourse-cdn.com/elastic/original/3X/6/4/6467aa0e8301a366d7ce421da9dd5b03174b8c1e.jpeg)

Things i tried to get it working again, create a new network, delete the volumes, change the java environment variables to use less ram.

This is my docker-compose file

version: '3.6'  
services:

es01:  
image: [docker.elastic.co/elasticsearch/elasticsearch:7.0.0](http://docker.elastic.co/elasticsearch/elasticsearch:7.0.0)  
container\_name: es01  
environment:  
- node.name=es01  
- cluster.initial\_master\_nodes=es01,es02  
- cluster.name=docker-cluster  
- bootstrap.memory\_lock=true  
- "ES\_JAVA\_OPTS=-Xms512m -Xmx512m"  
ulimits:  
memlock:  
soft: -1  
hard: -1  
volumes:  
- esdata01:/usr/share/elasticsearch/data  
ports:  
- 9200:9200  
networks:  
- elknet  
es02:  
image: [docker.elastic.co/elasticsearch/elasticsearch:7.0.0](http://docker.elastic.co/elasticsearch/elasticsearch:7.0.0)  
container\_name: es02  
environment:  
- node.name=es02  
- discovery.seed\_hosts=es01  
- cluster.initial\_master\_nodes=es01,es02  
- cluster.name=docker-cluster  
- bootstrap.memory\_lock=true  
- "ES\_JAVA\_OPTS=-Xms512m -Xmx512m"  
ulimits:  
memlock:  
soft: -1  
hard: -1  
volumes:  
- esdata02:/usr/share/elasticsearch/data  
networks:  
- elknet

kibana:  
image: [docker.elastic.co/kibana/kibana:7.0.0](http://docker.elastic.co/kibana/kibana:7.0.0)  
container\_name: kibana  
environment:  
- SERVER\_NAME:kibana  
- ELASTICSEARCH\_HOSTS:http://es01:9200´  
ports:  
- 5601:5601  
networks:  
- elknet  
restart: on-failure

logstash:  
image: [docker.elastic.co/logstash/logstash:7.0.0](http://docker.elastic.co/logstash/logstash:7.0.0)  
container\_name: logstash  
environment:  
- ES\_JAVA\_OPTS="-Xms1g -Xmx1g"  
volumes:  
- logstashp:/usr/share/logstash/pipeline/  
- logstashc:/usr/share/logstash/config/  
ports:  
- 5000:5000  
- 5044-5044  
networks:  
- elknet  
restart: on-failure

heartbeat:  
image: [docker.elastic.co/beats/heartbeat:7.0.0](http://docker.elastic.co/beats/heartbeat:7.0.0)  
container\_name: heartbeat  
hostname: heartbeat  
user: root  
command: --strict.perms=false  
volumes:  
- heartbeatyml:/usr/share/heartbeat  
networks:  
- elknet

packetbeat:  
image: [docker.elastic.co/beats/packetbeat:7.0.0](http://docker.elastic.co/beats/packetbeat:7.0.0)  
container\_name: packetbeat  
hostname: packetbeat  
command: --strict.perms=false  
cap\_add:  
- NET\_RAW  
- NET\_ADMIN  
volumes:  
- packetbyml:/usr/share/packetbeat  
networks:  
- elknet

filebeat:  
image: [docker.elastic.co/beats/filebeat:7.0.0](http://docker.elastic.co/beats/filebeat:7.0.0)  
container\_name: filebeat  
hostname: filebeat  
command: --strict.perms=false  
ports:  
- 9000:9000  
volumes:  
- filebeatyml:/usr/share/filebeat  
- docker.sock:/var/run/docker.sock  
networks:  
- elknet

volumes:  
esdata01:  
driver: local  
esdata02:  
driver: local  
logstashp:  
driver: local  
logstashc:  
driver: local  
heartbeatyml:  
driver: local  
packetbyml:  
driver: local  
filebeatyml:  
driver: local  
docker.sock:  
driver: local

networks:  
elknet:  
driver: bridge

Any help would be much appreciated

I did one more test on the elasticsearch connection with success

![imagem](https://us1.discourse-cdn.com/elastic/original/3X/a/3/a31773d1de43dc08a27432ee5031cf0b0a8a0e8b.png)

---

<div class="post-metadata">

**Author:** ![Yogesh\_Gaikwad](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yogesh_gaikwad/32/27025_2.png) [@Yogesh\_Gaikwad](https://discuss.elastic.co/u/Yogesh_Gaikwad)\
**Post date:** [April 15, 2019, 10:25am UTC](https://discuss.elastic.co/t/elasticsearch-reporting-unhealty-status/176382/2 "2019-04-15T10:25:20Z")

</div>

Hi @Luis_Pereira1,

The default health check is performed by invoking status API:  
`curl -fsSL http://localhost:9200/_cat/health?h=status`

Could you please check what is the health status on your ES container?  
You might need to see the logs to identify if there was something that prevents the cluster status to be `green`.  
With no logs its difficult to identify what might be happening in your case.

Thanks and Regards,  
Yogesh Gaikwad

---

<div class="post-metadata">

**Author:** ![Luis\_Pereira1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/luis_pereira1/32/43046_2.png) [@Luis\_Pereira1](https://discuss.elastic.co/u/Luis_Pereira1)\
**Post date:** [April 15, 2019, 5:56pm UTC](https://discuss.elastic.co/t/elasticsearch-reporting-unhealty-status/176382/3 "2019-04-15T17:56:14Z")

</div>

Hi,

I have fix this problem, my docker compose file needed to specify a master elasticsearch after i did that it started working.

But thank you anyway 😉

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 13, 2019, 5:56pm UTC](https://discuss.elastic.co/t/elasticsearch-reporting-unhealty-status/176382/4 "2019-05-13T17:56:17Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
