# Why Fleet server is not healthy?

**URL:** <https://discuss.elastic.co/t/why-fleet-server-is-not-healthy/358368>\
**Category:** Beats\
**Tags:** fleet\
**Created:** [April 28, 2024, 11:04am UTC](https://discuss.elastic.co/t/why-fleet-server-is-not-healthy/358368 "2024-04-28T11:04:59Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Intruder](https://avatars.discourse-cdn.com/v4/letter/i/c5a1d2/32.png) [@Intruder](https://discuss.elastic.co/u/Intruder)\
**Post date:** [April 28, 2024, 11:04am UTC](https://discuss.elastic.co/t/why-fleet-server-is-not-healthy/358368/1 "2024-04-28T11:04:59Z")

</div>

I am super new to ealstic , and I followed the instruction (Quick start) to start a fleet server and enroll the policy . It is healthy about 20mins ? But when I restart Kibana , and after 20 mins , it became unhealthy , and requires me add another fleet server . What is happening ? What can I do ? Could really use some help !  
!

 ![333](https://us1.discourse-cdn.com/elastic/original/3X/b/8/b8e23542809edc6df57fc42faa5796ad5ae82ca1.png)

---

<div class="post-metadata">

**Author:** ![carly.richmond](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/carly.richmond/32/104935_2.png) [@carly.richmond](https://discuss.elastic.co/u/carly.richmond)\
**Post date:** [April 29, 2024, 9:06am UTC](https://discuss.elastic.co/t/why-fleet-server-is-not-healthy/358368/2 "2024-04-29T09:06:35Z")

</div>

Hi @Intruder,

Welcome to the community! Can you share which version of Elastic and Fleet you are using? Can you also share any warning or error messages in the logs?

---

<div class="post-metadata">

**Author:** ![Intruder](https://avatars.discourse-cdn.com/v4/letter/i/c5a1d2/32.png) [@Intruder](https://discuss.elastic.co/u/Intruder)\
**Post date:** [April 29, 2024, 9:58am UTC](https://discuss.elastic.co/t/why-fleet-server-is-not-healthy/358368/4 "2024-04-29T09:58:11Z")

</div>

![333](https://us1.discourse-cdn.com/elastic/original/3X/5/d/5d3eb792c3fd06392495a0aa769a8bc00d86ae3f.png)

Is this the log ? I have also downloaded the "elastic-agent-diagnostics-2024-04-28T10-43-48Z-00" but I can not attach files there

---

<div class="post-metadata">

**Author:** ![Intruder](https://avatars.discourse-cdn.com/v4/letter/i/c5a1d2/32.png) [@Intruder](https://discuss.elastic.co/u/Intruder)\
**Post date:** [April 29, 2024, 11:00am UTC](https://discuss.elastic.co/t/why-fleet-server-is-not-healthy/358368/5 "2024-04-29T11:00:57Z")

</div>

![434](https://us1.discourse-cdn.com/elastic/original/3X/e/f/ef7420b2ec6f212b20de4602b5ab0836e5422228.png)  
What does this "can nor fetch version " mean ?

---

<div class="post-metadata">

**Author:** ![carly.richmond](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/carly.richmond/32/104935_2.png) [@carly.richmond](https://discuss.elastic.co/u/carly.richmond)\
**Post date:** [April 29, 2024, 11:15am UTC](https://discuss.elastic.co/t/why-fleet-server-is-not-healthy/358368/6 "2024-04-29T11:15:50Z")

</div>

Thanks for sharing. That looks to be a connectivity issue between fleet server and Elasticsearch (401 unauthorized error on the agent).

It looks like the communication between fleet and Elasticsearch is blocked somehow. Do you have a proxy configured at all? What security settings have you enabled?

---

<div class="post-metadata">

**Author:** ![Intruder](https://avatars.discourse-cdn.com/v4/letter/i/c5a1d2/32.png) [@Intruder](https://discuss.elastic.co/u/Intruder)\
**Post date:** [April 29, 2024, 11:53am UTC](https://discuss.elastic.co/t/why-fleet-server-is-not-healthy/358368/7 "2024-04-29T11:53:56Z")

</div>

I dont have any proxy , all security is default , all I did from download is

1.enroll the kibana token ,kibana-setup  
2.login 5601  
3.Follow quick start added fleet server and policy  
4.Add elastic defend to existing policy  
5.Use kibana generate keys and added these stuff

 ![1234](https://us1.discourse-cdn.com/elastic/original/3X/c/c/cc0bb6af3762df99692ab125e1fc8739c1fcae5b.jpeg)  
6.added some rules.

Are there something wrong in my steps ?

---

<div class="post-metadata">

**Author:** ![Intruder](https://avatars.discourse-cdn.com/v4/letter/i/c5a1d2/32.png) [@Intruder](https://discuss.elastic.co/u/Intruder)\
**Post date:** [April 29, 2024, 11:55am UTC](https://discuss.elastic.co/t/why-fleet-server-is-not-healthy/358368/8 "2024-04-29T11:55:09Z")

</div>

In the elastic.yml I enabled xpacksecurity

---

<div class="post-metadata">

**Author:** ![Intruder](https://avatars.discourse-cdn.com/v4/letter/i/c5a1d2/32.png) [@Intruder](https://discuss.elastic.co/u/Intruder)\
**Post date:** [April 30, 2024, 11:41am UTC](https://discuss.elastic.co/t/why-fleet-server-is-not-healthy/358368/9 "2024-04-30T11:41:09Z")

</div>

Now I start to think this is the problem that is unhealthy

 ![44](https://us1.discourse-cdn.com/elastic/original/3X/e/5/e5304d78289aec4b65f46813a991a40c12cab8eb.png)  
I am trying to fix it , any help is welcome

---

<div class="post-metadata">

**Author:** ![carly.richmond](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/carly.richmond/32/104935_2.png) [@carly.richmond](https://discuss.elastic.co/u/carly.richmond)\
**Post date:** [May 1, 2024, 9:09am UTC](https://discuss.elastic.co/t/why-fleet-server-is-not-healthy/358368/10 "2024-05-01T09:09:08Z")

</div>

@Intruder it looks like your agent is not able to connect to Elasticsearch. Is you Elasticsearch instance up and healthy? Are you connection settings correct?

---

<div class="post-metadata">

**Author:** ![Intruder](https://avatars.discourse-cdn.com/v4/letter/i/c5a1d2/32.png) [@Intruder](https://discuss.elastic.co/u/Intruder)\
**Post date:** [May 1, 2024, 3:44pm UTC](https://discuss.elastic.co/t/why-fleet-server-is-not-healthy/358368/11 "2024-05-01T15:44:16Z")

</div>

It works fine after I reinstalled the elastic , thanks for your time !
