Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
gairom opened this issue Apr 21, 2016 · 8 comments · May be fixed by #67
Open

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

gairom opened this issue Apr 21, 2016 · 8 comments · May be fixed by #67

Comments

@gairom
Copy link
Contributor

gairom commented Apr 21, 2016

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
Copy link
Contributor Author

gairom commented May 22, 2016

????

@tankhuu
Copy link

tankhuu commented Sep 27, 2016

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}

@f4ct0r
Copy link

f4ct0r commented Jun 2, 2017

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

@nebalceroc
Copy link

nebalceroc commented Jun 2, 2017

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

@nebalceroc
Copy link

nebalceroc commented Jun 2, 2017

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

kurkop pushed a commit to kurkop/logstash-input-mongodb that referenced this issue Jun 2, 2017
- Use String type for 'place' column in sqlite
fix phutchins#38
@kurkop kurkop linked a pull request Jun 2, 2017 that will close this issue
kurkop pushed a commit to kurkop/logstash-input-mongodb that referenced this issue Jun 2, 2017
- Use String type for 'place' column in sqlite
fix phutchins#38
@yvshett
Copy link

yvshett commented Jan 18, 2021

Changing it to String did not work for me

@yvshett
Copy link

yvshett commented Jan 18, 2021

@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

@nebalceroc
Copy link

@yvshett sorry, I no longer work on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants