# Error enrolling Fleet Server: FAILED: Missed two check-ins

**URL:** https://discuss.elastic.co/t/error-enrolling-fleet-server-failed-missed-two-check-ins/303875
**Category:** Elasticsearch
**Tags:** fleet
**Created:** [May 3, 2022, 8:12pm UTC](https://discuss.elastic.co/t/error-enrolling-fleet-server-failed-missed-two-check-ins/303875 "2022-05-03T20:12:44Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![mhoward](https://avatars.discourse-cdn.com/v4/letter/m/4da419/32.png) [@mhoward](https://discuss.elastic.co/u/mhoward)
#### Post date: [May 3, 2022, 8:12pm UTC](https://discuss.elastic.co/t/error-enrolling-fleet-server-failed-missed-two-check-ins/303875/1 "2022-05-03T20:12:44Z")

</div>

I am in the process of adding a Fleet server to a self-managed Elastic cluster in Production mode using my own generated certificates. I'm running into the following error of Elastic-agent failing to start when running the enrollment command.

\<[ansible@fleet ~]$ sudo elastic-agent enroll --url=[https://myurl:8220](https://myurl:8220) \

> --fleet-server-es=[https://myip:9200](https://myip:9200)   
> --fleet-server-service-token=mytoken   
> --fleet-server-policy=mypolicy   
> --certificate-authorities=/etc/elastic-agent/myCA.crt   
> --fleet-server-es-ca=/etc/elastic-agent/my-ca.pem   
> --fleet-server-cert=/etc/elastic-agent/mycert.crt   
> --fleet-server-cert-key=/etc/elastic-agent/mykey.key  
> This will replace your current settings. Do you want to continue? [Y/n]:y  
> 2022-05-03T10:33:56.350-0400 INFO cmd/enroll\_cmd.go:571 Spawning Elastic Agent daemon as a subprocess to complete bootstrap process.  
> 2022-05-03T10:33:56.511-0400 INFO application/application.go:67 Detecting execution mode  
> 2022-05-03T10:33:56.513-0400 INFO application/application.go:88 Agent is in Fleet Server bootstrap mode  
> 2022-05-03T10:33:56.628-0400 INFO [api] api/server.go:62 Starting stats endpoint  
> 2022-05-03T10:33:56.628-0400 INFO application/fleet\_server\_bootstrap.go:130 Agent is starting  
> 2022-05-03T10:33:56.629-0400 INFO [api] api/server.go:64 Metrics endpoint listening on: /var/lib/elastic-agent/data/tmp/elastic-agent.sock (configured: unix:///var/lib/elastic-agent/data/tmp/elastic-agent.sock)  
> 2022-05-03T10:33:56.632-0400 INFO application/fleet\_server\_bootstrap.go:140 Agent is stopped  
> 2022-05-03T10:33:56.636-0400 INFO stateresolver/stateresolver.go:48 New State ID is f3DVydGK  
> 2022-05-03T10:33:56.636-0400 INFO stateresolver/stateresolver.go:49 Converging state requires execution of 1 step(s)  
> 2022-05-03T10:33:56.686-0400 INFO operation/operator.go:284 operation 'operation-install' skipped for fleet-server.7.16.3  
> 2022-05-03T10:33:56.795-0400 INFO log/reporter.go:40 2022-05-03T10:33:56-04:00 - message: Application: fleet-server--7.16.3: State changed to STARTING: Starting - type: 'STATE' - sub\_type: 'STARTING'  
> 2022-05-03T10:33:56.797-0400 INFO stateresolver/stateresolver.go:66 Updating internal state  
> 2022-05-03T10:33:57.341-0400 INFO log/reporter.go:40 2022-05-03T10:33:57-04:00 - message: Application: fleet-server--7.16.3: State changed to RESTARTING: exited with code: 1 - type: 'STATE' - sub\_type: 'STARTING'  
> 2022-05-03T10:33:57.341-0400 INFO log/reporter.go:40 2022-05-03T10:33:57-04:00 - message: Application: fleet-server--7.16.3: State changed to STARTING: Starting - type: 'STATE' - sub\_type: 'STARTING'  
> 2022-05-03T10:33:57.341-0400 INFO log/reporter.go:40 2022-05-03T10:33:57-04:00 - message: Application: fleet-server--7.16.3: State changed to RESTARTING: Restarting - type: 'STATE' - sub\_type: 'STARTING'  
> 2022-05-03T10:33:57.358-0400 INFO cmd/enroll\_cmd.go:776 Fleet Server - Restarting  
> 2022-05-03T10:33:57.879-0400 INFO log/reporter.go:40 2022-05-03T10:33:57-04:00 - message: Application: fleet-server--7.16.3: State changed to STARTING: Starting - type: 'STATE' - sub\_type: 'STARTING'  
> 2022-05-03T10:33:59.359-0400 INFO cmd/enroll\_cmd.go:776 Fleet Server - Starting  
> 2022-05-03T10:35:01.642-0400 WARN status/reporter.go:236 Elastic Agent status changed to: 'degraded'  
> 2022-05-03T10:35:01.642-0400 INFO log/reporter.go:40 2022-05-03T10:35:01-04:00 - message: Application: fleet-server--7.16.3: State changed to DEGRADED: Missed last check-in - type: 'STATE' - sub\_type: 'RUNNING'  
> 2022-05-03T10:35:56.354-0400 INFO cmd/run.go:184 Shutting down Elastic Agent and sending last events...  
> 2022-05-03T10:35:56.355-0400 INFO operation/operator.go:216 waiting for installer of pipeline 'default' to finish  
> 2022-05-03T10:35:56.355-0400 INFO process/app.go:176 Signaling application to stop because of shutdown: fleet-server--7.16.3  
> 2022-05-03T10:36:01.650-0400 ERROR status/reporter.go:236 Elastic Agent status changed to: 'error'  
> 2022-05-03T10:36:01.650-0400 ERROR log/reporter.go:36 2022-05-03T10:36:01-04:00 - message: Application: fleet-server--7.16.3: State changed to FAILED: Missed two check-ins - type: 'ERROR' - sub\_type: 'FAILED'  
> 2022-05-03T10:36:27.400-0400 INFO status/reporter.go:236 Elastic Agent status changed to: 'online'  
> 2022-05-03T10:36:27.400-0400 INFO log/reporter.go:40 2022-05-03T10:36:27-04:00 - message: Application: fleet-server--7.16.3: State changed to STOPPED: Stopped - type: 'STATE' - sub\_type: 'STOPPED'  
> 2022-05-03T10:36:27.400-0400 INFO cmd/run.go:192 Shutting down completed.  
> 2022-05-03T10:36:27.400-0400 INFO [api] api/server.go:66 Stats endpoint (/var/lib/elastic-agent/data/tmp/elastic-agent.sock) finished: accept unix /var/lib/elastic-agent/data/tmp/elastic-agent.sock: use of closed network connection  
> Error: fleet-server failed: context canceled/\>

I've tried running the command with elastic-agent both Active and Inactive. I've also confirmed in Elastic Fleet settings that the URLs entered are correct and am able to ping to/from the Fleet and Elastic servers. Hoping for some troubleshooting advice I've missed. Thank you so much.

---

<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: [May 31, 2022, 8:13pm UTC](https://discuss.elastic.co/t/error-enrolling-fleet-server-failed-missed-two-check-ins/303875/2 "2022-05-31T20:13:01Z")

</div>

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