# Elastic-agent : endpoint-security.sock no such file or directory

**URL:** <https://discuss.elastic.co/t/elastic-agent-endpoint-security-sock-no-such-file-or-directory/292293>\
**Category:** Beats\
**Tags:** elastic-agent\
**Created:** [December 17, 2021, 10:41am UTC](https://discuss.elastic.co/t/elastic-agent-endpoint-security-sock-no-such-file-or-directory/292293 "2021-12-17T10:41:42Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Lnood5](https://avatars.discourse-cdn.com/v4/letter/l/898d66/32.png) [@Lnood5](https://discuss.elastic.co/u/Lnood5)\
**Post date:** [December 22, 2021, 2:56pm UTC](https://discuss.elastic.co/t/elastic-agent-endpoint-security-sock-no-such-file-or-directory/292293/3 "2021-12-22T14:56:00Z")

</div>

Hello, I reinstalled it many times but the problem is persistent.  
I had two problems, first one, I didn’t correctly pass my certificates to my elastic-agents  
I solved it by passing my certificates to the fleet settings, so now I have logs comming from filebeat and metribeat (I also use system integration).

The problem come from :

```auto
[elastic_agent.endpoint_security][error] Http.cpp:327 CURL error 60: SSL peer certificate or SSH remote key was not OK [SSL certificate problem: unable to get local issuer certificate]

```

I have this error on both Windows and Linux  
Its still a certificate problem, I saw a thread with the same error.

> [@No alert in security detection dashboards after malware attack](https://discuss.elastic.co/t/no-alert-in-security-detection-dashboards-after-malware-attack/258380):
>
> Hello ES team, After installing and enrolling Elastic Agent 7.10 we launched an Mimikatz.exe on our Win10 machine and received an ES Malware Alert but we do not receive an alert in Security Detections tab in Kibana. The rule: Malware - Detected - Endpoint Security was activated and can't be edited. In Security-\>Administration tab there are no Endpoints enrolled. In Data streams tab the elastic\_agent.endpoint-security is not integrated to endpoint.

But I give all my certificates through my fleet settings.

```auto
  api_key: ""
  hosts: ["https://myserver:9200"]
  protocol: https
  ssl.certificate_authorities: |
    -----BEGIN CERTIFICATE-----

    -----END CERTIFICATE-----
  ssl.certificate: |
    -----BEGIN CERTIFICATE-----

    -----END CERTIFICATE-----

  ssl.key: |
    -----BEGIN RSA PRIVATE KEY-----

    -----END RSA PRIVATE KEY-----

```

So I don't know why I still have this problem, I must have missed a parameter.  
Thank you for your time

---

_[View the full topic](https://discuss.elastic.co/t/elastic-agent-endpoint-security-sock-no-such-file-or-directory/292293)._
