Fleet-server failed: context canceled

Hi
Having trouble enrolling fleet server
Elasticsearch kibana and elastic agent versions 7.17.2

command I used is

.\elastic-agent.exe install --url=https://fleet server ip:8220 --fleet-server-es=https://elasticsearch ip:9200 --fleet-server-service-token=****** --fleet-server-policy=******* --certificate-authorities= /usr/share/elasticsearch/ca/ca.crt --fleet-server-es-ca= /usr/share/elasticsearch/elastic-stack-ca.p12 --fleet-server-cert= /etc/elasticsearch/fleet-server.crt --fleet-server-cert-key= /etc/elasticsearch/fleet-server.key

I get this error

Elastic Agent will be installed at C:\Program Files\Elastic\Agent and will run as a service. Do you want to continue? [Y/n]:y
2022-04-13T14:15:24.609Z        INFO    cmd/enroll_cmd.go:386   Generating self-signed certificate for Fleet Server
2022-04-13T14:15:26.477Z        INFO    cmd/enroll_cmd.go:743   Waiting for Elastic Agent to start Fleet Server
2022-04-13T14:15:41.389Z        INFO    cmd/enroll_cmd.go:776   Fleet Server - Starting
Error: fleet-server failed: context canceled
For help, please see our troubleshooting guide at https://www.elastic.co/guide/en/fleet/7.17/fleet-troubleshooting.html
Error: enroll command failed with exit code: 1
For help, please see our troubleshooting guide at https://www.elastic.co/guide/en/fleet/7.17/fleet-troubleshooting.html

Could anyone please help.
Thank You.

Hi @spo, can you enable debug log levels, retry and provide them?

My hypothesis is either is a bug or the enrolment fails (is the fleet server instance reachable?)

I figured the issue here.
I did not give correct file format when I copied the certs from the ubuntu ELK server where I generated them to the Wndows server where I was trying to run fleet.
Once the file format was corrected .I was able to enroll the fleet server.

Thanks

2 Likes

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