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

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 \

--fleet-server-es=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.

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