I'm trying to install fleet server on my local server (the same where elasticsearch is installed) and I'm not succeeding. I've tried to uninstall and reinstall elastic-agent 7.14 and it doesn't work.
the commands and the output are below:
root@abc:/home/# sudo elastic-agent enroll -f --url=http://10.81.xxx.xxx:8220 --fleet-server-es=https://10.81.xxx.xxx:9200 --fleet-server-service-token=AAEAAWVsYXN0aWMvZmxlZXQtc2VxxxxxxxxxxxxxxxNDU6d21JUTUtUWxTNzYtR2xyTkZEUXNIQQ --fleet-server-policy=fc2498e0-e3fd-11eb-8662-35090124ff70 --insecure --fleet-server-es-ca=ca.crt --fleet-server-cert=fleet..crt --fleet-server-cert-key=fleet.key --enrollment-token=1bb75d8b-94ca-4b7d-b268-cc7339xxxxxx
2021-08-26T18:28:01.972-0300 INFO cmd/enroll_cmd.go:526 Spawning Elastic Agent daemon as a subprocess to complete bootstrap process.
2021-08-26T18:28:02.193-0300 INFO application/application.go:66 Detecting execution mode
2021-08-26T18:28:02.195-0300 INFO application/application.go:87 Agent is in Fleet Server bootstrap mode
2021-08-26T18:28:02.977-0300 INFO cmd/enroll_cmd.go:668 Waiting for Elastic Agent to start Fleet Server
2021-08-26T18:28:03.054-0300 INFO [api] api/server.go:62 Starting stats endpoint
2021-08-26T18:28:03.054-0300 INFO application/fleet_server_bootstrap.go:124 Agent is starting
2021-08-26T18:28:03.055-0300 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)
2021-08-26T18:28:03.056-0300 INFO application/fleet_server_bootstrap.go:134 Agent is stopped
2021-08-26T18:28:03.061-0300 INFO stateresolver/stateresolver.go:48 New State ID is p2iK6r5S
2021-08-26T18:28:03.061-0300 INFO stateresolver/stateresolver.go:49 Converging state requires execution of 1 step(s)
2021-08-26T18:28:03.225-0300 INFO operation/operator.go:259 operation 'operation-install' skipped for fleet-server.7.14.0
2021-08-26T18:28:03.712-0300 INFO log/reporter.go:40 2021-08-26T18:28:03-03:00 - message: Application: fleet-server--7.14.0[]: State changed to STARTING: Starting - type: 'STATE' - sub_type: 'STARTING'
2021-08-26T18:28:03.714-0300 INFO stateresolver/stateresolver.go:66 Updating internal state
2021-08-26T18:28:03.986-0300 INFO cmd/enroll_cmd.go:701 Fleet Server - Starting
2021-08-26T18:28:04.298-0300 INFO log/reporter.go:40 2021-08-26T18:28:04-03:00 - message: Application: fleet-server--7.14.0[]: State changed to RESTARTING: exited with code: 1 - type: 'STATE' - sub_type: 'STARTING'
2021-08-26T18:28:04.299-0300 INFO log/reporter.go:40 2021-08-26T18:28:04-03:00 - message: Application: fleet-server--7.14.0[]: State changed to STARTING: Starting - type: 'STATE' - sub_type: 'STARTING'
2021-08-26T18:28:04.299-0300 INFO log/reporter.go:40 2021-08-26T18:28:04-03:00 - message: Application: fleet-server--7.14.0[]: State changed to RESTARTING: Restarting - type: 'STATE' - sub_type: 'STARTING'
2021-08-26T18:28:04.875-0300 INFO log/reporter.go:40 2021-08-26T18:28:04-03:00 - message: Application: fleet-server--7.14.0[]: State changed to STARTING: Starting - type: 'STATE' - sub_type: 'STARTING'
2021-08-26T18:28:10.001-0300 INFO cmd/enroll_cmd.go:706 Fleet Server - Starting
2021-08-26T18:28:16.016-0300 INFO cmd/enroll_cmd.go:706 Fleet Server - Starting
2021-08-26T18:28:22.035-0300 INFO cmd/enroll_cmd.go:706 Fleet Server - Starting
2021-08-26T18:28:28.056-0300 INFO cmd/enroll_cmd.go:706 Fleet Server - Starting
2021-08-26T18:28:34.070-0300 INFO cmd/enroll_cmd.go:706 Fleet Server - Starting
2021-08-26T18:28:40.083-0300 INFO cmd/enroll_cmd.go:706 Fleet Server - Starting
2021-08-26T18:28:46.098-0300 INFO cmd/enroll_cmd.go:706 Fleet Server - Starting
2021-08-26T18:28:52.111-0300 INFO cmd/enroll_cmd.go:706 Fleet Server - Starting
2021-08-26T18:28:58.124-0300 INFO cmd/enroll_cmd.go:706 Fleet Server - Starting
2021-08-26T18:29:04.144-0300 INFO cmd/enroll_cmd.go:706 Fleet Server - Starting
2021-08-26T18:29:08.067-0300 WARN status/reporter.go:236 Elastic Agent status changed to: 'degraded'
2021-08-26T18:29:08.067-0300 INFO log/reporter.go:40 2021-08-26T18:29:08-03:00 - message: Application: fleet-server--7.14.0[]: State changed to DEGRADED: Missed last check-in - type: 'STATE' - sub_type: 'RUNNING'
2021-08-26T18:29:08.153-0300 INFO cmd/enroll_cmd.go:682 Fleet Server - Missed last check-in
2021-08-26T18:29:08.153-0300 WARN [tls] tlscommon/tls_config.go:98 SSL/TLS verifications disabled.
2021-08-26T18:29:08.344-0300 INFO cmd/enroll_cmd.go:414 Starting enrollment to URL: http://10.81.xxx.xxx:8220/
2021-08-26T18:29:08.448-0300 WARN cmd/enroll_cmd.go:425 Remote server is not ready to accept connections, will retry in a moment.
2021-08-26T18:30:08.075-0300 ERROR status/reporter.go:236 Elastic Agent status changed to: 'error'
2021-08-26T18:30:08.075-0300 ERROR log/reporter.go:36 2021-08-26T18:30:08-03:00 - message: Application: fleet-server--7.14.0[]: State changed to FAILED: Missed two check-ins - type: 'ERROR' - sub_type: 'FAILED'
2021-08-26T18:30:08.449-0300 INFO cmd/enroll_cmd.go:432 Retrying enrollment to URL: http://10.81.200.160:8220/
2021-08-26T18:30:08.554-0300 WARN cmd/enroll_cmd.go:425 Remote server is not ready to accept connections, will retry in a moment.
2021-08-26T18:32:08.556-0300 INFO cmd/enroll_cmd.go:432 Retrying enrollment to URL: http://10.81.200.160:8220/
2021-08-26T18:32:08.659-0300 WARN cmd/enroll_cmd.go:425 Remote server is not ready to accept connections, will retry in a moment.
and gets stuck on the "Remote server is not ready to accept connections, will retry in a moment". forever