# lGot an error - MongoDB Input threw an exception, restarting {:exception=\>#\<BSON::ObjectId::Invalid: '#\<BSON::Binary:0x25ae0d1c\>' is an invalid ObjectId.\>}

**URL:** https://discuss.elastic.co/t/lgot-an-error-mongodb-input-threw-an-exception-restarting-exception-bson-bson-0x25ae0d1c-is-an-invalid-objectid/214830
**Category:** Logstash
**Created:** [January 13, 2020, 12:21pm UTC](https://discuss.elastic.co/t/lgot-an-error-mongodb-input-threw-an-exception-restarting-exception-bson-bson-0x25ae0d1c-is-an-invalid-objectid/214830 "2020-01-13T12:21:49Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![shubhamblackstratus](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shubhamblackstratus/32/60703_2.png) [@shubhamblackstratus](https://discuss.elastic.co/u/shubhamblackstratus)
#### Post date: [January 13, 2020, 12:21pm UTC](https://discuss.elastic.co/t/lgot-an-error-mongodb-input-threw-an-exception-restarting-exception-bson-bson-0x25ae0d1c-is-an-invalid-objectid/214830/1 "2020-01-13T12:21:49Z")

</div>

Hello Guys,

While working with " [logstash-input-mongodb]" plugin, I got the below error in logstash logs,.

[WARN][logstash.inputs.mongodb] MongoDB Input threw an exception, restarting {:exception=\>#\<BSON::ObjectId::Invalid: '#BSON::Binary:0x25ae0d1c' is an invalid ObjectId.\>}

I've gone through various helps listed on web for the similar error and also tried to silve the issue by fixing the structure of sqlite but it could not get resolved.

> <https://github.com/kurkop/logstash-input-mongodb/commit/f3daa1456f8563c830c6bb8fb3809285d0415730#diff-b50cbd06ed9aac325fc5552aa327afbb>

Kindly help..

Thanks.

---

<div class="post-metadata">

### Author: ![shubhamblackstratus](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shubhamblackstratus/32/60703_2.png) [@shubhamblackstratus](https://discuss.elastic.co/u/shubhamblackstratus)
#### Post date: [January 21, 2020, 9:53am UTC](https://discuss.elastic.co/t/lgot-an-error-mongodb-input-threw-an-exception-restarting-exception-bson-bson-0x25ae0d1c-is-an-invalid-objectid/214830/2 "2020-01-21T09:53:58Z")

</div>

Can someone help in this ?

@magnusbaeck Kindly suggest.

---

<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: [February 18, 2020, 9:54am UTC](https://discuss.elastic.co/t/lgot-an-error-mongodb-input-threw-an-exception-restarting-exception-bson-bson-0x25ae0d1c-is-an-invalid-objectid/214830/3 "2020-02-18T09:54:00Z")

</div>

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