# Error: fail to communicate with updated API client hosts

**URL:** <https://discuss.elastic.co/t/error-fail-to-communicate-with-updated-api-client-hosts/270268>\
**Category:** Endpoint Security\
**Tags:** fleet\
**Created:** [April 15, 2021, 3:25pm UTC](https://discuss.elastic.co/t/error-fail-to-communicate-with-updated-api-client-hosts/270268 "2021-04-15T15:25:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![priamai](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/priamai/32/80269_2.png) [@priamai](https://discuss.elastic.co/u/priamai)\
**Post date:** [April 15, 2021, 3:25pm UTC](https://discuss.elastic.co/t/error-fail-to-communicate-with-updated-api-client-hosts/270268/1 "2021-04-15T15:25:54Z")

</div>

Hi there,  
I have installed the ElasticAgent on Ubuntu 18.04 LTS via the suggested commandline:

`sudo ./elastic-agent install -f --kibana-url=https://10.0.0.75:5601 --enrollment-token=cTZFSzFuZ0JrSlg2TXhjV1o0M1E6bUdzNVhFQktRY2lidFYyYURXTlFCQQ== --insecure`

The ELK stack on 10.0.0.75 has a self signing certificate so I had to provide the insecure flag.

After successful enrolment the Agent goes unhealthy.  
I looked into the Agent logs and found this suspicious lines:

`{"log.level":"debug","@timestamp":"2021-04-15T15:20:02.422Z","log.origin":{"file.name":"application/action_dispatcher.go","file.line":93},"message":"Failed to dispatch action 'action_id: 44f410d0-9dfb-11eb-a0dd-054b4cf002cc, type: POLICY_CHANGE', error: fail to communicate with updated API client hosts: Get \"https://0.0.0.0:5601/api/status?\": dial tcp 0.0.0.0:5601: connect: connection refused","ecs.version":"1.6.0"}`

It seems like it didn't save the ELK IP address and instead is putting a default of 0.0.0.0?

I have a similar issue with Windows too but let's try to focus on Ubuntu for now.

---

<div class="post-metadata">

**Author:** ![nick.e](https://avatars.discourse-cdn.com/v4/letter/n/8dc957/32.png) [@nick.e](https://discuss.elastic.co/u/nick.e)\
**Post date:** [May 6, 2021, 1:02pm UTC](https://discuss.elastic.co/t/error-fail-to-communicate-with-updated-api-client-hosts/270268/2 "2021-05-06T13:02:04Z")

</div>

A bit late, but check your fleet settings.  
Policies \> Click on Policy \> Settings (upper right corner)  
By default, they look like that:

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

---

<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:** [June 3, 2021, 1:02pm UTC](https://discuss.elastic.co/t/error-fail-to-communicate-with-updated-api-client-hosts/270268/3 "2021-06-03T13:02:41Z")

</div>

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