# Unable to push data from mongodb to elastic search using logstash in windows

**URL:** <https://discuss.elastic.co/t/unable-to-push-data-from-mongodb-to-elastic-search-using-logstash-in-windows/251722>\
**Category:** Logstash\
**Created:** [October 12, 2020, 6:41am UTC](https://discuss.elastic.co/t/unable-to-push-data-from-mongodb-to-elastic-search-using-logstash-in-windows/251722 "2020-10-12T06:41:27Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Durga\_AK](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/durga_ak/32/77014_2.png) [@Durga\_AK](https://discuss.elastic.co/u/Durga_AK)\
**Post date:** [October 12, 2020, 6:41am UTC](https://discuss.elastic.co/t/unable-to-push-data-from-mongodb-to-elastic-search-using-logstash-in-windows/251722/1 "2020-10-12T06:41:27Z")

</div>

Im using the below config file to push data from mongodb to elastic search  
input{  
mongodb{  
uri=\>[""]  
placeholder\_db\_dir=\>"C:\Windows\System32"  
placeholder\_db\_name=\>"logstash\_sqlite.db"  
collection=\>"menus"  
batch\_size=\>100  
}  
}  
filter{  
}  
output{  
stdout{  
codec=\>"rubydebug"  
}  
elasticsearch{  
action=\>"index"  
index=\>"mongo\_log\_data\_1"  
hosts=\>["localhost:9200"]  
}  
}  
I'm getting the below error message.  
Sending Logstash logs to C:/logstash-7.9.2/logs which is now configured via log4j2.properties  
[2020-10-12T12:00:08,252][INFO][logstash.runner] Starting Logstash {"logstash.version"=\>"7.9.2", "jruby.version"=\>"jruby 9.2.13.0 (2.5.7) 2020-08-03 9a89c94bcc Java HotSpot(TM) Client VM 25.261-b12 on 1.8.0\_261-b12 +indy +jit [mswin32-i386]"}  
[2020-10-12T12:00:08,636][WARN][logstash.config.source.multilocal] Ignoring the 'pipelines.yml' file because modules or command line options are specified  
[2020-10-12T12:00:10,530][INFO][org.reflections.Reflections] Reflections took 62 ms to scan 1 urls, producing 22 keys and 45 values  
[2020-10-12T12:00:16,311][INFO][logstash.inputs.mongodb] Using version 0.1.x input plugin 'mongodb'. This plugin isn't well supported by the community and likely has no maintainer.  
[2020-10-12T12:00:17,671][INFO][logstash.outputs.elasticsearch][main] Elasticsearch pool URLs updated {:changes=\>{:removed=\>, :added=\>[[http://localhost:9200/](http://localhost:9200/)]}}  
[2020-10-12T12:00:17,910][WARN][logstash.outputs.elasticsearch][main] Restored connection to ES instance {:url=\>"[http://localhost:9200/](http://localhost:9200/)"}  
[2020-10-12T12:00:17,999][INFO][logstash.outputs.elasticsearch][main] ES Output version determined {:es\_version=\>7}  
[2020-10-12T12:00:18,005][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-12T12:00:18,064][INFO][logstash.outputs.elasticsearch][main] New Elasticsearch output {:class=\>"LogStash::Outputs::ElasticSearch", :hosts=\>["[//localhost:9200](https://localhost:9200)"]}  
[2020-10-12T12:00:18,123][INFO][logstash.outputs.elasticsearch][main] Using a default mapping template {:es\_version=\>7, :ecs\_compatibility=\>:disabled}  
[2020-10-12T12:00:18,171][INFO][logstash.javapipeline][main] Starting pipeline {:pipeline\_id=\>"main", "pipeline.workers"=\>8, "pipeline.batch.size"=\>125, "pipeline.batch.delay"=\>50, "pipeline.max\_inflight"=\>1000, "pipeline.sources"=\>["C:/logstash-7.9.2/bin/mongodatap.conf"], :thread=\>"#\<Thread:0x86d9f4 run\>"}  
[2020-10-12T12:00:18,204][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-12T12:00:19,183][INFO][logstash.javapipeline][main] Pipeline Java execution initialization time {"seconds"=\>1.01}  
[2020-10-12T12:00:20,130][ERROR][logstash.agent] Failed to execute action {:id=\>:main, :action\_type=\>LogStash::ConvergeResult::FailedAction, :message=\>"Could not execute action: PipelineAction::Create, action\_result: false", :backtrace=\>nil}  
[2020-10-12T12:00:20,506][INFO][logstash.agent] Successfully started Logstash API endpoint {:port=\>9600}  
[2020-10-12T12:00:25,389][INFO][logstash.runner] Logstash shut down.  
[2020-10-12T12:00:25,405][ERROR][org.logstash.Logstash] java.lang.IllegalStateException: Logstash stopped processing because of an error: (SystemExit) exit

Please help me on this.

---

<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 12, 2020, 2:10pm UTC](https://discuss.elastic.co/t/unable-to-push-data-from-mongodb-to-elastic-search-using-logstash-in-windows/251722/2 "2020-10-12T14:10:18Z")

</div>

Enable log.level debug and see if you get a more informative error message.

---

<div class="post-metadata">

**Author:** ![Durga\_AK](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/durga_ak/32/77014_2.png) [@Durga\_AK](https://discuss.elastic.co/u/Durga_AK)\
**Post date:** [October 13, 2020, 6:55am UTC](https://discuss.elastic.co/t/unable-to-push-data-from-mongodb-to-elastic-search-using-logstash-in-windows/251722/3 "2020-10-13T06:55:35Z")

</div>

Thanks. I'm able to get the error. What should be the value for placeholder\_db\_dir and placeholder\_db\_name

---

<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 13, 2020, 3:56pm UTC](https://discuss.elastic.co/t/unable-to-push-data-from-mongodb-to-elastic-search-using-logstash-in-windows/251722/4 "2020-10-13T15:56:43Z")

</div>

> [@Durga\_AK](#):
>
> What should be the value for placeholder\_db\_dir and placeholder\_db\_name

Anything you like. It is just a file in which the plugin stores how far through the mongodb collections it has read.

---

<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 10, 2020, 3:56pm UTC](https://discuss.elastic.co/t/unable-to-push-data-from-mongodb-to-elastic-search-using-logstash-in-windows/251722/5 "2020-11-10T15:56:44Z")

</div>

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