# Logstash shut down immediately after starting

**URL:** <https://discuss.elastic.co/t/logstash-shut-down-immediately-after-starting/251642>\
**Category:** Logstash\
**Created:** [October 10, 2020, 10:55am UTC](https://discuss.elastic.co/t/logstash-shut-down-immediately-after-starting/251642 "2020-10-10T10:55:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![emaravi](https://avatars.discourse-cdn.com/v4/letter/e/6f9a4e/32.png) [@emaravi](https://discuss.elastic.co/u/emaravi)\
**Post date:** [October 10, 2020, 10:55am UTC](https://discuss.elastic.co/t/logstash-shut-down-immediately-after-starting/251642/1 "2020-10-10T10:55:34Z")

</div>

`[2020-10-10T05:30:55,854][WARN][logstash.config.source.multilocal] Ignoring the 'pipelines.yml' file because modules or command line options are specified`  
`[2020-10-10T05:30:57,935][INFO][org.reflections.Reflections] Reflections took 31 ms to scan 1 urls, producing 22 keys and 45 values`  
`[2020-10-10T05:30:59,051][INFO][logstash.outputs.elasticsearch][main] Elasticsearch pool URLs updated {:changes=>{:removed=>[], :added=>[http://localhost:9200/]}}`  
`[2020-10-10T05:30:59,327][WARN][logstash.outputs.elasticsearch][main] Restored connection to ES instance {:url=>"http://localhost:9200/"}`  
`[2020-10-10T05:30:59,382][INFO][logstash.outputs.elasticsearch][main] ES Output version determined {:es_version=>7}`  
`[2020-10-10T05:30:59,387][WARN][logstash.outputs.elasticsearch][main] Detected a 6.x and above cluster: the `type` event field won't be used to determine the document _type {:es_version=>7}`  
`[2020-10-10T05:30:59,445][INFO][logstash.outputs.elasticsearch][main] New Elasticsearch output {:class=>"LogStash::Outputs::ElasticSearch", :hosts=>["//localhost:9200"]}`  
`[2020-10-10T05:30:59,564][INFO][logstash.outputs.elasticsearch][main] Using a default mapping template {:es_version=>7, :ecs_compatibility=>:disabled}`  
`[2020-10-10T05:30:59,650][INFO][logstash.outputs.elasticsearch][main] Attempting to install template {:manage_template=>{"index_patterns"=>"logstash-*", "version"=>60001, "settings"=>{"index.refresh_interval"=>"5s", "number_of_shards"=>1}, "mappings"=>{"dynamic_templates"=>[{"message_field"=>{"path_match"=>"message", "match_mapping_type"=>"string", "mapping"=>{"type"=>"text", "norms"=>false}}}, {"string_fields"=>{"match"=>"*", "match_mapping_type"=>"string", "mapping"=>{"type"=>"text", "norms"=>false, "fields"=>{"keyword"=>{"type"=>"keyword", "ignore_above"=>256}}}}}], "properties"=>{"@timestamp"=>{"type"=>"date"}, "@version"=>{"type"=>"keyword"}, "geoip"=>{"dynamic"=>true, "properties"=>{"ip"=>{"type"=>"ip"}, "location"=>{"type"=>"geo_point"}, "latitude"=>{"type"=>"half_float"}, "longitude"=>{"type"=>"half_float"}}}}}}}`  
`[2020-10-10T05:30:59,724][INFO][logstash.javapipeline][main] Starting pipeline {:pipeline_id=>"main", "pipeline.workers"=>2, "pipeline.batch.size"=>125, "pipeline.batch.delay"=>50, "pipeline.max_inflight"=>250, "pipeline.sources"=>["C:/elastic/logstash-7.9.2/bin/sql01.conf"], :thread=>"#<Thread:0x689874ac run>"} [2020-10-10T05:31:00,514][INFO][logstash.javapipeline][main] Pipeline Java execution initialization time {"seconds"=>0.78}`  
`[2020-10-10T05:31:00,764][INFO][logstash.javapipeline][main] Pipeline started {"pipeline.id"=>"main"}`  
`[2020-10-10T05:31:00,920][INFO][logstash.agent] Pipelines running {:count=>1, :running_pipelines=>[:main], :non_running_pipelines=>[]} [2020-10-10T05:31:02,025][INFO][logstash.agent] Successfully started Logstash API endpoint {:port=>9600}`  
`[2020-10-10T05:31:02,421][INFO][logstash.inputs.jdbc][main][fd942172197591ef32314a3a90c00cd51e0d48d19f5e69854a8ca207a6fa28dc] (0.037660s) SELECT * FROM DBO.incidentes`  
`[2020-10-10T05:31:03,700][INFO][logstash.runner] Logstash shut down.`

input {  
jdbc {  
jdbc\_connection\_string =\> "jdbc:sqlserver://pserverw:1433;databaseName=TEST01;integratedSecurity=false;"  
jdbc\_driver\_library =\> "C:/jdbc/sqljdbc\_4.2/enu/jre8/sqljdbc42.jar"  
jdbc\_driver\_class =\> "com.microsoft.sqlserver.jdbc.SQLServerDriver"  
jdbc\_user =\> "sa"  
jdbc\_password =\> "Enfoque0103200"  
statement =\> "SELECT \* FROM incidentes"  
}  
}  
output {  
elasticsearch {  
hosts =\> ["localhost:9200"]  
index =\> "sql01"  
}  
}

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [October 10, 2020, 1:48pm UTC](https://discuss.elastic.co/t/logstash-shut-down-immediately-after-starting/251642/2 "2020-10-10T13:48:17Z")

</div>

You do not have a schedule configured so once the jdbc input has run the query once it has nothing left to do. Why would you expect it to keep running?

---

<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:** [November 7, 2020, 1:48pm UTC](https://discuss.elastic.co/t/logstash-shut-down-immediately-after-starting/251642/3 "2020-11-07T13:48:36Z")

</div>

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