[Error] fleet-server failed: context canceled

Hello,

I'm trying to upgrade my Elastic cluster from version 8.10.4 to 8.11.1. I encountered issues during the upgrade of Fleet. The upgrade steps involve deleting the existing Fleet server and Agent policies, then creating new ones. However, I'm facing problems during the installation.

sudo ./elastic-agent install -e --url=https://10.109.110.176:8220 \
--fleet-server-es=https://10.109.110.175:9200 \
--fleet-server-service-token=AAEAAWVsYXN0aWMvZmxlZXQtc2VydmVyL3Rva2VuLTE3MDUzMzYxNjc1ODQ6ZUIyVzd0WHNSZFNVMnVDOUZ1eVg0dw \
--fleet-server-policy=fleet-server-policy \
--certificate-authorities=/opt/certs/ca.crt \
--fleet-server-es-ca=/opt/certs/server.crt \
--fleet-server-cert=/opt/certs/apm.crt \
--fleet-server-cert-key=/opt/certs/apm.key \
--fleet-server-port=8220


Elastic Agent will be installed at /opt/Elastic/Agent and will run as a service. Do you want to continue? [Y/n]:Y
Copying files.............................................. DONE
Installing service.... DONE
Starting service... DONE
Enrolling Elastic Agent with Fleet...{"log.level":"debug","@timestamp":"2024-01-16T01:31:31.051+0800","log.origin":{"file.name":"cmd/enroll_cmd.go","file.line":308},"message":"verifying communication with running Elastic Agent daemon","ecs.version":"1.6.0"}
{"log.level":"debug","@timestamp":"2024-01-16T01:31:35.285+0800","log.origin":{"file.name":"cmd/enroll_cmd.go","file.line":770},"message":"Waiting for Elastic Agent to start Fleet Server: no fleet-server application running","ecs.version":"1.6.0"}
{"log.level":"info","@timestamp":"2024-01-16T01:31:35.285+0800","log.origin":{"file.name":"cmd/enroll_cmd.go","file.line":774},"message":"Waiting for Elastic Agent to start Fleet Server","ecs.version":"1.6.0"}
{"log.level":"debug","@timestamp":"2024-01-16T01:31:39.291+0800","log.origin":{"file.name":"cmd/enroll_cmd.go","file.line":784},"message":"Waiting for Elastic Agent to start Fleet Server: STARTING - Waiting on fleet-server input to be added to policy: fleet-server-policy","ecs.version":"1.6.0"}
{"log.level":"info","@timestamp":"2024-01-16T01:31:39.291+0800","log.origin":{"file.name":"cmd/enroll_cmd.go","file.line":807},"message":"Fleet Server - Waiting on fleet-server input to be added to policy: fleet-server-policy","ecs.version":"1.6.0"}
{"log.level":"debug","@timestamp":"2024-01-16T01:31:47.300+0800","log.origin":{"file.name":"cmd/enroll_cmd.go","file.line":784},"message":"Waiting for Elastic Agent to start Fleet Server: STARTING - Waiting on fleet-server input to be added to policy: fleet-server-policy","ecs.version":"1.6.0"}
{"log.level":"debug","@timestamp":"2024-01-16T01:32:03.303+0800","log.origin":{"file.name":"cmd/enroll_cmd.go","file.line":784},"message":"Waiting for Elastic Agent to start Fleet Server: STARTING - Waiting on fleet-server input to be added to policy: fleet-server-policy","ecs.version":"1.6.0"}
{"log.level":"debug","@timestamp":"2024-01-16T01:32:35.309+0800","log.origin":{"file.name":"cmd/enroll_cmd.go","file.line":784},"message":"Waiting for Elastic Agent to start Fleet Server: STARTING - Waiting on fleet-server input to be added to policy: fleet-server-policy","ecs.version":"1.6.0"}
...........................................................................................................................................................................................................................Error: fleet-server failed: context canceled
For help, please see our troubleshooting guide at https://www.elastic.co/guide/en/fleet/8.11/fleet-troubleshooting.html
 FAILED
Stopping service.... DONE
Uninstalling...
   Stopping service... DONE
   Stopping upgrade watcher; none found... DONE
.   Removing service... DONE
   Removing install directory.... DONE
   DONE
Error: enroll command failed for unknown reason: exit status 1

I appreciate any advice. Thank you

Can you provide the policy from fleet?

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