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

add an assert to check returned item count from _bulk #989

Closed
kares opened this issue Feb 4, 2021 · 1 comment · Fixed by #997
Closed

add an assert to check returned item count from _bulk #989

kares opened this issue Feb 4, 2021 · 1 comment · Fixed by #997

Comments

@kares
Copy link
Contributor

kares commented Feb 4, 2021

we've seen some weird behavior on ES 7.10.2 where a _bulk request to index 69 documents returned 135 entries

this than leads to an ugly NoMethodError: undefined method ``[]' for nil:NilClass:

[ERROR][logstash.outputs.elasticsearch] Encountered an unexpected error submitting a bulk request! Will retry. {:error_message=>"undefined method `[]' for nil:NilClass", :class=>"NoMethodError", :backtrace=>["/u01/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-output-elasticsearch-10.7.3-java/lib/logstash/outputs/elasticsearch/common.rb:311:in `block in submit'", "org/jruby/RubyArray.java:1809:in `each'", "org/jruby/RubyEnumerable.java:1258:in `each_with_index'", "/u01/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-output-elasticsearch-10.7.3-java/lib/logstash/outputs/elasticsearch/common.rb:305:in `submit'", "/u01/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-output-elasticsearch-10.7.3-java/lib/logstash/outputs/elasticsearch/common.rb:257:in `retrying_submit'", "/u01/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-output-elasticsearch-10.7.3-java/lib/logstash/outputs/elasticsearch/common.rb:36:in `multi_receive'", "org/logstash/config/ir/compiler/OutputStrategyExt.java:143:in `multi_receive'", "org/logstash/config/ir/compiler/AbstractOutputDelegatorExt.java:121:in `multi_receive'", "/u01/logstash/logstash-core/lib/logstash/java_pipeline.rb:295:in `block in start_workers'"]}

asserting the returned ({"took":0,"ingest_took":9,"errors":true,"items":[{"index":{"_index": ...) json['items'] might be an easy hint to quickly identify the issue.

kares added a commit to kares/logstash-output-elasticsearch that referenced this issue Feb 16, 2021
we've seen some weird behavior on ES 7.10.2 where a _bulk request to
index 69 documents returned 135 entries

this leads to an ugly `NoMethodError: undefined method ``[]' for
nil:NilClass`

resolves logstash-plugins#989
kares added a commit to kares/logstash-output-elasticsearch that referenced this issue Mar 1, 2021
we've seen some weird behavior on ES 7.10.2 where a _bulk request to
index 69 documents returned 135 entries

this leads to an ugly `NoMethodError: undefined method ``[]' for
nil:NilClass`

resolves logstash-plugins#989
kares added a commit to kares/logstash-output-elasticsearch that referenced this issue Mar 1, 2021
we've seen some weird behavior on ES 7.10.2 where a _bulk request to
index 69 documents returned 135 entries

this leads to an ugly `NoMethodError: undefined method ``[]' for
nil:NilClass`

resolves logstash-plugins#989
kares added a commit to kares/logstash-output-elasticsearch that referenced this issue Mar 4, 2021
we've seen some weird behavior on ES 7.10.2 where a _bulk request to
index 69 documents returned 135 entries

this leads to an ugly
`NoMethodError: undefined method ``[]' for nil:NilClass`

resolves logstash-plugins#989
@kares kares closed this as completed in #997 Mar 4, 2021
kares added a commit that referenced this issue Mar 4, 2021
we've seen some weird behavior on ES 7.10.2 (but also with 7.11.1) where a _bulk request to
index 69 documents returned 135 entries

this leads to an ugly `NoMethodError: undefined method ``[]' for nil:NilClass`

resolves #989
@kares
Copy link
Contributor Author

kares commented Mar 4, 2021

the likely cause from ES: elastic/elasticsearch#60818

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