# Fleet agent failed to connect to fleet server after assigning new agent policy

**URL:** https://discuss.elastic.co/t/fleet-agent-failed-to-connect-to-fleet-server-after-assigning-new-agent-policy/286263
**Category:** Elasticsearch
**Tags:** fleet
**Created:** [October 8, 2021, 4:04pm UTC](https://discuss.elastic.co/t/fleet-agent-failed-to-connect-to-fleet-server-after-assigning-new-agent-policy/286263 "2021-10-08T16:04:54Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![pingz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pingz/32/58555_2.png) [@pingz](https://discuss.elastic.co/u/pingz)
#### Post date: [October 8, 2021, 4:04pm UTC](https://discuss.elastic.co/t/fleet-agent-failed-to-connect-to-fleet-server-after-assigning-new-agent-policy/286263/1 "2021-10-08T16:04:54Z")

</div>

```auto
Hi there:

I have fleet agent and fleet server (7.15.0) both running as pods in Kubernetes. After applying new agent policy, fleet agent became offline. I can see the error in fleet agent log

|2021-10-08T15:56:56.120Z|INFO|stateresolver/stateresolver.go:66|Updating internal state|
|---|---|---|---|
|2021-10-08T15:56:56.217Z|ERROR|fleet/fleet_gateway.go:180|failed to dispatch actions, error: acknowledge 1 actions '[action_id: policy:b6167280-284d-11ec-af8e-31c20ea2b163:3:1, type: POLICY_CHANGE]' for elastic-agent '4df9cba7-a5a5-4751-b244-329600b37e3b' failed: fail to read original error: read tcp 10.250.73.70:58468->172.20.153.42:8220: read: connection reset by peer|
|2021-10-08T15:56:56.217Z|ERROR|status/reporter.go:236|Elastic Agent status changed to: 'error'|
|2021-10-08T15:56:57.724Z|ERROR|fleet/fleet_gateway.go:205|Could not communicate with fleet-server Checking API will retry, error: fail to read original error: read tcp 10.250.73.70:58554->172.20.153.42:8220: read: connection reset by peer|
|2021-10-08T15:56:58.723Z|INFO|log/reporter.go:40|2021-10-08T15:56:58Z - message: Application: metricbeat--7.15.0--36643631373035623733363936343635[4df9cba7-a5a5-4751-b244-329600b37e3b]: State changed to RUNNING: Running - type: 'STATE' - sub_type: 'RUNNING'|
|2021-10-08T15:57:13.327Z|INFO|stateresolver/stateresolver.go:48|New State ID is cgfC5hHh|
|2021-10-08T15:57:13.327Z|INFO|stateresolver/stateresolver.go:49|Converging state requires execution of 3 step(s)|

```

---

<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 5, 2021, 4:05pm UTC](https://discuss.elastic.co/t/fleet-agent-failed-to-connect-to-fleet-server-after-assigning-new-agent-policy/286263/2 "2021-11-05T16:05:46Z")

</div>

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