Logstash not seeing elastic?

So I am getting this message in docker-compose...
log1 | [2020-02-26T12:40:38,174][WARN ][logstash.licensechecker.licensereader] Attempted to resurrect connection to dead ES instance, but got an error. {:url=>"http://elasticsearch:9200/", :error_type=>LogStash::Outputs::ElasticSearch::HttpClient::Pool::HostUnreachableError, :error=>"Elasticsearch Unreachable: [http://elasticsearch:9200/][Manticore::ResolutionFailure] elasticsearch: Name or service not known"}

I don't know docker too well but am using a docker-compose.yml file as shown below:
version: '2.2'
services:
es01:
image: docker.elastic.co/elasticsearch/elasticsearch:7.6.0
container_name: es01
environment:
- node.name=es01
- cluster.name=es-docker-cluster
- discovery.seed_hosts=es02,log01
- cluster.initial_master_nodes=es01,es02
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
volumes:
- data01:/usr/share/elasticsearch/data
ports:
- 9200:9200
networks:
- elastic

es02:
image: docker.elastic.co/elasticsearch/elasticsearch:7.6.0
container_name: es02
environment:
- node.name=es02
- cluster.name=es-docker-cluster
- discovery.seed_hosts=es01,log01
- cluster.initial_master_nodes=es01,es02
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
volumes:
- data02:/usr/share/elasticsearch/data
ports:
- 9201:9201
networks:
- elastic

kib01:
image: docker.elastic.co/kibana/kibana:7.6.0
container_name: kib01
ports:
- 5601:5601
environment:
ELASTICSEARCH_URL: http://es01:9200
ELASTICSEARCH_HOSTS: http://es01:9200
networks:
- elastic

log1:
image: docker.elastic.co/logstash/logstash:7.6.0
container_name: log1
environment:
- cluster.initial_master_nodes=es01,es02
ELASTICSEARCH_URL: http://es01:9200
ELASTICSEARCH_HOSTS: http://es01:9200
volumes:
- data03:/usr/share/elasticsearch/data
networks:
- elastic

volumes:
data01:
driver: local
data02:
driver: local
data03:
driver: local

networks:
elastic:
driver: bridge

Most of this is taken directly from the help documentation. Could anyone shed any light or have any tips to get this working?

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