# Fail to enroll: fail to execute request to Kibana

**URL:** <https://discuss.elastic.co/t/fail-to-enroll-fail-to-execute-request-to-kibana/245945>\
**Category:** Kibana\
**Tags:** elastic-agent\
**Created:** [August 21, 2020, 5:55pm UTC](https://discuss.elastic.co/t/fail-to-enroll-fail-to-execute-request-to-kibana/245945 "2020-08-21T17:55:02Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![francescouk](https://avatars.discourse-cdn.com/v4/letter/f/7feea3/32.png) [@francescouk](https://discuss.elastic.co/u/francescouk)\
**Post date:** [August 21, 2020, 5:55pm UTC](https://discuss.elastic.co/t/fail-to-enroll-fail-to-execute-request-to-kibana/245945/1 "2020-08-21T17:55:02Z")

</div>

Hello there, I´m trying to setting up my elastic-agent but no success. Can you guy´s please help me?

```auto
PS C:\Program Files\Elastic-Agent> .\elastic-agent.exe enroll https://0.0.0.0:5601 xxXxxxxXXxXXXXXXXxxxx
The Elastic Agent is currently in BETA and should not be used in production
This will replace your current settings. Do you want to continue? [Y/n]:Y
2020-08-21T14:40:11.477-0300 DEBUG kibana/client.go:170 Request method: POST, path: /api/ingest_manager/fleet/ag
ents/enroll
fail to enroll: fail to execute request to Kibana: Post "https://0.0.0.0:5601/api/ingest_manager/fleet/agents/enr
oll?": x509: certificate signed by unknown authority

```

And bellow shows my certificate created by Elastic

![image](https://us1.discourse-cdn.com/elastic/original/3X/e/f/ef1d7cdc6db378b844169eaf761c14b55c87c79a.png)

**What I´m doing wrong?**

Thanks for the attention,

---

<div class="post-metadata">

**Author:** ![ruflin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ruflin/32/3116_2.png) [@ruflin](https://discuss.elastic.co/u/ruflin)\
**Post date:** [August 24, 2020, 8:14am UTC](https://discuss.elastic.co/t/fail-to-enroll-fail-to-execute-request-to-kibana/245945/2 "2020-08-24T08:14:55Z")

</div>

Hi @francescouk Great to see you are trying out ingest manager and the agent. I assume you are using a self signed certificate? This discussion here could help you: [https://github.com/elastic/kibana/issues/73483#issuecomment-676419501](https://github.com/elastic/kibana/issues/73483#issuecomment-676419501)

---

<div class="post-metadata">

**Author:** ![francescouk](https://avatars.discourse-cdn.com/v4/letter/f/7feea3/32.png) [@francescouk](https://discuss.elastic.co/u/francescouk)\
**Post date:** [August 24, 2020, 1:46pm UTC](https://discuss.elastic.co/t/fail-to-enroll-fail-to-execute-request-to-kibana/245945/3 "2020-08-24T13:46:41Z")

</div>

Thanks for reply!

Following the discussion page provided, I got the elastic agent enrolled but unfortunatelly was not enough.

After the elastic-agent has been enrolled, it does it´s magic and start 3 components:

1 - Metricbeat  
2 - Filebeat  
3 - Endpoint Security

For the endpoint part, it does almost automagic BUT two incomplete parts:

1 - It does not bring the elasticsearch info correctly as the code bellow - points to localhost  
2 - Elasticsearch cluster complaints about the **bad certificate**. Should we have to specify the certificate in the Elastic Endpoint as well?

```auto
api:
    access_api_key: XXXXXXXXXXXXXxXXXX
    kibana:
      host: 192.168.1.1:5601
      protocol: https
      ssl:
        renegotiation: never
        verification_mode: none
      timeout: 1m30s

output:
  elasticsearch:
    api_key: XXXXxxXXXXXxXxXxXx
    hosts:
    - http://localhost:9200
revision: 5

```

My question is, how can I make it work?

---

<div class="post-metadata">

**Author:** ![ruflin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ruflin/32/3116_2.png) [@ruflin](https://discuss.elastic.co/u/ruflin)\
**Post date:** [August 25, 2020, 6:42am UTC](https://discuss.elastic.co/t/fail-to-enroll-fail-to-execute-request-to-kibana/245945/4 "2020-08-25T06:42:45Z")

</div>

Is Filebeat and Metricbeat shipping data and only Endpoint data is missing?

---

<div class="post-metadata">

**Author:** ![francescouk](https://avatars.discourse-cdn.com/v4/letter/f/7feea3/32.png) [@francescouk](https://discuss.elastic.co/u/francescouk)\
**Post date:** [August 26, 2020, 7:02pm UTC](https://discuss.elastic.co/t/fail-to-enroll-fail-to-execute-request-to-kibana/245945/5 "2020-08-26T19:02:36Z")

</div>

That´s correct.

---

<div class="post-metadata">

**Author:** ![ruflin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ruflin/32/3116_2.png) [@ruflin](https://discuss.elastic.co/u/ruflin)\
**Post date:** [August 27, 2020, 6:16am UTC](https://discuss.elastic.co/t/fail-to-enroll-fail-to-execute-request-to-kibana/245945/6 "2020-08-27T06:16:58Z")

</div>

@ferullo You might know more here? I think I saw the same before.

---

<div class="post-metadata">

**Author:** ![NickFritts](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nickfritts/32/47189_2.png) [@NickFritts](https://discuss.elastic.co/u/NickFritts)\
**Post date:** [August 27, 2020, 7:35pm UTC](https://discuss.elastic.co/t/fail-to-enroll-fail-to-execute-request-to-kibana/245945/7 "2020-08-27T19:35:09Z")

</div>

Hi @francescouk

Could you check out this thread and see if it helps you? [Elastic endpoint overwrites configuration file](https://discuss.elastic.co/t/elastic-endpoint-overwrites-configuration-file/246531/4)

It looks like the Endpoint data should start flowing if you follow the steps to set the server in Ingest Manager and then have the config update propagate down to Endpoint.

I'm going to copy/paste the steps I left in the other thread at the end of this message. If this doesn't resolve you're issue please let me know.

Workaround steps:

- In ingest manager, under the main settings menu, you can update,add,change the Kibana and Elasticsearch URLs. Click save.
- Afterward, under the Configurations tab of ingest manager, click on the Configuration assigned to the endpoint you want to update.
- On the Configuration page, in the integrations tab, click the actions "..." for the Elastic Endpoint Security integration and select "Edit integration"
- On this next page, click "Save integration" in the bottom right (you do not need to make any changes).

---

<div class="post-metadata">

**Author:** ![francescouk](https://avatars.discourse-cdn.com/v4/letter/f/7feea3/32.png) [@francescouk](https://discuss.elastic.co/u/francescouk)\
**Post date:** [August 28, 2020, 12:40pm UTC](https://discuss.elastic.co/t/fail-to-enroll-fail-to-execute-request-to-kibana/245945/8 "2020-08-28T12:40:34Z")

</div>

I can now confirm that both elastic-agent and elastic endpoint are sending to ELK stack after including the self certificate in the windows root store certificate.

---

<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:** [September 25, 2020, 12:40pm UTC](https://discuss.elastic.co/t/fail-to-enroll-fail-to-execute-request-to-kibana/245945/9 "2020-09-25T12:40:36Z")

</div>

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