Skip to content

Instantly share code, notes, and snippets.

@msapariya
Created November 8, 2012 13:04
Show Gist options
  • Save msapariya/4038677 to your computer and use it in GitHub Desktop.
Save msapariya/4038677 to your computer and use it in GitHub Desktop.
Logstash IndexOutOfBoundsException Or Waiting on 0
Logstash IndexOutOfBoundsException OR Waiting on 0
===================================================
Exception in thread "LogStash::Agent" java.lang.IndexOutOfBoundsException
at java.nio.Buffer.checkBounds(Buffer.java:551)
at java.nio.HeapByteBuffer.put(HeapByteBuffer.java:181)
at org.jruby.RubyEncoding$UTF8Coder.decode(RubyEncoding.java:250)
at org.jruby.RubyEncoding.decodeUTF8(RubyEncoding.java:191)
....
Waiting on 0
Logstash throws this exception when you have two grok filters with
patterns_dir tags. One points to existing directory and next one
points to non-existent directory.
I struggled a bit to zero on this, because I was expecting logstash
to throw configuration error, which it does, if you have just one
patterns_dir and that directory do not exist.
I was simply being lazy to correct this error, which I had noticed
earlier. I was expecting something else to be wrong. The reasoning
was that if I have everything else correct, I should see the configuration
error and then I am all set to go. But Logstash caught me on that
one.
Anyways, after trying few things, I think that the 2nd incorrect pattersn_dir
was giving this seemingly unrelated exception.
The google showed me few gists, with no solution and hence I thought
this might help some one.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment