# Regarding the logstash cacerts issue

**URL:** <https://discuss.elastic.co/t/regarding-the-logstash-cacerts-issue/355961>\
**Category:** Kibana\
**Created:** [March 22, 2024, 7:07am UTC](https://discuss.elastic.co/t/regarding-the-logstash-cacerts-issue/355961 "2024-03-22T07:07:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![HSc](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hsc/32/129608_2.png) [@HSc](https://discuss.elastic.co/u/HSc)\
**Post date:** [March 22, 2024, 7:07am UTC](https://discuss.elastic.co/t/regarding-the-logstash-cacerts-issue/355961/1 "2024-03-22T07:07:11Z")

</div>

Hi,  
I am new to ELK. As i am using beats to send logs to logstash and then to elasticsearch but the issue is when i run the logstash as service then the status is running but when i went to logs of logstash it shows..

```auto
elasticsearch {
      # This setting must be a path
      # File does not exist or cannot be opened /etc/elasticsearch/certs/http_ca.crt
      cacert => "/etc/elasticsearch/certs/http_ca.crt"
      ...
    }
  }
[2024-03-22T12:24:05,276][ERROR][logstash.agent] Failed to execute action {:action=>LogStash::PipelineAction::Create/pipeline_id:main, :exception=>"Java::JavaLang::IllegalStateException", :message=>"Unable to configure plugins: (ConfigurationError) Something is wrong with your configuration.", 

```

But when i run the configration directly by using

```auto
sudo /usr/share/logstash/bin/logstash -f /etc/logstash/conf.d/production_csv_config.conf 

```

it worked and logs are send to elasticsearch and every thing works fine.

So my main issue is to send the logs continually and i think it can only be done by service only.

I have also given the permission to certs.

---

<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:** [March 22, 2024, 12:24pm UTC](https://discuss.elastic.co/t/regarding-the-logstash-cacerts-issue/355961/2 "2024-03-22T12:24:08Z")

</div>

> [@HSc](#):
>
> `# File does not exist or cannot be opened /etc/elasticsearch/certs/http_ca.crt`

This means that the user running logstash can not access this file.

When you run logstash as a service it runs using the `logstash` user, so the `logstash` user must have permissions on the path and the file, you need to fix your permissions, they are not correct.

> [@HSc](#):
>
> But when i run the configration directly by using

This works because you are using sudo, so permissions will not be an issue, but you should avoid running logstash as the `root` user or with `sudo`, this can change the permissions of some files and make logstash to not work as a service until the permissions are fixed.

---

<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 19, 2024, 12:24pm UTC](https://discuss.elastic.co/t/regarding-the-logstash-cacerts-issue/355961/3 "2024-04-19T12:24:34Z")

</div>

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