Elasticsearch, Logstash and Kibana with Docker Compose

I am trying to start all 3 apps with docker-compose command using the following docker-compose.yml file:

version: '2'
services:
kibana:
image: docker.elastic.co/kibana/kibana:5.3.0
links:
- elasticsearch
ports:
- 5601:5601

logstash:
image: docker.elastic.co/logstash/logstash:5.3.0
links:
- elasticsearch
ports:
- 5044:5044

elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:5.3.0
cap_add:
- IPC_LOCK
volumes:
- esdata1:/usr/share/elasticsearch/data
ports:
- 9200:9200

volumes:
esdata1:
driver: local

When all three containers start I see the following errors in terminal and I am not able to reach Kibana:

kibana_1 | {"type":"log","@timestamp":"2017-04-08T20:05:12Z","tags":["warning","elasticsearch","admin"],"pid":7,"message":"No living connections"}
kibana_1 | {"type":"log","@timestamp":"2017-04-08T20:05:12Z","tags":["warning","elasticsearch","admin"],"pid":7,"message":"Unable to revive connection: http://elasticsearch:9200/"}

[2017-04-08T20:05:27,517][INFO ][o.e.n.Node ] [hJd3Yol] started
[2017-04-08T20:05:39,047][ERROR][o.e.x.m.c.i.IndicesStatsCollector] [hJd3Yol] collector [indices-stats-collector] failed to collect data
org.elasticsearch.cluster.block.ClusterBlockException: blocked by: [SERVICE_UNAVAILABLE/1/state not recovered / initialized];
at org.elasticsearch.cluster.block.ClusterBlocks.globalBlockedException(ClusterBlocks.java:165) ~[elasticsearch-5.3.0.jar:5.3.0]

Does anybody have any ideas about the issue and how it could be resolved? (Below are some more logs if needed)
Thanks.

elasticsearch_1 | [2017-04-08T20:18:25,685][INFO ][o.e.x.s.t.n.SecurityNetty4HttpServerTransport] [hJd3Yol] publish_address {172.19.0.2:9200}, bound_addresses {[::]:9200}
elasticsearch_1 | [2017-04-08T20:18:25,942][INFO ][o.e.n.Node ] [hJd3Yol] started
kibana_1 | {"type":"log","@timestamp":"2017-04-08T20:18:30Z","tags":["status","plugin:xpack_main@5.3.0","error"],"pid":6,"state":"red","message":"Status changed from red to red - Request Timeout after 3000ms","prevState":"red","prevMsg":"Unable to connect to Elasticsearch at http://elasticsearch:9200."}
kibana_1 | {"type":"log","@timestamp":"2017-04-08T20:18:30Z","tags":["status","plugin:graph@5.3.0","error"],"pid":6,"state":"red","message":"Status changed from red to red - Request Timeout after 3000ms","prevState":"red","prevMsg":"Unable to connect to Elasticsearch at http://elasticsearch:9200."}
kibana_1 | {"type":"log","@timestamp":"2017-04-08T20:18:30Z","tags":["status","plugin:reporting@5.3.0","error"],"pid":6,"state":"red","message":"Status changed from red to red - Request Timeout after 3000ms","prevState":"red","prevMsg":"Unable to connect to Elasticsearch at http://elasticsearch:9200."}
kibana_1 | {"type":"log","@timestamp":"2017-04-08T20:18:30Z","tags":["status","plugin:security@5.3.0","error"],"pid":6,"state":"red","message":"Status changed from red to red - Request Timeout after 3000ms","prevState":"red","prevMsg":"Unable to connect to Elasticsearch at http://elasticsearch:9200."}
kibana_1 | {"type":"log","@timestamp":"2017-04-08T20:18:30Z","tags":["status","plugin:searchprofiler@5.3.0","error"],"pid":6,"state":"red","message":"Status changed from red to red - Request Timeout after 3000ms","prevState":"red","prevMsg":"Unable to connect to Elasticsearch at http://elasticsearch:9200."}
kibana_1 | {"type":"log","@timestamp":"2017-04-08T20:18:30Z","tags":["status","plugin:tilemap@5.3.0","error"],"pid":6,"state":"red","message":"Status changed from red to red - Request Timeout after 3000ms","prevState":"red","prevMsg":"Unable to connect to Elasticsearch at http://elasticsearch:9200."}
kibana_1 | {"type":"log","@timestamp":"2017-04-08T20:18:30Z","tags":["status","plugin:elasticsearch@5.3.0","error"],"pid":6,"state":"red","message":"Status changed from red to red - Request Timeout after 3000ms","prevState":"red","prevMsg":"Unable to connect to Elasticsearch at http://elasticsearch:9200."}
elasticsearch_1 | [2017-04-08T20:18:39,714][ERROR][o.e.x.m.c.i.IndicesStatsCollector] [hJd3Yol] collector [indices-stats-collector] failed to collect data
elasticsearch_1 | org.elasticsearch.cluster.block.ClusterBlockException: blocked by: [SERVICE_UNAVAILABLE/1/state not recovered / initialized];
elasticsearch_1 | at org.elasticsearch.cluster.block.ClusterBlocks.globalBlockedException(ClusterBlocks.java:165) ~[elasticsearch-5.3.0.jar:5.3.0]
elasticsearch_1 | at org.elasticsearch.action.admin.indices.stats.TransportIndicesStatsAction.checkGlobalBlock(TransportIndicesStatsAction.java:70) ~[elasticsearch-5.3.0.jar:5.3.0]

You should remove the "Links" param from the docker-compose file as that sets the address where the container can be accessed and right now you're setting it as "elasticsearch" for all 3 containers.

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