# exception=\>"LogStash::ConfigurationError", :message=\>"Expected one of #, \\", ', } at line 18, column 1 (byte 554) after output{\\n elasticsearch{\\n",

**URL:** https://discuss.elastic.co/t/exception-logstash-configurationerror-message-expected-one-of-at-line-18-column-1-byte-554-after-output-n-elasticsearch-n/158462
**Category:** Logstash
**Created:** [November 28, 2018, 5:43am UTC](https://discuss.elastic.co/t/exception-logstash-configurationerror-message-expected-one-of-at-line-18-column-1-byte-554-after-output-n-elasticsearch-n/158462 "2018-11-28T05:43:37Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![sandhyaks](https://avatars.discourse-cdn.com/v4/letter/s/57b2e6/32.png) [@sandhyaks](https://discuss.elastic.co/u/sandhyaks)
#### Post date: [November 28, 2018, 5:43am UTC](https://discuss.elastic.co/t/exception-logstash-configurationerror-message-expected-one-of-at-line-18-column-1-byte-554-after-output-n-elasticsearch-n/158462/1 "2018-11-28T05:43:37Z")

</div>

Am getting the below error message upon trying to upload csv using logstash. Below is my config file. Can someone pls help

input{  
file{  
path =\> "/etc/data/dept\_subsystem.csv"  
start\_position =\> "beginning"  
sincedb\_path =\> "/dev/null"  
}  
}

filter{  
csv{  
separator =\> ","  
columns =\> ["Universal Id","State","Sv","Age","CQ Pri","CMVC ID","CMVC Track","CR Fix Date","Platform","Subsys","Reported Release","Release","Fix Potential","Component","Phase Found","Submitter","Owner","Headline","Symptoms","Keywords","Reference","LastUpdate","DaysSinceOpen","Dept","Projected Date","Action","Subm Dept","CI"]  
}  
}

output{  
elasticsearch{  
hosts =\> "localhost"  
index =\> "defects\_new1"  
document\_type =\> "defects\_temp1"  
}  
stdout{}  
}  
~  
~  
~  
~

---

<div class="post-metadata">

### Author: ![wwalker](https://avatars.discourse-cdn.com/v4/letter/w/43a26b/32.png) [@wwalker](https://discuss.elastic.co/u/wwalker)
#### Post date: [November 28, 2018, 11:33pm UTC](https://discuss.elastic.co/t/exception-logstash-configurationerror-message-expected-one-of-at-line-18-column-1-byte-554-after-output-n-elasticsearch-n/158462/2 "2018-11-28T23:33:42Z")

</div>

Your Elasticsearch output option `hosts` is misconfigured. It should also be square bracketed.  
`hosts => ["localhost:9200"]`

[Logstash Reference](https://www.elastic.co/guide/en/logstash/current/plugins-outputs-elasticsearch.html#plugins-outputs-elasticsearch-hosts)

---

<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: [December 26, 2018, 11:41pm UTC](https://discuss.elastic.co/t/exception-logstash-configurationerror-message-expected-one-of-at-line-18-column-1-byte-554-after-output-n-elasticsearch-n/158462/3 "2018-12-26T23:41:47Z")

</div>

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