logstash-input-mongodb icon indicating copy to clipboard operation
logstash-input-mongodb copied to clipboard

Exception: BSON::ObjectId::Invalid: 'Infinity' is an invalid ObjectId

Open gairom opened this issue 8 years ago • 8 comments

I get this exception in loop (I'm running v0.3.3): {:timestamp=>"2016-04-21T01:15:09.431000+0000", :message=>"MongoDB Input threw an exception, restarting", :exception=>#<BSON::ObjectId::Invalid: 'Infinity' is an invalid ObjectId.>, :level=>:warn}

and no document are indexed after that. Tried to search for any invalid ID but can't find one. The IDs are given by Mongo, I'm not setting any custom IDs. Also run query in Mongo: ({"_id":{$not:{$type:7}}}) which return empty.

Anyone else get this exception?? Please help.

gairom avatar Apr 21 '16 01:04 gairom

????

gairom avatar May 22 '16 07:05 gairom

I have the same issue cause the _id of my documents aren't the default ObjectId of Mongo: MongoDB Input threw an exception, restarting {:exception=>#<BSON::ObjectId::Invalid: '35RT5dvsvK53b7ACa' is an invalid ObjectId.>, :level=>:warn}

tankhuu avatar Sep 27 '16 11:09 tankhuu

I have the same problem in version 0.4.1, is there someone knows how to solve this?

f4ct0r avatar Jun 02 '17 07:06 f4ct0r

I found that the last _id that is inserted on sqlite is 59315289200e830001656287, after that the plugin crash with the Infinity thing.

nebalceroc avatar Jun 02 '17 19:06 nebalceroc

I found the problem, on method init_placeholder_table the SQLite place column is set as Integer, change it to String and it should work.

Int :place

nebalceroc avatar Jun 02 '17 20:06 nebalceroc

Changing it to String did not work for me

yvshett avatar Jan 18 '21 05:01 yvshett

@nebalceroc : Can i show my problem to you? Are you saying clone the repo what you have as latest, and run logtsahs input plugin and sync. issue will be resolved? Int to String is the change done here https://github.com/nebalceroc/logstash-input-mongodb

yvshett avatar Jan 18 '21 05:01 yvshett

@yvshett sorry, I no longer work on this.

nebalceroc avatar Jan 18 '21 09:01 nebalceroc