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

Not enough information about the plugin exceptions #87

Open
sarra-bouhenni opened this issue Dec 22, 2017 · 0 comments
Open

Not enough information about the plugin exceptions #87

sarra-bouhenni opened this issue Dec 22, 2017 · 0 comments

Comments

@sarra-bouhenni
Copy link

sarra-bouhenni commented Dec 22, 2017

I am using logstash-input-mongodb plugin to replicate a mongodb database.
Here is my config file (tested on different versions of Logstash 5.5.3/5.6.3/6.0.0):

input {
  mongodb {
    uri => "${MONGO_URI}"
    placeholder_db_dir => "${PLACEHOLDER_DB_DIR}"
    placeholder_db_name => "${PLACEHOLDER_DB_NAME}"
    collection => "${COLLECTION}"
    batch_size => "${BATCH_SIZE}"
  }
}
filter {
  mutate {
    remove_field => [ "_id" ]
  }
}
output {
  elasticsearch {
    hosts => "${ELASTICSEARCH_URI}"
    index => "${ELASTICSEARCH_INDEX}"
  }
}

After starting Logstash, I get the following exeption on every document treated by the plugin:

[2017-12-22T22:04:06,153][WARN ][logstash.inputs.mongodb  ] MongoDB Input threw an exception, restarting {:exception=>#<ArgumentError: comparison of String with 0 failed>}

I don't undestand its meaning, so I'm not sure what's wrong with my configuration or deployment.
here is an example of the documents in the used collection :

{ "_id" : ObjectId("58c66181ca6ac600264cb94c"), "phone" : "+111111111111", "pin" : "0000", "is_verified" : true, "__v" : 0 }

Any further explanation about this kind of execeptions would be really appreciated.

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

No branches or pull requests

1 participant