Logstash exited with code 0

Hi, for some reasons my logstash shut down when I run docker-compose up. Anyone has an idea please ?

version: "3.7"

services:
  elasticsearch:
    image: elasticsearch:7.9.2
    ports:
      - "9200:9200"
    environment:
      - discovery.type=single-node
    ulimits:
      memlock:
        soft: -1
        hard: -1
    networks:
      - nginx-proxy
      - elk

  kibana:
    image: kibana:7.9.2
    ports:
      - "5601:5601"
    volumes:
      - ../nginx/elk.conf:/etc/nginx/conf.d/elk.conf
    networks:
      - nginx-proxy
      - elk

  logstash:
    image: logstash:7.9.2
    ports:
      - "5000:5000"
    volumes:
      - ../../elk/logstash_pipeline:/usr/share/logstash/pipeline:ro
    depends_on:
      - kibana
      - elasticsearch
    networks:
      - nginx-proxy
      - elk
networks:
  nginx-proxy:
    external: true
  elk:
    external: true
logstash_1       | OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
// other logs
logstash_1       | WARNING: An illegal reflective access operation has occurred
logstash_1       | WARNING: Illegal reflective access by org.jruby.ext.openssl.SecurityHelper (file:/tmp/jruby-1/jruby11509565763536589453jopenssl.jar) to field java.security.MessageDigest.provider
logstash_1       | WARNING: Please consider reporting this to the maintainers of org.jruby.ext.openssl.SecurityHelper
logstash_1       | WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
logstash_1       | WARNING: All illegal access operations will be denied in a future release
logstash_1       | Sending Logstash logs to /usr/share/logstash/logs which is now configured via log4j2.properties
logstash_1       | [2022-02-09T08:48:18,834][INFO ][logstash.runner          ] Starting Logstash {"logstash.version"=>"7.9.2", "jruby.version"=>"jruby 9.2.13.0 (2.5.7) 2020-08-03 9a89c94bcc OpenJDK 64-Bit Server VM 11.0.8+10-LTS on 11.0.8+10-LTS +indy +jit [linux-x86_64]"}
logstash_1       | [2022-02-09T08:48:18,894][INFO ][logstash.setting.writabledirectory] Creating directory {:setting=>"path.queue", :path=>"/usr/share/logstash/data/queue"}
logstash_1       | [2022-02-09T08:48:18,912][INFO ][logstash.setting.writabledirectory] Creating directory {:setting=>"path.dead_letter_queue", :path=>"/usr/share/logstash/data/dead_letter_queue"}
logstash_1       | [2022-02-09T08:48:19,532][INFO ][logstash.agent           ] No persistent UUID file found. Generating new UUID {:uuid=>"9fee35bf-63a7-4b78-9a1b-95d7f2e339e2", :path=>"/usr/share/logstash/data/uuid"}
logstash_1       | [2022-02-09T08:48:20,075][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
logstash_1       | [2022-02-09T08:48:20,080][WARN ][deprecation.logstash.monitoringextension.pipelineregisterhook] Internal collectors option for Logstash monitoring is deprecated and targeted for removal in the next major version.
logstash_1       | Please configure Metricbeat to monitor Logstash. Documentation can be found at: 
logstash_1       | https://www.elastic.co/guide/en/logstash/current/monitoring-with-metricbeat.html
logstash_1       | [2022-02-09T08:48:21,269][INFO ][logstash.licensechecker.licensereader] Elasticsearch pool URLs updated {:changes=>{:removed=>[], :added=>[http://elasticsearch:9200/]}}
logstash_1       | [2022-02-09T08:48:21,684][WARN ][logstash.licensechecker.licensereader] Restored connection to ES instance {:url=>"http://elasticsearch:9200/"}
logstash_1       | [2022-02-09T08:48:21,799][INFO ][logstash.licensechecker.licensereader] ES Output version determined {:es_version=>7}
logstash_1       | [2022-02-09T08:48:21,805][WARN ][logstash.licensechecker.licensereader] Detected a 6.x and above cluster: the `type` event field won't be used to determine the document _type {:es_version=>7}
logstash_1       | [2022-02-09T08:48:22,101][INFO ][logstash.monitoring.internalpipelinesource] Monitoring License OK
logstash_1       | [2022-02-09T08:48:22,103][INFO ][logstash.monitoring.internalpipelinesource] Validated license for monitoring. Enabling monitoring pipeline.
logstash_1       | [2022-02-09T08:48:22,894][ERROR][logstash.agent           ] Failed to execute action {:action=>LogStash::PipelineAction::Create/pipeline_id:main, :exception=>"LogStash::ConfigurationError", :message=>"Expected one of [ \\t\\r\\n], \"#\", \"input\", \"filter\", \"output\" at line 7, column 1 (byte 41) after ", :backtrace=>["/usr/share/logstash/logstash-core/lib/logstash/compiler.rb:32:in `compile_imperative'", "org/logstash/execution/AbstractPipelineExt.java:183:in `initialize'", "org/logstash/execution/JavaBasePipelineExt.java:69:in `initialize'", "/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:44:in `initialize'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline_action/create.rb:52:in `execute'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:357:in `block in converge_state'"]}
logstash_1       | [2022-02-09T08:48:24,124][INFO ][org.reflections.Reflections] Reflections took 61 ms to scan 1 urls, producing 22 keys and 45 values 
logstash_1       | [2022-02-09T08:48:24,416][INFO ][logstash.outputs.elasticsearchmonitoring][.monitoring-logstash] Elasticsearch pool URLs updated {:changes=>{:removed=>[], :added=>[http://elasticsearch:9200/]}}
logstash_1       | [2022-02-09T08:48:24,439][WARN ][logstash.outputs.elasticsearchmonitoring][.monitoring-logstash] Restored connection to ES instance {:url=>"http://elasticsearch:9200/"}
logstash_1       | [2022-02-09T08:48:24,454][INFO ][logstash.outputs.elasticsearchmonitoring][.monitoring-logstash] ES Output version determined {:es_version=>7}
logstash_1       | [2022-02-09T08:48:24,455][WARN ][logstash.outputs.elasticsearchmonitoring][.monitoring-logstash] Detected a 6.x and above cluster: the `type` event field won't be used to determine the document _type {:es_version=>7}
logstash_1       | [2022-02-09T08:48:24,524][INFO ][logstash.outputs.elasticsearchmonitoring][.monitoring-logstash] New Elasticsearch output {:class=>"LogStash::Outputs::ElasticSearchMonitoring", :hosts=>["http://elasticsearch:9200"]}
logstash_1       | [2022-02-09T08:48:24,541][WARN ][logstash.javapipeline    ][.monitoring-logstash] 'pipeline.ordered' is enabled and is likely less efficient, consider disabling if preserving event order is not necessary
logstash_1       | [2022-02-09T08:48:24,670][INFO ][logstash.javapipeline    ][.monitoring-logstash] Starting pipeline {:pipeline_id=>".monitoring-logstash", "pipeline.workers"=>1, "pipeline.batch.size"=>2, "pipeline.batch.delay"=>50, "pipeline.max_inflight"=>2, "pipeline.sources"=>["monitoring pipeline"], :thread=>"#<Thread:0xb4d6bbc run>"}
logstash_1       | [2022-02-09T08:48:25,789][INFO ][logstash.javapipeline    ][.monitoring-logstash] Pipeline Java execution initialization time {"seconds"=>1.11}
logstash_1       | [2022-02-09T08:48:25,831][INFO ][logstash.javapipeline    ][.monitoring-logstash] Pipeline started {"pipeline.id"=>".monitoring-logstash"}
logstash_1       | [2022-02-09T08:48:26,232][INFO ][logstash.agent           ] Successfully started Logstash API endpoint {:port=>9600}
logstash_1       | [2022-02-09T08:48:28,140][INFO ][logstash.javapipeline    ] Pipeline terminated {"pipeline.id"=>".monitoring-logstash"}
**logstash_1       | [2022-02-09T08:48:28,214][INFO ][logstash.runner          ] Logstash shut down.**
**elk_logstash_1 exited with code 0**

my ports.conf

input {
  tcp {
    port => 5000
  }
}

ouput {
  elasticsearch {
    hosts => ["elasticsarch:9200"]
    index => ["hello-logstash-docker"]
  }
}

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