# Logstash 7.1 configuration file throws error

**URL:** <https://discuss.elastic.co/t/logstash-7-1-configuration-file-throws-error/183694>\
**Category:** Logstash\
**Created:** [May 31, 2019, 9:29am UTC](https://discuss.elastic.co/t/logstash-7-1-configuration-file-throws-error/183694 "2019-05-31T09:29:51Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![vinu89](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vinu89/32/45939_2.png) [@vinu89](https://discuss.elastic.co/u/vinu89)\
**Post date:** [May 31, 2019, 9:29am UTC](https://discuss.elastic.co/t/logstash-7-1-configuration-file-throws-error/183694/1 "2019-05-31T09:29:51Z")

</div>

Hi,

I have successfully configured elastic and kibana using SSL/TLS but when it comes to logstash it is throwing me below errr`hosts => ["https://*.*.*.*:9200", "https://*.*.*.*:9200"] index => "logstash-bindlive_logs" ssl.certificate_authorities: ["/etc/ca.crt"] ssl.certificate: "/etc/client.crt" ssl.key: "/etc/client.key" user => elastic password => logs@123`  
Failed to execute action {:action=\>LogStash::PipelineAction::Create/pipeline\_id:main, :exception=\>"LogStash::ConfigurationError", :message=\>"Expected one of #, {, } at line 36, column 25 (byte 701) after output {\n if "\_grokparsefailure" in [tags] {\n file { path =\> "/home/faillogs.txt" } }\n else {\n elasticsearch {\n hosts =\> ["https://:9200", "[https://9200](https://9200)"]\n index =\> "logstash-bindlive\_logs"\n user =\> elastic\n password =\> dns\_logs", :backtrace=\>["/usr/share/logstash/logstash-core/lib/logstash/compiler.rb:41:in `compile_imperative'", "/usr/share/logstash/logstash-core/lib/logstash/compiler.rb:49:in`compile\_graph'", "/usr/share/logstash/logstash-core/lib/logstash/compiler.rb:11:in `block in compile_sources'", "org/jruby/RubyArray.java:2577:in`map'", "/usr/share/logstash/logstash-core/lib/logstash/compiler.rb:10:in `compile_sources'", "org/logstash/execution/AbstractPipelineExt.java:151:in`initialize'", "org/logstash/execution/JavaBasePipelineExt.java:47:in `initialize'", "/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:23:in`initialize'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline\_action/create.rb:36:in `execute'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:325:in`block in converge\_state'"]}  
``

---

<div class="post-metadata">

**Author:** ![pastechecker](https://avatars.discourse-cdn.com/v4/letter/p/0ea827/32.png) [@pastechecker](https://discuss.elastic.co/u/pastechecker)\
**Post date:** [May 31, 2019, 9:36am UTC](https://discuss.elastic.co/t/logstash-7-1-configuration-file-throws-error/183694/2 "2019-05-31T09:36:44Z")

</div>

Hard to tell, you must have some configuration error:

> if "\_grokparsefailure" in [tags]{  
> file {  
> path =\> "/home/faillogs.txt"  
> }  
> }  
> else {  
> elasticsearch {  
> hosts =\> ["https://:9200", "[https://9200](https://9200)"]  
> index =\> "logstash-bindlive\_logs"  
> user =\> elastic  
> password =\> dns\_logs",

Can you sanitize and paste your output config maybe?

---

<div class="post-metadata">

**Author:** ![vinu89](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vinu89/32/45939_2.png) [@vinu89](https://discuss.elastic.co/u/vinu89)\
**Post date:** [May 31, 2019, 9:39am UTC](https://discuss.elastic.co/t/logstash-7-1-configuration-file-throws-error/183694/3 "2019-05-31T09:39:11Z")

</div>

output config

hosts =\> ["https://_._._._:9200", "https://_._._._:9200"]  
index =\> "logstash-bindlive\_logs"  
ssl.certificate\_authorities: ["/etc/ca.crt"]  
ssl.certificate: "/etc/client.crt"  
ssl.key: "/etc/client.key"  
user =\> elastic  
password =\> logs@123

Error:

Failed to execute action {:action=\>LogStash::PipelineAction::Create/pipeline\_id:main, :exception=\>"LogStash::ConfigurationError", :message=\>"Expected one of #, {, } at line 36, column 25 (byte 701) after output {\n if "\_grokparsefailure" in [tags] {\n file { path =\> "/home/faillogs.txt" } }\n else {\n elasticsearch {\n hosts =\> ["https://:9200", "[https://9200](https://9200)"]\n index =\> "logstash-bindlive\_logs"\n user =\> elastic\n password =\> logs@123", :backtrace=\>["/usr/share/logstash/logstash-core/lib/logstash/compiler.rb:41:in `compile_imperative'", "/usr/share/logstash/logstash-core/lib/logstash/compiler.rb:49:in`compile\_graph'", "/usr/share/logstash/logstash-core/lib/logstash/compiler.rb:11:in `block in compile_sources'", "org/jruby/RubyArray.java:2577:in`map'", "/usr/share/logstash/logstash-core/lib/logstash/compiler.rb:10:in `compile_sources'", "org/logstash/execution/AbstractPipelineExt.java:151:in`initialize'", "org/logstash/execution/JavaBasePipelineExt.java:47:in `initialize'", "/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:23:in`initialize'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline\_action/create.rb:36:in `execute'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:325:in`block in converge\_state'"]}

---

<div class="post-metadata">

**Author:** ![pastechecker](https://avatars.discourse-cdn.com/v4/letter/p/0ea827/32.png) [@pastechecker](https://discuss.elastic.co/u/pastechecker)\
**Post date:** [May 31, 2019, 9:41am UTC](https://discuss.elastic.co/t/logstash-7-1-configuration-file-throws-error/183694/4 "2019-05-31T09:41:18Z")

</div>

> [@pastechecker](#):
>
> password =\> dns\_logs",

Did you terminated the password properly:  
`password => dns_logs",`

? You have double quote at the end of your password and this is where the compilation error starts.

---

<div class="post-metadata">

**Author:** ![vinu89](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vinu89/32/45939_2.png) [@vinu89](https://discuss.elastic.co/u/vinu89)\
**Post date:** [May 31, 2019, 9:42am UTC](https://discuss.elastic.co/t/logstash-7-1-configuration-file-throws-error/183694/5 "2019-05-31T09:42:52Z")

</div>

i havent used " for username and password field

---

<div class="post-metadata">

**Author:** ![pastechecker](https://avatars.discourse-cdn.com/v4/letter/p/0ea827/32.png) [@pastechecker](https://discuss.elastic.co/u/pastechecker)\
**Post date:** [May 31, 2019, 9:46am UTC](https://discuss.elastic.co/t/logstash-7-1-configuration-file-throws-error/183694/6 "2019-05-31T09:46:20Z")

</div>

My fault, that was the json error message quoted part.  
Did you verified that you have closed the "{" , "}" and double quotations everywhere?

---

<div class="post-metadata">

**Author:** ![vinu89](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vinu89/32/45939_2.png) [@vinu89](https://discuss.elastic.co/u/vinu89)\
**Post date:** [May 31, 2019, 9:47am UTC](https://discuss.elastic.co/t/logstash-7-1-configuration-file-throws-error/183694/7 "2019-05-31T09:47:02Z")

</div>

yea i have closed it... i am not sure on how to give the ssl fields

---

<div class="post-metadata">

**Author:** ![pastechecker](https://avatars.discourse-cdn.com/v4/letter/p/0ea827/32.png) [@pastechecker](https://discuss.elastic.co/u/pastechecker)\
**Post date:** [May 31, 2019, 10:45am UTC](https://discuss.elastic.co/t/logstash-7-1-configuration-file-throws-error/183694/8 "2019-05-31T10:45:41Z")

</div>

> [@vinu89](#):
>
> ssl.certificate\_authorities: ["/etc/ca.crt"]  
> ssl.certificate: "/etc/client.crt"  
> ssl.key: "/etc/client.key"

The options here:  
ssl.certificate\_authorities: ["/etc/ca.crt"]  
ssl.certificate: "/etc/client.crt"  
ssl.key: "/etc/client.key"

are valid for filebeats.  
Try to pass to logstash as:

```
    ssl => true
    ssl_certificate_authorities => ["/etc/ca.crt"]
    ssl_certificate => "/etc/server.crt"
    ssl_key => "/etc/server.key"

```

---

<div class="post-metadata">

**Author:** ![vinu89](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vinu89/32/45939_2.png) [@vinu89](https://discuss.elastic.co/u/vinu89)\
**Post date:** [June 3, 2019, 10:06am UTC](https://discuss.elastic.co/t/logstash-7-1-configuration-file-throws-error/183694/9 "2019-06-03T10:06:35Z")

</div>

> [@pastechecker](#):
>
> ssl =\> true ssl\_certificate\_authorities =\> ["/etc/ca.crt"] ssl\_certificate =\> "/etc/server.crt" ssl\_key =\> "/etc/server.key"

It didnt work

---

<div class="post-metadata">

**Author:** ![pastechecker](https://avatars.discourse-cdn.com/v4/letter/p/0ea827/32.png) [@pastechecker](https://discuss.elastic.co/u/pastechecker)\
**Post date:** [June 3, 2019, 10:16am UTC](https://discuss.elastic.co/t/logstash-7-1-configuration-file-throws-error/183694/10 "2019-06-03T10:16:45Z")

</div>

If possible, could you please provide your full configuration so we can start recreating the issue?

---

<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 1, 2019, 10:16am UTC](https://discuss.elastic.co/t/logstash-7-1-configuration-file-throws-error/183694/11 "2019-07-01T10:16:56Z")

</div>

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