# Cannot Enroll Elastic Agent to Fleet hosted on Elastic Cloud Enterprise

**URL:** https://discuss.elastic.co/t/cannot-enroll-elastic-agent-to-fleet-hosted-on-elastic-cloud-enterprise/246962
**Category:** Elastic Cloud Enterprise (ECE)
**Created:** [August 31, 2020, 1:54pm UTC](https://discuss.elastic.co/t/cannot-enroll-elastic-agent-to-fleet-hosted-on-elastic-cloud-enterprise/246962 "2020-08-31T13:54:32Z")
**Posts on this page:** 15
**Page:** 1

<div class="post-metadata">

### Author: ![hallaoui](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hallaoui/32/77342_2.png) [@hallaoui](https://discuss.elastic.co/u/hallaoui)
#### Post date: [August 31, 2020, 1:54pm UTC](https://discuss.elastic.co/t/cannot-enroll-elastic-agent-to-fleet-hosted-on-elastic-cloud-enterprise/246962/1 "2020-08-31T13:54:32Z")

</div>

Hi All,

I am trying to test Elastic Agent on my PC Windows laptop but when I run command to enroll it to Fleet I got below message error.

# .\elastic-agent enroll [https://ef13ea6b551540938cccfb4c482b50a0.10.30.30.204.ip.es.io:9243](https://ef13ea6b551540938cccfb4c482b50a0.10.30.30.204.ip.es.io:9243) MzdKVFJIUUJxT0k1UURMbzh1NGQ6NzJJRjBPYzVRaU9mMFNwcjVxVWNZdw==

fail to enroll: fail to execute request to Kibana: Post "[https://ef13ea6b551540938cccfb4c482b50a0.10.30.30.204.ip.es.io:9243/api/ingest\_manager/fleet/agents/enroll?":](https://ef13ea6b551540938cccfb4c482b50a0.10.30.30.204.ip.es.io:9243/api/ingest_manager/fleet/agents/enroll?%22:) x509: certificate signed by unknown authority

For info my Elasticsearch and Kibana are deployed in ECE.

Thanks for your support.

Hamid

---

<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: [September 1, 2020, 8:23am UTC](https://discuss.elastic.co/t/cannot-enroll-elastic-agent-to-fleet-hosted-on-elastic-cloud-enterprise/246962/2 "2020-09-01T08:23:12Z")

</div>

Hi, it looks like you have the same issue as others with the self signed certificates. Have a look at this thread here: [[Ingest management] Use insecure elasticsearch output managed in fleet mode for elastic agent](https://discuss.elastic.co/t/ingest-management-use-insecure-elasticsearch-output-managed-in-fleet-mode-for-elastic-agent/246022/2)

---

<div class="post-metadata">

### Author: ![hallaoui](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hallaoui/32/77342_2.png) [@hallaoui](https://discuss.elastic.co/u/hallaoui)
#### Post date: [September 1, 2020, 10:42am UTC](https://discuss.elastic.co/t/cannot-enroll-elastic-agent-to-fleet-hosted-on-elastic-cloud-enterprise/246962/3 "2020-09-01T10:42:03Z")

</div>

Hi Ruflin,

Thanks for your reply but in the thread you mentioned I cannot find any solution to my issue. I even tried the Standalone mode but not data shown in Datasets tab of Ingest Manager.  
Any detailed procedure please to follow to make it working ?

Thanks for your support.  
Hamid

---

<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: [September 2, 2020, 9:24am UTC](https://discuss.elastic.co/t/cannot-enroll-elastic-agent-to-fleet-hosted-on-elastic-cloud-enterprise/246962/4 "2020-09-02T09:24:44Z")

</div>

Could you share by chance the config you used in standalone mode? Under data you can find error logs for metricbeat / filebeat, could you share these as they might contain more information on what didn't work.

---

<div class="post-metadata">

### Author: ![hallaoui](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hallaoui/32/77342_2.png) [@hallaoui](https://discuss.elastic.co/u/hallaoui)
#### Post date: [September 2, 2020, 10:07am UTC](https://discuss.elastic.co/t/cannot-enroll-elastic-agent-to-fleet-hosted-on-elastic-cloud-enterprise/246962/5 "2020-09-02T10:07:29Z")

</div>

Hi Ruflin,

Thanks again for your support.

The configuration I used is the one given by Ingest Manager and you can find it below.

For the logs please find them attached to this message.

elastic-agent.yml:

id: 5fd56a50-eb7e-11ea-87cd-11a6a05e64d9  
revision: 1  
outputs:  
default:  
type: elasticsearch  
hosts:

- '' username: elastic password: 05b7jz5qldMlRX5tUAQnV8ff agent: monitoring: enabled: true use\_output: default logs: true metrics: true inputs: - id: 6bce72c0-eb7e-11ea-87cd-11a6a05e64d9 name: system-1 type: logfile use\_output: default meta: package: name: system version: 0.5.3 data\_stream: namespace: default streams: - id: logfile-system.auth data\_stream: dataset: system.auth type: logs paths: - /var/log/auth.log\* - /var/log/secure\* exclude\_files: - .gz$ multiline: pattern: ^\s match: after processors: - add\_locale: null - add\_fields: target: '' fields: ecs.version: 1.5.0 - id: logfile-system.syslog data\_stream: dataset: system.syslog type: logs paths: - /var/log/messages\* - /var/log/syslog\* exclude\_files: - .gz$ multiline: pattern: ^\s match: after processors: - add\_locale: null - add\_fields: target: '' fields: ecs.version: 1.5.0 - id: 6bce72c0-eb7e-11ea-87cd-11a6a05e64d9 name: system-1 type: system/metrics use\_output: default meta: package: name: system version: 0.5.3 data\_stream: namespace: default streams: - id: system/metrics-system.cpu data\_stream: dataset: system.cpu type: metrics metricsets: - cpu cpu.metrics: - percentages - normalized\_percentages period: 10s - id: system/metrics-system.diskio data\_stream: dataset: system.diskio type: metrics metricsets: - diskio diskio.include\_devices: null period: 10s - id: system/metrics-system.load data\_stream: dataset: system.load type: metrics metricsets: - load period: 10s - id: system/metrics-system.memory data\_stream: dataset: system.memory type: metrics metricsets: - memory period: 10s - id: system/metrics-system.network data\_stream: dataset: system.network type: metrics metricsets: - network period: 10s network.interfaces: null - id: system/metrics-system.process data\_stream: dataset: system.process type: metrics metricsets: - process period: 10s process.include\_top\_n.by\_cpu: 5 process.include\_top\_n.by\_memory: 5 process.cmdline.cache.enabled: true process.cgroups.enabled: true processes: - .\* - id: system/metrics-system.process\_summary data\_stream: dataset: system.process\_summary type: metrics metricsets: - process\_summary period: 10s - id: system/metrics-system.socket\_summary data\_stream: dataset: system.socket\_summary type: metrics metricsets: - socket\_summary period: 10s - id: system/metrics-system.uptime data\_stream: dataset: system.uptime type: metrics metricsets: - uptime period: 10s

Thanks & Regards,

Hamid

(Attachment logs.tar.gz is missing)

---

<div class="post-metadata">

### Author: ![hallaoui](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hallaoui/32/77342_2.png) [@hallaoui](https://discuss.elastic.co/u/hallaoui)
#### Post date: [September 2, 2020, 10:11am UTC](https://discuss.elastic.co/t/cannot-enroll-elastic-agent-to-fleet-hosted-on-elastic-cloud-enterprise/246962/6 "2020-09-02T10:11:56Z")

</div>

Please find attached metricbeat / filebeat logs.

Thanks

(Attachment filebeat-json.log-2020-09-02-12-1 is missing)

(Attachment metricbeat-json.log-2020-09-02-12-2 is missing)

---

<div class="post-metadata">

### Author: ![hallaoui](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hallaoui/32/77342_2.png) [@hallaoui](https://discuss.elastic.co/u/hallaoui)
#### Post date: [September 2, 2020, 10:13am UTC](https://discuss.elastic.co/t/cannot-enroll-elastic-agent-to-fleet-hosted-on-elastic-cloud-enterprise/246962/7 "2020-09-02T10:13:22Z")

</div>

Apparently I cannot upload the logs files to the thread. Is there another way to share the logs?

Thanks.

---

<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: [September 2, 2020, 12:10pm UTC](https://discuss.elastic.co/t/cannot-enroll-elastic-agent-to-fleet-hosted-on-elastic-cloud-enterprise/246962/8 "2020-09-02T12:10:55Z")

</div>

Could you try to use ticks (`) around the pasted yaml so it is formatted correctly? I couldn't see a host specified in there. Under what hostname is Elasticsearch running.

For the logs, you could try a `gist`.

---

<div class="post-metadata">

### Author: ![hallaoui](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hallaoui/32/77342_2.png) [@hallaoui](https://discuss.elastic.co/u/hallaoui)
#### Post date: [September 2, 2020, 1:01pm UTC](https://discuss.elastic.co/t/cannot-enroll-elastic-agent-to-fleet-hosted-on-elastic-cloud-enterprise/246962/9 "2020-09-02T13:01:52Z")

</div>

```auto
id: 5fd56a50-eb7e-11ea-87cd-11a6a05e64d9
revision: 1
outputs:
  default:
    type: elasticsearch
    hosts:
      - 'https://45cd934da9d443b187c79007c5bcb586.10.30.30.204.ip.es.io:9243'
    username: elastic
    password: 05b7jz5qldMlRX5tUAQnV8ff
agent:
  monitoring:
    enabled: true
    use_output: default
    logs: true
    metrics: true
inputs:
  - id: 6bce72c0-eb7e-11ea-87cd-11a6a05e64d9
    name: system-1
    type: logfile
    use_output: default
    meta:
      package:
        name: system
        version: 0.5.3
    data_stream:
      namespace: default
    streams:
      - id: logfile-system.auth
        data_stream:
          dataset: system.auth
          type: logs
        paths:
          - /var/log/auth.log*
          - /var/log/secure*
        exclude_files:
          - .gz$
        multiline:
          pattern: ^\s
          match: after
        processors:
          - add_locale: null
          - add_fields:
              target: ''
              fields:
                ecs.version: 1.5.0
      - id: logfile-system.syslog
        data_stream:
          dataset: system.syslog
          type: logs
        paths:
          - /var/log/messages*
          - /var/log/syslog*
        exclude_files:
          - .gz$
        multiline:
          pattern: ^\s
          match: after
        processors:
          - add_locale: null
          - add_fields:
              target: ''
              fields:
                ecs.version: 1.5.0
  - id: 6bce72c0-eb7e-11ea-87cd-11a6a05e64d9
    name: system-1
    type: system/metrics
    use_output: default
    meta:
      package:
        name: system
        version: 0.5.3
    data_stream:
      namespace: default
    streams:
      - id: system/metrics-system.cpu
        data_stream:
          dataset: system.cpu
          type: metrics
        metricsets:
          - cpu
        cpu.metrics:
          - percentages
          - normalized_percentages
        period: 10s
      - id: system/metrics-system.diskio
        data_stream:
          dataset: system.diskio
          type: metrics
        metricsets:
          - diskio
        diskio.include_devices: null
        period: 10s
      - id: system/metrics-system.load
        data_stream:
          dataset: system.load
          type: metrics
        metricsets:
          - load
        period: 10s
      - id: system/metrics-system.memory
        data_stream:
          dataset: system.memory
          type: metrics
        metricsets:
          - memory
        period: 10s
      - id: system/metrics-system.network
        data_stream:
          dataset: system.network
          type: metrics
        metricsets:
          - network
        period: 10s
        network.interfaces: null
      - id: system/metrics-system.process
        data_stream:
          dataset: system.process
          type: metrics
        metricsets:
          - process
        period: 10s
        process.include_top_n.by_cpu: 5
        process.include_top_n.by_memory: 5
        process.cmdline.cache.enabled: true
        process.cgroups.enabled: true
        processes:
          - .*
      - id: system/metrics-system.process_summary
        data_stream:
          dataset: system.process_summary
          type: metrics
        metricsets:
          - process_summary
        period: 10s
      - id: system/metrics-system.socket_summary
        data_stream:
          dataset: system.socket_summary
          type: metrics
        metricsets:
          - socket_summary
        period: 10s
      - id: system/metrics-system.uptime
        data_stream:
          dataset: system.uptime
          type: metrics
        metricsets:
          - uptime
        period: 10s

```

---

<div class="post-metadata">

### Author: ![hallaoui](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hallaoui/32/77342_2.png) [@hallaoui](https://discuss.elastic.co/u/hallaoui)
#### Post date: [September 2, 2020, 1:13pm UTC](https://discuss.elastic.co/t/cannot-enroll-elastic-agent-to-fleet-hosted-on-elastic-cloud-enterprise/246962/10 "2020-09-02T13:13:41Z")

</div>

For the logs please find them in below gist:

> <https://gist.github.com/hamidallaoui/84bc7ea870fa46da7feaff8567eac335>

Thanks for your support.

---

<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: [September 3, 2020, 7:08am UTC](https://discuss.elastic.co/t/cannot-enroll-elastic-agent-to-fleet-hosted-on-elastic-cloud-enterprise/246962/11 "2020-09-03T07:08:10Z")

</div>

Thanks for all the details. I found the following entry in your log files:

```auto
{"log.level":"debug","@timestamp":"2020-09-02T12:57:27.817+0300","log.logger":"esclientleg","log.origin":{"file.name":"eslegclient/connection.go","file.line":294},"message":"Ping request failed with: Get \"https://45cd934da9d443b187c79007c5bcb586.10.30.30.204.ip.es.io:9243\": x509: certificate signed by unknown authority","ecs.version":"1.5.0"}

```

Where are you running your ES cluster? It seems like a certificate issue.

---

<div class="post-metadata">

### Author: ![hallaoui](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hallaoui/32/77342_2.png) [@hallaoui](https://discuss.elastic.co/u/hallaoui)
#### Post date: [September 3, 2020, 8:04am UTC](https://discuss.elastic.co/t/cannot-enroll-elastic-agent-to-fleet-hosted-on-elastic-cloud-enterprise/246962/12 "2020-09-03T08:04:43Z")

</div>

Hi Ruflin,

Thanks for your support.

My ES is running in ECE deployed on remote linux machines and the Agent is running on my laptop.

Thanks.

Hamid

---

<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: [September 4, 2020, 8:06am UTC](https://discuss.elastic.co/t/cannot-enroll-elastic-agent-to-fleet-hosted-on-elastic-cloud-enterprise/246962/13 "2020-09-04T08:06:16Z")

</div>

I think we have a certificate issue here. Unfortunately its an issue quite a few users are hitting at the moment and we are working on fixing it. For an intermediate solution, have a look at these threads here: [https://discuss.elastic.co/search?q=certificate%20tag%3Astack-ingest-management](https://discuss.elastic.co/search?q=certificate%20tag%3Astack-ingest-management)

---

<div class="post-metadata">

### Author: ![hallaoui](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hallaoui/32/77342_2.png) [@hallaoui](https://discuss.elastic.co/u/hallaoui)
#### Post date: [September 6, 2020, 7:57am UTC](https://discuss.elastic.co/t/cannot-enroll-elastic-agent-to-fleet-hosted-on-elastic-cloud-enterprise/246962/14 "2020-09-06T07:57:56Z")

</div>

Hi Ruflin,

Thank you for your support, by waiting your fix I will have a look at the threads you shared and see if it can help to fix my issue.

Thanks,  
Hamid

---

<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 20, 2020, 7:57am UTC](https://discuss.elastic.co/t/cannot-enroll-elastic-agent-to-fleet-hosted-on-elastic-cloud-enterprise/246962/15 "2020-09-20T07:57:58Z")

</div>

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