# Invalid Config File Error for Logstash

**URL:** <https://discuss.elastic.co/t/invalid-config-file-error-for-logstash/80592>\
**Category:** Logstash\
**Created:** [March 30, 2017, 6:28am UTC](https://discuss.elastic.co/t/invalid-config-file-error-for-logstash/80592 "2017-03-30T06:28:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ganesh3](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ganesh3/32/16889_2.png) [@ganesh3](https://discuss.elastic.co/u/ganesh3)\
**Post date:** [March 30, 2017, 6:28am UTC](https://discuss.elastic.co/t/invalid-config-file-error-for-logstash/80592/1 "2017-03-30T06:28:55Z")

</div>

Hi,

I am trying to run salesforce integration with logstash.

I am using the steps mentioned at [https://logz.io/blog/analyze-salesforce-elk-stack/](https://logz.io/blog/analyze-salesforce-elk-stack/) to setup. I am on Ubuntu 16.04 and have only installed logstack.

On running the command as below I am getting the error:

bin/logstash -f salesforce.conf  
WARNING: Could not find logstash.yml which is typically located in $LS\_HOME/config or /etc/logstash. You can specify the path using --path.settings. Continuing using the defaults  
Could not find log4j2 configuration at path /usr/share/logstash/config/log4j2.properties. Using default config which logs to console  
11:51:10.032 [LogStash::Runner] ERROR logstash.agent - Cannot load an invalid configuration {:reason=\>"Expected one of #, input, filter, output at line 17, column 2 (byte 481) after "}

LOG Filer error:  
tail -f /var/log/logstash/logstash-plain.log  
[2017-03-29T17:05:47,038][INFO][logstash.setting.writabledirectory] Creating directory {:setting=\>"path.queue", :path=\>"/usr/share/logstash/data/queue"}  
[2017-03-29T17:05:47,128][FATAL][logstash.runner] The given configuration is invalid. Reason: Expected one of #, { at line 3, column 38 (byte 62) after input {  
salesforce {  
client\_id =\> XXXXXXXXXXXXXXX

Can someone please help with this?

Regards  
Ganesh Bhat

---

<div class="post-metadata">

**Author:** ![JKhondhu](https://avatars.discourse-cdn.com/v4/letter/j/ed655f/32.png) [@JKhondhu](https://discuss.elastic.co/u/JKhondhu)\
**Post date:** [March 30, 2017, 6:55am UTC](https://discuss.elastic.co/t/invalid-config-file-error-for-logstash/80592/2 "2017-03-30T06:55:13Z")

</div>

Hi to always be in the safe side, please obfuscate any such things as client tokens etc in the future.

Did you copy and paste the config snippets from said page line for line? Can you verify that the single quotation marks on the start and end of every line are indeed correct.

---

<div class="post-metadata">

**Author:** ![ganesh3](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ganesh3/32/16889_2.png) [@ganesh3](https://discuss.elastic.co/u/ganesh3)\
**Post date:** [March 30, 2017, 6:58am UTC](https://discuss.elastic.co/t/invalid-config-file-error-for-logstash/80592/3 "2017-03-30T06:58:50Z")

</div>

Yes I can verify that it is correct.

---

<div class="post-metadata">

**Author:** ![ganesh3](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ganesh3/32/16889_2.png) [@ganesh3](https://discuss.elastic.co/u/ganesh3)\
**Post date:** [March 30, 2017, 7:07am UTC](https://discuss.elastic.co/t/invalid-config-file-error-for-logstash/80592/4 "2017-03-30T07:07:46Z")

</div>

Got this issue resolved.

Error was some junk character which I could not see in the conf file.

---

<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:** [April 27, 2017, 7:07am UTC](https://discuss.elastic.co/t/invalid-config-file-error-for-logstash/80592/5 "2017-04-27T07:07:59Z")

</div>

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