# Logstash terminating with java.lang.ArrayIndexOutOfBoundsException: Index -1 out of bounds for length 80

**URL:** <https://discuss.elastic.co/t/logstash-terminating-with-java-lang-arrayindexoutofboundsexception-index-1-out-of-bounds-for-length-80/356739>\
**Category:** Logstash\
**Created:** [April 4, 2024, 6:48am UTC](https://discuss.elastic.co/t/logstash-terminating-with-java-lang-arrayindexoutofboundsexception-index-1-out-of-bounds-for-length-80/356739 "2024-04-04T06:48:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![teja\_tata](https://avatars.discourse-cdn.com/v4/letter/t/dec6dc/32.png) [@teja\_tata](https://discuss.elastic.co/u/teja_tata)\
**Post date:** [April 4, 2024, 6:48am UTC](https://discuss.elastic.co/t/logstash-terminating-with-java-lang-arrayindexoutofboundsexception-index-1-out-of-bounds-for-length-80/356739/1 "2024-04-04T06:48:31Z")

</div>

logstash getting terminated with below error

```auto
2024-03-27T15:10:25.063631230+01:00 warning: thread "Converge PipelineAction::Create<logstash>" terminated with exception (report_on_exception is true):
2024-03-27T15:10:25.065590367+01:00 java.lang.ArrayIndexOutOfBoundsException: Index -1 out of bounds for length 80
2024-03-27T15:10:25.067934951+01:00 at org.jruby.runtime.ThreadContext.popFrameReal(ThreadContext.java:570)
2024-03-27T15:10:25.069882132+01:00 at org.jruby.runtime.ThreadContext.postYield(ThreadContext.java:1171)
2024-03-27T15:10:25.071766260+01:00 at org.jruby.runtime.IRBlockBody.postYield(IRBlockBody.java:188)
2024-03-27T15:10:25.073631935+01:00 at org.jruby.runtime.MixedModeIRBlockBody.commonYieldPath(MixedModeIRBlockBody.java:139)
2024-03-27T15:10:25.075410989+01:00 at org.jruby.runtime.IRBlockBody.call(IRBlockBody.java:66)
2024-03-27T15:10:25.077218029+01:00 at org.jruby.runtime.IRBlockBody.call(IRBlockBody.java:58)
2024-03-27T15:10:25.079103450+01:00 at org.jruby.runtime.Block.call(Block.java:144)
2024-03-27T15:10:25.081240206+01:00 at org.jruby.RubyProc.call(RubyProc.java:352)
2024-03-27T15:10:25.083174578+01:00 at org.jruby.internal.runtime.RubyRunnable.run(RubyRunnable.java:111)
2024-03-27T15:10:25.084937390+01:00 at java.base/java.lang.Thread.run(Thread.java:829)
2024-03-27T15:10:25.087027805+01:00 [logstash.inputs.http] Starting http input listener {:address=>'0.0.0.0:<port-number>', :ssl=>'false'}
2024-03-27T15:10:25.089095036+01:00 [logstash.agent] An exception happened when converging configuration {:exception=>Java::JavaLang::ArrayIndexOutOfBoundsException, :message=>'Index -1 out of bounds for length 80'}"}
2024-03-27T15:10:25.091375834+01:00 [logstash.inputs.tcp] Starting tcp input listener {:address=>'0.0.0.0:<port-number>', :ssl_enabled=>false}
2024-03-27T15:10:25.145334166+01:00 [filewatch.observingtail] START, creating Discoverer, Watch with file and sincedb collections
2024-03-27T15:10:25.151583173+01:00 [filewatch.observingtail] START, creating Discoverer, Watch with file and sincedb collections
2024-03-27T15:10:25.151819155+01:00 [org.logstash.beats.Server] Starting server on port: 5044
2024-03-27T15:10:25.154951867+01:00 [logstash.inputs.udp] Starting UDP listener {:address=>'0.0.0.0:<port-number>'}
2024-03-27T15:10:25.157665945+01:00 [logstash.inputs.udp] UDP listener started {:address=>'0.0.0.0:<port-number>', :receive_buffer_bytes=>'106496', :queue_size=>'2000'}
2024-03-27T15:10:25.197564340+01:00 [logstash.runner] An unexpected error occurred! {:error=>#<Java::JavaLang::ArrayIndexOutOfBoundsException: Index -1 out of bounds for length 80>, :backtrace=>['org.jruby.runtime.ThreadContext.popFrameReal(ThreadContext.java:570)', 'org.jruby.runtime.ThreadContext.postYield(ThreadContext.java:1171)', 'org.jruby.runtime.IRBlockBody.postYield(IRBlockBody.java:188)', 'org.jruby.runtime.MixedModeIRBlockBody.commonYieldPath(MixedModeIRBlockBody.java:139)', 'org.jruby.runtime.IRBlockBody.call(IRBlockBody.java:66)', 'org.jruby.runtime.IRBlockBody.call(IRBlockBody.java:58)', 'org.jruby.runtime.Block.call(Block.java:144)', 'org.jruby.RubyProc.call(RubyProc.java:352)', 'org.jruby.internal.runtime.RubyRunnable.run(RubyRunnable.java:111)', 'java.base/java.lang.Thread.run(Thread.java:829)']}"}
2024-03-27T15:10:25.438264691+01:00 [logstash.javapipeline] Pipeline terminated {'pipeline.id'=>'logstash'}"}

```

This issue has been not happening continuously, so couldn't understand which triggering this issue. Can someone please help me to out to figure out what is causing this issue or which configuration miss might cause this issue.

---

<div class="post-metadata">

**Author:** ![Rios](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rios/32/95745_2.png) [@Rios](https://discuss.elastic.co/u/Rios)\
**Post date:** [April 4, 2024, 8:14am UTC](https://discuss.elastic.co/t/logstash-terminating-with-java-lang-arrayindexoutofboundsexception-index-1-out-of-bounds-for-length-80/356739/2 "2024-04-04T08:14:44Z")

</div>

Have you tested your .conf file? -t option  
Which plugin have you used? If is CSV please provide params  
Have you changed something in .conf lately?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 2, 2024, 8:14am UTC](https://discuss.elastic.co/t/logstash-terminating-with-java-lang-arrayindexoutofboundsexception-index-1-out-of-bounds-for-length-80/356739/3 "2024-05-02T08:14:47Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
