Logstash not connecting to anything in docker

I am basically having an issue with logstash exiting. The logs I am getting are:

log1 | OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
log1 | WARNING: An illegal reflective access operation has occurred
log1 | WARNING: Illegal reflective access by com.headius.backport9.modules.Modules (file:/usr/share/logstash/logstash-core/lib/jars/jruby-complete-9.2.9.0.jar) to method sun.nio.ch.NativeThread.signal(long)
log1 | WARNING: Please consider reporting this to the maintainers of com.headius.backport9.modules.Modules
log1 | WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
log1 | WARNING: All illegal access operations will be denied in a future release
log1 | Sending Logstash logs to /usr/share/logstash/logs which is now configured via log4j2.properties
log1 | [2020-02-26T23:00:58,702][WARN ][logstash.config.source.multilocal] Ignoring the 'pipelines.yml' file because modules or command line options are specified
log1 | [2020-02-26T23:00:58,714][INFO ][logstash.runner ] Starting Logstash {"logstash.version"=>"7.6.0"}
log1 | [2020-02-26T23:00:59,437][WARN ][logstash.monitoringextension.pipelineregisterhook] xpack.monitoring.enabled has not been defined, but found elasticsearch configuration. Please explicitly set xpack.monitoring.enabled: true in logstash.yml
log1 | [2020-02-26T23:01:00,445][INFO ][logstash.licensechecker.licensereader] Elasticsearch pool URLs updated {:changes=>{:removed=>, :added=>[http://elasticsearch:9200/]}}
log1 | [2020-02-26T23:01:10,703][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"}
log1 | [2020-02-26T23:01:10,759][WARN ][logstash.licensechecker.licensereader] Marking url as dead. Last error: [LogStash::Outputs::ElasticSearch::HttpClient::Pool::HostUnreachableError] Elasticsearch Unreachable: [http://elasticsearch:9200/][Manticore::ResolutionFailure] elasticsearch {:url=>http://elasticsearch:9200/, :error_message=>"Elasticsearch Unreachable: [http://elasticsearch:9200/][Manticore::ResolutionFailure] elasticsearch", :error_class=>"LogStash::Outputs::ElasticSearch::HttpClient::Pool::HostUnreachableError"}
log1 | [2020-02-26T23:01:10,768][ERROR][logstash.licensechecker.licensereader] Unable to retrieve license information from license server {:message=>"Elasticsearch Unreachable: [http://elasticsearch:9200/][Manticore::ResolutionFailure] elasticsearch"}
log1 | [2020-02-26T23:01:10,825][ERROR][logstash.monitoring.internalpipelinesource] Failed to fetch X-Pack information from Elasticsearch. This is likely due to failure to reach a live Elasticsearch cluster.
log1 | [2020-02-26T23:01:10,969][INFO ][logstash.config.source.local.configpathloader] No config files found in path {:path=>"/config-dir/logstash.conf"}
log1 | [2020-02-26T23:01:10,976][ERROR][logstash.config.sourceloader] No configuration found in the configured sources.
log1 | [2020-02-26T23:01:11,246][INFO ][logstash.agent ] Successfully started Logstash API endpoint {:port=>9600}
log1 | [2020-02-26T23:01:16,148][INFO ][logstash.runner ] Logstash shut down.
log1 exited with code 1

My docker-compose file looks like this...
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=log01
- cluster.initial_master_nodes=es01
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
volumes:
- data01:/usr/share/elasticsearch/data
ports:
- 9200:9200
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
links:
- es01
command: logstash -f /config-dir/logstash.conf
depends_on:
- es01
volumes:
- data02:/usr/share/elasticsearch/data
networks:
- elastic
volumes:
data01:
driver: local
data02:
driver: local

networks:
elastic:
driver: bridge

any help would be greatly appreciated

My docker compose file looks like this:

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