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

Failed to flush outgoing items #2697

Closed
dcodix opened this issue Feb 26, 2015 · 1 comment
Closed

Failed to flush outgoing items #2697

dcodix opened this issue Feb 26, 2015 · 1 comment

Comments

@dcodix
Copy link

dcodix commented Feb 26, 2015

I am using elasticsearch-1.4.4-1(stand alone not clusterized) and logstash-1.4.2-1_2c0f5a1 reading data from a redis server.
For a while everything works like a charm, but after a while logstash stops being able to write to ES. The internal logstash queues fill up and logstash stops reading from redis.

When it happens ES is ok, and I solve the problem by restarting logstash.

At the logs I can see lots of messages like:

{:timestamp=>"2015-02-24T03:50:10.034000+0000", :message=>"Failed to flush outgoing items", :outgoing_count=>67, :exception=>#<NameError: no method 'type' for arguments (org.jruby.RubyFixnum) on Java::OrgElasticsearchActionIndex::IndexRequest>, :backtrace=>["/opt/logstash/lib/logstash/outputs/elasticsearch/protocol.rb:225:in `build_request'", "/opt/logstash/lib/logstash/outputs/elasticsearch/protocol.rb:205:in `bulk'", "org/jruby/RubyArray.java:1613:in `each'", "/opt/logstash/lib/logstash/outputs/elasticsearch/protocol.rb:204:in `bulk'", "/opt/logstash/lib/logstash/outputs/elasticsearch.rb:315:in `flush'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/stud-0.0.17/lib/stud/buffer.rb:219:in `buffer_flush'", "org/jruby/RubyHash.java:1339:in `each'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/stud-0.0.17/lib/stud/buffer.rb:216:in `buffer_flush'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/stud-0.0.17/lib/stud/buffer.rb:193:in `buffer_flush'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/stud-0.0.17/lib/stud/buffer.rb:112:in `buffer_initialize'", "org/jruby/RubyKernel.java:1521:in `loop'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/stud-0.0.17/lib/stud/buffer.rb:110:in `buffer_initialize'"], :level=>:warn}

After restarting logstash everything works like a charm again.

I read here that it happens when the ES embeded version on logstash is not the same of the standalone ES. In my case that would be true, but I disabled the embeded ES.
If this is true, there is no way of having it working with the last ES version as (if I am not wrong) I am already using the last logstash version available.

I was thinking to use "http" protocol instead of "elasticsearch" as documentation stands that it should work with any ES version, but I read also on the "elasticsearch" protocol documentation:
This output lets you store logs in Elasticsearch and is the most recommended output for Logstash. If you plan on using the Kibana web interface, you’ll need to use this output.

As I am also using kibana (3 and 4), I am not sure if I can use the "http" protocol anyway.

So, first of all, I would like to know if this is a bug or if it is true that you can only use safely the "elasticsearch" protocol if the standalone ES version is the same of the embeded one.
In the case this is normal, and it is not an issue, would it work using the "http" protocol?

My logstash output:

output {
  #stdout { codec => rubydebug }
  elasticsearch {
    embedded => false
    host => "127.0.0.1"
    protocol => transport
  }
}
@untergeek
Copy link
Member

This issue should be moved to: https://github.com/logstash-plugins/logstash-output-elasticsearch

Also, I believe that this issue has been addressed there already.

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

2 participants