# Logstash - Error parsing csv :exception=\>java.lang.ArrayIndexOutOfBoundsException

**URL:** <https://discuss.elastic.co/t/logstash-error-parsing-csv-exception-java-lang-arrayindexoutofboundsexception/279884>\
**Category:** Logstash\
**Created:** [July 28, 2021, 3:23pm UTC](https://discuss.elastic.co/t/logstash-error-parsing-csv-exception-java-lang-arrayindexoutofboundsexception/279884 "2021-07-28T15:23:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![deadloss](https://avatars.discourse-cdn.com/v4/letter/d/58f4c7/32.png) [@deadloss](https://discuss.elastic.co/u/deadloss)\
**Post date:** [July 28, 2021, 3:23pm UTC](https://discuss.elastic.co/t/logstash-error-parsing-csv-exception-java-lang-arrayindexoutofboundsexception/279884/1 "2021-07-28T15:23:24Z")

</div>

I am trying to sync logs from csv, sometimes I get this error  
`[2021-07-28T14:49:03,857][WARN][logstash.filters.csv] Error parsing csv {:field=>"message", :source=>"M5804240304", :exception=>java.lang.ArrayIndexOutOfBoundsException}`  
What could be the reason for this? The csv format is correct and the important thing to note is this error does not occur every single time. I did not find anything relevant on the internet. I am using logstash 5.6

---

<div class="post-metadata">

**Author:** ![AquaX](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aquax/32/92006_2.png) [@AquaX](https://discuss.elastic.co/u/AquaX)\
**Post date:** [July 28, 2021, 6:18pm UTC](https://discuss.elastic.co/t/logstash-error-parsing-csv-exception-java-lang-arrayindexoutofboundsexception/279884/2 "2021-07-28T18:18:28Z")

</div>

Are you able to update your logstash to a newer version?  
Have you looked at the data that contains "M5804240304" to see if that row is any different than any other rows that do get processed?

---

<div class="post-metadata">

**Author:** ![deadloss](https://avatars.discourse-cdn.com/v4/letter/d/58f4c7/32.png) [@deadloss](https://discuss.elastic.co/u/deadloss)\
**Post date:** [July 29, 2021, 4:41am UTC](https://discuss.elastic.co/t/logstash-error-parsing-csv-exception-java-lang-arrayindexoutofboundsexception/279884/3 "2021-07-29T04:41:50Z")

</div>

I cannot update logstash because I am working with ES2.3. Also, the csv data is correct, I have checked all rows follow same exact pattern. Also, when I restart logstash on same csv this works fine. This error occurs only once in a while.

---

<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:** [August 26, 2021, 4:42am UTC](https://discuss.elastic.co/t/logstash-error-parsing-csv-exception-java-lang-arrayindexoutofboundsexception/279884/4 "2021-08-26T04:42:28Z")

</div>

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