# Logstash cannot open file located in /etc/logstash

**URL:** <https://discuss.elastic.co/t/logstash-cannot-open-file-located-in-etc-logstash/162855>\
**Category:** Logstash\
**Tags:** elastic-stack-security\
**Created:** [January 3, 2019, 5:47pm UTC](https://discuss.elastic.co/t/logstash-cannot-open-file-located-in-etc-logstash/162855 "2019-01-03T17:47:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bigdamhero](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bigdamhero/32/34478_2.png) [@bigdamhero](https://discuss.elastic.co/u/bigdamhero)\
**Post date:** [January 3, 2019, 5:47pm UTC](https://discuss.elastic.co/t/logstash-cannot-open-file-located-in-etc-logstash/162855/1 "2019-01-03T17:47:43Z")

</div>

I am trying (for the first time) to get an instance of logstash (running on ubuntu) to connect with my secured cluster.  
I am confused a bit on the security certificate formats but I am receiving this error so I am working through each error as it comes.

```
   Jan 03 11:45:36 servername logstash[28352]: [2019-01-03T11:45:36,103][ERROR][logstash.outputs.elasticsearch] Invalid setting for elasticsearch output plugin:

```

Jan 03 11:45:36 servername logstash[28352]: output {  
Jan 03 11:45:36 servername logstash[28352]: elasticsearch {  
Jan 03 11:45:36 servername logstash[28352]: # This setting must be a path  
Jan 03 11:45:36 servername logstash[28352]: # File does not exist or cannot be opened /etc/logstash/config/certs/instance.crt  
Jan 03 11:45:36 servername logstash[28352]: cacert =\> "/etc/logstash/config/certs/instance.crt"  
Jan 03 11:45:36 servername logstash[28352]: ...  
Jan 03 11:45:36 servername logstash[28352]: }  
Jan 03 11:45:36 servername logstash[28352]: }

Any help or hints would be welcome.

Thanks for the support.

---

<div class="post-metadata">

**Author:** ![staodd](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/staodd/32/24509_2.png) [@staodd](https://discuss.elastic.co/u/staodd)\
**Post date:** [January 3, 2019, 11:01pm UTC](https://discuss.elastic.co/t/logstash-cannot-open-file-located-in-etc-logstash/162855/2 "2019-01-03T23:01:18Z")

</div>

Have you checked the ACL for the file? Check what user runs the logstash process and make sure that user can read the file.

---

<div class="post-metadata">

**Author:** ![bigdamhero](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bigdamhero/32/34478_2.png) [@bigdamhero](https://discuss.elastic.co/u/bigdamhero)\
**Post date:** [January 4, 2019, 12:59pm UTC](https://discuss.elastic.co/t/logstash-cannot-open-file-located-in-etc-logstash/162855/3 "2019-01-04T12:59:03Z")

</div>

Thanks for the reply, I did and that was confusing. Am I wrong or does elasticsearch and kibana expect the config file under /etc/application/config? and logstash only works if its in /usr/share/application/config? One other thing I did was a made sure all the logstash plugins were updated. I had updated logstash and apparently that update does not check if the modules are compatible, (bug)?

---

<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 1, 2019, 12:59pm UTC](https://discuss.elastic.co/t/logstash-cannot-open-file-located-in-etc-logstash/162855/4 "2019-02-01T12:59:04Z")

</div>

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