# Fatal error when processing CSV file

**URL:** <https://discuss.elastic.co/t/fatal-error-when-processing-csv-file/114184>\
**Category:** Logstash\
**Created:** [January 4, 2018, 10:43pm UTC](https://discuss.elastic.co/t/fatal-error-when-processing-csv-file/114184 "2018-01-04T22:43:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![code\_diva](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/code_diva/32/25135_2.png) [@code\_diva](https://discuss.elastic.co/u/code_diva)\
**Post date:** [January 4, 2018, 10:43pm UTC](https://discuss.elastic.co/t/fatal-error-when-processing-csv-file/114184/1 "2018-01-04T22:43:57Z")

</div>

I am processing a CSV file with a conf file I have used before together and have not gotten this error in the past on a different server. Passes config test and about 1/4 of the data makes it into Elastic without any issues before this error is thrown. How do I fix it?

[2018-01-04T14:35:38,437][FATAL][logstash.runner] An unexpected error occurred! {:error=\>#\<SystemCallError: Unknown error (SystemCallError) - \>, :backtrace=\>["org/jruby/RubyIO.java:1457:in `write'", "org/jruby/RubyIO.java:1428:in`write'", "/usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/logstash-output-stdout-3.1.3/lib/logstash/outputs/stdout.rb:44:in `block in multi_receive_encoded'", "org/jruby/RubyArray.java:1734:in`each'", "/usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/logstash-output-stdout-3.1.3/lib/logstash/outputs/stdout.rb:43:in `multi_receive_encoded'", "/usr/share/logstash/logstash-core/lib/logstash/outputs/base.rb:90:in`multi\_receive'", "/usr/share/logstash/logstash-core/lib/logstash/output\_delegator\_strategies/single.rb:15:in `block in multi_receive'", "org/jruby/ext/thread/Mutex.java:148:in`synchronize'", "/usr/share/logstash/logstash-core/lib/logstash/output\_delegator\_strategies/single.rb:14:in `multi_receive'", "/usr/share/logstash/logstash-core/lib/logstash/output_delegator.rb:50:in`multi\_receive'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:487:in `block in output_batch'", "org/jruby/RubyHash.java:1343:in`each'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:486:in `output_batch'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:438:in`worker\_loop'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:393:in `block in start\_workers'"]}

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [January 4, 2018, 10:49pm UTC](https://discuss.elastic.co/t/fatal-error-when-processing-csv-file/114184/2 "2018-01-04T22:49:49Z")

</div>

What's your config look like? What version are you on? What JVM? What OS?

---

<div class="post-metadata">

**Author:** ![code\_diva](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/code_diva/32/25135_2.png) [@code\_diva](https://discuss.elastic.co/u/code_diva)\
**Post date:** [January 4, 2018, 11:05pm UTC](https://discuss.elastic.co/t/fatal-error-when-processing-csv-file/114184/3 "2018-01-04T23:05:40Z")

</div>

Thanks.

**My config file:**  
input {  
file {  
start\_position =\> "beginning"  
path =\> ["/var/tmp/mycsv.CSV"]  
}  
}  
filter {  
csv {  
separator =\> ","  
autodetect\_column\_names =\> true  
autogenerate\_column\_names =\> true  
}

ruby {  
code =\> "  
hash = event.to\_hash  
hash.each do |key,value|  
if value.to\_s.include? '|' and !key.to\_s.match(/message/)  
array = value.to\_s.split('|')  
event.set(key, array)  
end  
end  
"  
}  
}  
output {  
stdout { codec =\> "rubydebug" }  
elasticsearch {  
"hosts" =\> "myelastic:9200"  
"index" =\> "grand-csv-test"  
"document\_type" =\> "c"  
}  
}

**My logstash version:** 6.1.1

**My OS:** Red Hat Enterprise Linux Server release 7.3

**Java:**

java version "1.8.0\_152"  
Java(TM) SE Runtime Environment (build 1.8.0\_152-b16)  
Java HotSpot(TM) 64-Bit Server VM (build 25.152-b16, mixed mode)

---

<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:** [February 1, 2018, 11:05pm UTC](https://discuss.elastic.co/t/fatal-error-when-processing-csv-file/114184/4 "2018-02-01T23:05:56Z")

</div>

Closed on February 1, 2018, 11:05pm UTC

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