# Logstash config is not working

**URL:** <https://discuss.elastic.co/t/logstash-config-is-not-working/125621>\
**Category:** Logstash\
**Created:** [March 26, 2018, 1:54pm UTC](https://discuss.elastic.co/t/logstash-config-is-not-working/125621 "2018-03-26T13:54:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vaishali1](https://avatars.discourse-cdn.com/v4/letter/v/f05b48/32.png) [@vaishali1](https://discuss.elastic.co/u/vaishali1)\
**Post date:** [March 26, 2018, 1:54pm UTC](https://discuss.elastic.co/t/logstash-config-is-not-working/125621/1 "2018-03-26T13:54:10Z")

</div>

Hi,  
I am facing some issue, Logstash config is not pushing the data to elasticsearch, can anyone help me to solve this issue?, very first time it runs well when I am trying second time it's not working

```auto
input {
   jdbc {
    jdbc_driver_library => "C:\EKL\MSSQL_Driver\sqljdbc_6.0\enu\jre8\sqljdbc42.jar"
    jdbc_driver_class => "com.microsoft.sqlserver.jdbc.SQLServerDriver"
    jdbc_connection_string => "jdbc:sqlserver://SE128023:1433;databaseName=dev_IT;schema=dbo"
		#clean_run => true
		last_run_metadata_path => "${LOGSTASH_HOME}\.logstash_jdbc_last_run"
		jdbc_user => "esuser"
		jdbc_password => "esuser123"

		schedule => "0 0-59 0-23 * * *"
		tracking_column => "processenddatetime"
		tracking_column_type => "timestamp"
	jdbc_default_timezone => "America/Toronto"
statement_filepath => "C:\Users\Downloads\EKL\DoubleLog\logstash-6.2.2\config\db.txt" 
	jdbc_paging_enabled => "true"
    jdbc_page_size => "10000"
	type => "statusdescription"
  }
 
}
filter {
#date {
# timezone => "America/New_York"
# match => ["enddatetime", "dd/MMM/yyyy:HH:mm:ss Z", "yyyy-MM-dd HH:mm:ss.SSSZ"]
#	target => ["enddatetime"]

# }
}
output {
    elasticsearch { 
	hosts => "http://localhost:9200"
	index => "%{type}-%{+YYYY.MM.dd}"
	document_id => "%{sessionnumber}-%{seqnum}"
	doc_as_upsert => "true"
    }
	
	stdout{codec =>rubydebug}
}

```

**OUTPUT**  
PS C:\Users\Downloads\EKL\DoubleLog\logstash-6.2.2\bin\> .\logstash -f "C:\Users\328347935\Downloads\EKL\Double  
Log\logstash-6.2.2\config\database.config"  
Sending Logstash's logs to C:/Users/328347935/Downloads/EKL/DoubleLog/logstash-6.2.2/logs which is now configured via lo  
g4j2.properties  
[2018-03-26T09:39:00,752][INFO][logstash.modules.scaffold] Initializing module {:module\_name=\>"fb\_apache", :directory=\>  
"C:/Users/328347935/Downloads/EKL/DoubleLog/logstash-6.2.2/modules/fb\_apache/configuration"}  
[2018-03-26T09:39:00,768][INFO][logstash.modules.scaffold] Initializing module {:module\_name=\>"netflow", :directory=\>"C  
:/Users/328347935/Downloads/EKL/DoubleLog/logstash-6.2.2/modules/netflow/configuration"}  
[2018-03-26T09:39:00,986][WARN][logstash.config.source.multilocal] Ignoring the 'pipelines.yml' file because modules or  
command line options are specified  
[2018-03-26T09:39:01,668][INFO][logstash.runner] Starting Logstash {"logstash.version"=\>"6.2.2"}  
[2018-03-26T09:39:02,137][INFO][logstash.agent] Successfully started Logstash API endpoint {:port=\>9600}  
[2018-03-26T09:39:08,349][INFO][logstash.pipeline] Starting pipeline {:pipeline\_id=\>"main", "pipeline.workers"=

> 4, "pipeline.batch.size"=\>125, "pipeline.batch.delay"=\>50}  
> [2018-03-26T09:39:08,781][INFO][logstash.outputs.elasticsearch] Elasticsearch pool URLs updated {:changes=\>{:removed=\>[  
> ], :added=\>[[http://localhost:9200/](http://localhost:9200/)]}}  
> [2018-03-26T09:39:08,797][INFO][logstash.outputs.elasticsearch] Running health check to see if an Elasticsearch connect  
> ion is working {:healthcheck\_url=\>[http://localhost:9200/](http://localhost:9200/), :path=\>"/"}  
> [2018-03-26T09:39:08,971][WARN][logstash.outputs.elasticsearch] Restored connection to ES instance {:url=\>"[http://local](http://local)  
> host:9200/"}  
> [2018-03-26T09:39:09,033][INFO][logstash.outputs.elasticsearch] ES Output version determined {:es\_version=\>nil}  
> [2018-03-26T09:39:09,033][WARN][logstash.outputs.elasticsearch] Detected a 6.x and above cluster: the `type` event fiel  
> d won't be used to determine the document \_type {:es\_version=\>6}  
> [2018-03-26T09:39:09,034][INFO][logstash.outputs.elasticsearch] Using mapping template from {:path=\>nil}  
> [2018-03-26T09:39:09,081][INFO][logstash.outputs.elasticsearch] Attempting to install template {:manage\_template=\>{"tem  
> plate"=\>"logstash-_", "version"=\>60001, "settings"=\>{"index.refresh\_interval"=\>"5s"}, "mappings"=\>{"default"=\>{"dynami  
> c\_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"}}}}}}}}  
> [2018-03-26T09:39:09,112][INFO][logstash.outputs.elasticsearch] New Elasticsearch output {:class=\>"LogStash::Outputs::E  
> lasticSearch", :hosts=\>["[http://localhost:9200](http://localhost:9200)"]}  
> [2018-03-26T09:39:09,518][INFO][logstash.pipeline] Pipeline started succesfully {:pipeline\_id=\>"main", :thread=  
> "#\<Thread:0x2fb2f343 sleep\>"}  
> [2018-03-26T09:39:09,611][INFO][logstash.agent] Pipelines running {:count=\>1, :pipelines=\>["main"]}  
> [2018-03-26T09:40:02,405][INFO][logstash.inputs.jdbc] (0.063000s) SELECT CAST(SERVERPROPERTY('ProductVersion') AS  
> varchar)  
> [2018-03-26T09:40:02,873][INFO][logstash.inputs.jdbc] (0.250000s) SELECT TOP (1) count(_) AS [COUNT] FROM (select  
> L._,

---

<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:** [April 23, 2018, 2:00pm UTC](https://discuss.elastic.co/t/logstash-config-is-not-working/125621/2 "2018-04-23T14:00:30Z")

</div>

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