# Elastic agents are not sending data to fleet server

**URL:** https://discuss.elastic.co/t/elastic-agents-are-not-sending-data-to-fleet-server/315599
**Category:** Elasticsearch
**Tags:** fleet
**Created:** [September 30, 2022, 5:47pm UTC](https://discuss.elastic.co/t/elastic-agents-are-not-sending-data-to-fleet-server/315599 "2022-09-30T17:47:17Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Leonardo\_Henrique](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leonardo_henrique/32/79658_2.png) [@Leonardo\_Henrique](https://discuss.elastic.co/u/Leonardo_Henrique)
#### Post date: [September 30, 2022, 5:47pm UTC](https://discuss.elastic.co/t/elastic-agents-are-not-sending-data-to-fleet-server/315599/1 "2022-09-30T17:47:17Z")

</div>

Hello everyone!

I set up a Fleet Server in CentOS with the command

```auto
sudo ./elastic-agent install \
  --fleet-server-es=http://<host-ip>:9200 \
  --fleet-server-service-token=<token> \
  --fleet-server-policy=<policy-id) --fleet-server-insecure-http

```

In my fleet policy configuration host is 0.0.0.0 and port is the default, 8220.

When I run the command I can get the fleet in Healthy status. But, when I try to enroll a agent on that it does not work. The agent is enrolled but does not send any data. Follow a command that I used to enroll an agent:

`sudo ./elastic-agent install --url=http://<fleet-host-ip>:8220 --enrollment-token=<token> --insecure`

Can somebody help me to solve that?

---

<div class="post-metadata">

### Author: ![aztazt](https://avatars.discourse-cdn.com/v4/letter/a/e480ec/32.png) [@aztazt](https://discuss.elastic.co/u/aztazt)
#### Post date: [September 30, 2022, 9:21pm UTC](https://discuss.elastic.co/t/elastic-agents-are-not-sending-data-to-fleet-server/315599/2 "2022-09-30T21:21:07Z")

</div>

Hi,  
Sorry, I don't have the solution, but I'm in the exact same situation.

Elastic Agents can enroll and obtain a Healthy status in the Fleet section of Kibana.  
I can see on my agents that the sub process filebeat and metricbeat aren't able to send logs to the elastic server because of this line in the file "C:\Program Files\Elastic\Agent\data\elastic-agent-d3eb3e\logs\default\filebeat-20220930-26.ndjson" :

```auto
{"log.level":"error","@timestamp":"2022-09-30T23:14:08.288+0200","log.logger":"esclientleg","log.origin":{"file.name":"transport/logging.go","file.line":38},"message":"Error dialing x509: certificate signed by unknown authority","service.name":"filebeat","network":"tcp","address":"192.168.0.156:9200","ecs.version":"1.6.0"}

```

My agents were enrolled with this command line :

```auto
PS C:\Program Files\Elastic\Agent> .\elastic-agent.exe enroll --url=https://srv-fleet.xxxxxxxxx.xxx:8220 --enrollment-token=TVpveWpvTxxxxxxxxxxxxxxxxxxxxxxxxxxxxx0daazlyUUVXM1ZVQQ== --ca-sha256 f8dadxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx4f53e002f60d --certificate-authorities "C:\Program Files\Elastic\Agent\srv-fleet.crt" --insecure

```

My fleet server and my elastic stack are not on the same server.

So I might create a separate topic for my own problem, but before I do, I'll let people try to solve Leonardo's problem because I think it might solve mine too.

---

<div class="post-metadata">

### Author: ![Leonardo\_Henrique](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leonardo_henrique/32/79658_2.png) [@Leonardo\_Henrique](https://discuss.elastic.co/u/Leonardo_Henrique)
#### Post date: [October 3, 2022, 4:39pm UTC](https://discuss.elastic.co/t/elastic-agents-are-not-sending-data-to-fleet-server/315599/3 "2022-10-03T16:39:50Z")

</div>

Thank you for sharing your issue as well.

This is not an solution, but more like a workaround.

For some reason installing fleet server and apm throught binaries (with yum in my case) was not working. I installed the first one in server A and the other in server B. The connections between the two hosts were ok, but nothing worked.

Then I decided to deploy fleet and agent as docker containers and I could get it running, but I know that it is not a fit solution for every case. So, if someone that faced the issue described above could give us some guidance, it woud be great.

Thanks!

---

<div class="post-metadata">

### Author: ![swchandu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/swchandu/32/95295_2.png) [@swchandu](https://discuss.elastic.co/u/swchandu)
#### Post date: [October 14, 2022, 4:37am UTC](https://discuss.elastic.co/t/elastic-agents-are-not-sending-data-to-fleet-server/315599/4 "2022-10-14T04:37:59Z")

</div>

Have you found the solution for this.

---

<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: [November 11, 2022, 4:38am UTC](https://discuss.elastic.co/t/elastic-agents-are-not-sending-data-to-fleet-server/315599/5 "2022-11-11T04:38:46Z")

</div>

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