# Failing to load conf file

**URL:** <https://discuss.elastic.co/t/failing-to-load-conf-file/289811>\
**Category:** Logstash\
**Created:** [November 22, 2021, 1:54pm UTC](https://discuss.elastic.co/t/failing-to-load-conf-file/289811 "2021-11-22T13:54:48Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![kainan](https://avatars.discourse-cdn.com/v4/letter/k/7feea3/32.png) [@kainan](https://discuss.elastic.co/u/kainan)\
**Post date:** [November 22, 2021, 1:54pm UTC](https://discuss.elastic.co/t/failing-to-load-conf-file/289811/1 "2021-11-22T13:54:48Z")

</div>

Hey all,

First time poster. I have been struggling for over a week to get the below conf file to compile. I have read through the forums and it always seems to be missing a } however that does not seem to be the case here. I have removed my config information with \*\*.

It appears to be getting hung up on the codec, any thoughts or suggestions? Thanks in advance.

[ERROR] 2021-11-22 13:42:35.925 [Converge PipelineAction::Create] agent - Failed to execute action {:action=\>LogStash::PipelineAction::Create/pipeline\_id:main, :exception=\>"LogStash:: ConfigurationError", :message=\>"Expected one of [\t\r\n], "#", "{", "}" at line 6, column 13 (byte 179) after input {\n\ts3 {\n\t\tbucket =\> "S3://\*\*\*_/AWSLogs”\n\t\t access\_key\_id =\> “ **”\n\t\tsecret\_access\_key =\> “** _”\n\t\tcodec =\> "", :backtrace=\>["/usr/share/logstash/logstash-core/lib/logstash/ compiler.rb:32:in `compile_imperative'", "org/logstash/execution/AbstractPipelineExt.java:187:in `initialize'", "org/logstash/execution/JavaBasePipelineExt.java:72:in `initialize'", "/usr/s hare/logstash/logstash-core/lib/logstash/java_pipeline.rb:47:in `initialize'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline\_action/create.rb:52:in `execute'", "/usr/share/logsta sh/logstash-core/lib/logstash/agent.rb:391:in `block in converge\_state'"]}

Conf file  
input {  
s3 {  
bucket =\> "S3://**”  
access\_key\_id =\> “**”  
secret\_access\_key =\> “\*\*\*\*\*\*”  
codec =\> "json"  
region =\> “eu-west-1”  
}  
}

output {  
microsoft-logstash-output-azure-loganalytics {  
workspace\_id =\> “\*\*\*\*\*\*\*”  
workspace\_key =\> “\*\*\*\*\*\*\*\*"  
custom\_log\_table\_name =\> "AWSGuardDuty"  
plugin\_flush\_interval =\> 5  
}  
}

---

<div class="post-metadata">

**Author:** ![Micah\_Barsness](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/micah_barsness/32/83318_2.png) [@Micah\_Barsness](https://discuss.elastic.co/u/Micah_Barsness)\
**Post date:** [November 23, 2021, 2:18pm UTC](https://discuss.elastic.co/t/failing-to-load-conf-file/289811/2 "2021-11-23T14:18:43Z")

</div>

Can you repost these sections as code? It will make it easier to read.

---

<div class="post-metadata">

**Author:** ![Micah\_Barsness](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/micah_barsness/32/83318_2.png) [@Micah\_Barsness](https://discuss.elastic.co/u/Micah_Barsness)\
**Post date:** [November 23, 2021, 2:23pm UTC](https://discuss.elastic.co/t/failing-to-load-conf-file/289811/3 "2021-11-23T14:23:46Z")

</div>

I would first try removing the codec and restarting logstash.

Then figure out what you need to do with the codec section if your data isn't being parsed correctly.

> **[Json codec plugin | Logstash Reference \[7.15\] | Elastic](https://www.elastic.co/guide/en/logstash/current/plugins-codecs-json.html)**

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [November 23, 2021, 2:37pm UTC](https://discuss.elastic.co/t/failing-to-load-conf-file/289811/4 "2021-11-23T14:37:14Z")

</div>

Your issue is here, line 6 of your config:

> [@kainan](#):
>
> "Expected one of [\t\r\n], "#", "{", "}" at line 6, column 13

Can you edit your question and share your full config as a code, using the pre-formatted text?

Also, check all your double quotes to see if for some reason you do not have a diferent double quote, this can happens if you are using some text editors and copying and pasting the config.

For example, in the config you shared you have this case, your double quotes should be the ones like on the `codec` setting, not the ones on the `region` setting`.

```auto
codec => "json"
region => “eu-west-1”

```

---

<div class="post-metadata">

**Author:** ![kainan](https://avatars.discourse-cdn.com/v4/letter/k/7feea3/32.png) [@kainan](https://discuss.elastic.co/u/kainan)\
**Post date:** [November 23, 2021, 3:28pm UTC](https://discuss.elastic.co/t/failing-to-load-conf-file/289811/5 "2021-11-23T15:28:02Z")

</div>

Thanks so much, I think that got me to the next error!

---

<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:** [January 12, 2022, 6:33pm UTC](https://discuss.elastic.co/t/failing-to-load-conf-file/289811/7 "2022-01-12T18:33:11Z")

</div>

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