# Won't load a config file

**URL:** <https://discuss.elastic.co/t/wont-load-a-config-file/115422>\
**Category:** Logstash\
**Created:** [January 13, 2018, 11:17pm UTC](https://discuss.elastic.co/t/wont-load-a-config-file/115422 "2018-01-13T23:17:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tstapenhorst](https://avatars.discourse-cdn.com/v4/letter/t/8e7dd6/32.png) [@tstapenhorst](https://discuss.elastic.co/u/tstapenhorst)\
**Post date:** [January 13, 2018, 11:17pm UTC](https://discuss.elastic.co/t/wont-load-a-config-file/115422/1 "2018-01-13T23:17:31Z")

</div>

I can't get my fantasy\_hockey.config file to load into ElasticSearch (version 6.1.1). Here is my config file followed by my launch statement followed by the error output. According to the error output message I'm missing a "#" or a {"; I don't see why I would need either one. Please advise. Thank you in advance.

```
# Filename: fantasy_hockey.conf
# Version: 1.0
# Author: Ted W. Stapenhorst
# Date: 11th January '18
# Description: This Logstash configuration file will be used to read in 
# fantasy hockey weekly statistics.
input {
  file {
    path => "/Users/tstapenhorst/elastic/logstash-6.1.1/data/HockeyWeek1.csv"
    start_position => "beginning"
    ignore_older => 0
  }
}
filter {
    csv {
      separator => ","
# Team Number (TNBR),Team Owner (TO),Team Name (TN),Division (DV) ,Season (S),
# Week Number (WN),Week Ending Date (WED),Opponent (OPP),Total Points (TP),
# Games Played (GP),Goals (G),Assists (A),Power Play Goals (PPG),Power Play Points (PPP),
# Short Handed Goals (SHG),Hits (HIT),Blocks (BLK),Goalie Starts (GS),Wins (W),
# Loses (L),Goals Allowed (GA),Saves (SV),Shut Outs (SO)
      columns => [TNBR,TO,TN,DV,S,WN,WED,OPP,TP,GP,G,A,PPG,PPP,SHG,HIT,BLK,GS,W,L,GA,SV,SO]
    }
    # Get rid of the Header Record
    if [TNBR] == "TNBR"
    {
      drop {}
    }
 }
output {
   elasticsearch {
     hosts => "http://localhost:9200"
     index => "fantasy_hockey"
  }
stdout {}
}

**Here is my launch statement:**

./bin/logstash -f ~/elastic/logstash-6.1.1/config/fantasy_hockey.conf --config.test_and_exit

**Here is the error message:**

Sending Logstash's logs to /Users/tstapenhorst/elastic/logstash-6.1.1/logs which is now configured via log4j2.properties
[2018-01-13T14:43:53,496][INFO][logstash.modules.scaffold] Initializing module {:module_name=>"fb_apache", :directory=>"/Users/tstapenhorst/elastic/logstash-6.1.1/modules/fb_apache/configuration"}
[2018-01-13T14:43:53,519][INFO][logstash.modules.scaffold] Initializing module {:module_name=>"netflow", :directory=>"/Users/tstapenhorst/elastic/logstash-6.1.1/modules/netflow/configuration"}
[2018-01-13T14:43:53,849][WARN][logstash.config.source.multilocal] Ignoring the 'pipelines.yml' file because modules or command line options are specified
[2018-01-13T14:43:54,870][FATAL][logstash.runner] 
The given configuration is invalid. Reason: Expected one of #, { at line 21, 
column 36 (byte 893) after filter {
    csv {
        separator => ","
        # Team Number (TNBR),Team Owner (TO),Team Name (TN),Division (DV) ,Season (S),Week Number (WN),Week Ending Date (WED),
        # Opponent (OPP),Total Points (TP),Games Played (GP),Goals (G),Assists (A),Power Play Goals (PPG),Power Play Points (PPP),
        # Short Handed Goals (SHG),Hits (HIT),Blocks (BLK),Goalie Starts (GS),Wins (W),Loses (L),Goals Allowed (GA),Saves (SV),Shut Outs (SO)

        columns => [TNBR,TO,TN,DV,S
```

---

<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 13, 2018, 11:28pm UTC](https://discuss.elastic.co/t/wont-load-a-config-file/115422/2 "2018-01-13T23:28:43Z")

</div>

Please edit your post and use the `</>` button, or markdown style code tagging, to make your config more readable. It's really hard to read as is and makes it difficult to help you 🙂

---

<div class="post-metadata">

**Author:** ![tstapenhorst](https://avatars.discourse-cdn.com/v4/letter/t/8e7dd6/32.png) [@tstapenhorst](https://discuss.elastic.co/u/tstapenhorst)\
**Post date:** [January 14, 2018, 4:48am UTC](https://discuss.elastic.co/t/wont-load-a-config-file/115422/3 "2018-01-14T04:48:45Z")

</div>

Hi Mark,

My columns field is getting cut off in the post, but the full line is:

columns =\> [TNBR,TO,TN,DV,S,WN,WED,OPP,TP,GP,G,A,PPG,PPP,SHG,HIT,BLK,GS,W,L,GA,SV,SO]

The full error message is getting cut off too. I was able to get the whole FATAL error message in the original post. Thank you in advance for looking at my first config file.

Ted.

---

<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 11, 2018, 4:48am UTC](https://discuss.elastic.co/t/wont-load-a-config-file/115422/4 "2018-02-11T04:48:55Z")

</div>

Closed on February 11, 2018, 4:48am UTC

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