# Error while running logstash config file

**URL:** <https://discuss.elastic.co/t/error-while-running-logstash-config-file/51360>\
**Category:** Logstash\
**Created:** [May 31, 2016, 2:27am UTC](https://discuss.elastic.co/t/error-while-running-logstash-config-file/51360 "2016-05-31T02:27:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![cwp](https://avatars.discourse-cdn.com/v4/letter/c/b77776/32.png) [@cwp](https://discuss.elastic.co/u/cwp)\
**Post date:** [May 31, 2016, 2:27am UTC](https://discuss.elastic.co/t/error-while-running-logstash-config-file/51360/1 "2016-05-31T02:27:43Z")

</div>

I am new to Kibana and want to import data from Excel. I was told to get Logstash and create a config file (Below is the file). When executing I get this error message. Please advise  
Thanks  
bin/logstash agent -f logstash.conf  
fetched an invalid config {:config=\>"\n", :reason=\>"Expected one of #, input, filter, output at line 2, column 1 (byte 2) after \n", :level=\>:error}

input {  
file {  
path =\> "/users/cwp/x.csv"  
type =\> "core"  
start\_position =\> "Beginning"  
}  
}  
filter {  
csv {  
columns =\> ["@timestamp", "interface", "bytes in", "bytes out"]  
separator =\> ","  
}  
}  
output {  
elasticsearch {  
action =\> "index"  
host =\> "localhost"  
index =\> "logstash-%{+YYYY.MM.dd}"  
workers =\> 1  
}  
# stdout {  
# codec =\> rubydebug  
# }

---

<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:** [May 31, 2016, 3:26am UTC](https://discuss.elastic.co/t/error-while-running-logstash-config-file/51360/2 "2016-05-31T03:26:32Z")

</div>

Path is an array - [https://www.elastic.co/guide/en/logstash/current/plugins-inputs-file.html#plugins-inputs-file-path](https://www.elastic.co/guide/en/logstash/current/plugins-inputs-file.html#plugins-inputs-file-path)

`path => ["/users/cwp/x.csv"]` should fix it

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [May 31, 2016, 3:39am UTC](https://discuss.elastic.co/t/error-while-running-logstash-config-file/51360/3 "2016-05-31T03:39:18Z")

</div>

> Path is an array

Yes, but strings are actually accepted too.

One problem seems to be that the output section is never closed, i.e. there's a missing closing brace at the end of the file. However, the error message indicates a problem at the beginning of the file. I suggest the OP closely examines the beginning of the file to see if there are any garbage characters there. Running the configuration file through `hexdump -C` might be useful.

---

<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:** [July 6, 2017, 4:55am UTC](https://discuss.elastic.co/t/error-while-running-logstash-config-file/51360/4 "2017-07-06T04:55:25Z")

</div>


