Error installing Fleet Server

Hi,

My setup:
Elasticsearch 8.1.0, Kibana 8.1.0, Elastic Agent 8.1.0

Downloaded elastic agent on my windows machine.
Ran the following command:

elastic-agent.exe install --fleet-server-es=https://localhost:9200 --fleet-server-service-token=AAEAAWVsYXN0aWMvZmxlZXQtc2VydmVyL3Rva2VuLTE2NTQxNjMwMzc2ODc6bUg4SHI5bDNRWUt3VFdxUVVRMWNuQQ --fleet-server-policy=fleet-server-policy --fleet-server-insecure-http

Getting below 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
{"log.level":"info","@timestamp":"2022-06-02T15:26:59.725+0530","log.origin":{"file.name":"cmd/enroll_cmd.go","file.line":744},"message":"Waiting for Elastic Agent to start Fleet Server","ecs.version":"1.6.0"}
{"log.level":"info","@timestamp":"2022-06-02T15:27:05.754+0530","log.origin":{"file.name":"cmd/enroll_cmd.go","file.line":777},"message":"Fleet Server - Error - x509: certificate signed by unknown authority","ecs.version":"1.6.0"}
{"log.level":"info","@timestamp":"2022-06-02T15:27:13.775+0530","log.origin":{"file.name":"cmd/enroll_cmd.go","file.line":777},"message":"Fleet Server - Restarting","ecs.version":"1.6.0"}
{"log.level":"info","@timestamp":"2022-06-02T15:27:29.802+0530","log.origin":{"file.name":"cmd/enroll_cmd.go","file.line":777},"message":"Fleet Server - Error - x509: certificate signed by unknown authority","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.1/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/8.1/fleet-troubleshooting.html

Can anybody help here?

Hello @aviral_srivastava, you can find more information in the provided link: Troubleshoot common problems | Fleet and Elastic Agent Guide [8.1] | Elastic

There is a specific section about the error you are seeing: Troubleshoot common problems | Fleet and Elastic Agent Guide [8.1] | Elastic

TL;DR: pass --insecure to install command

Hi,

I added the --insecure to my command like below, but still the same error:

elastic-agent.exe install --fleet-server-es=https://localhost:9200 --fleet-server-service-token=AAEAAWVsYXN0aWMvZmxlZXQtc2VydmVyL3Rva2VuLTE2NTQ0MjgyMzM3MTY6bV9YVGl5R3lUMG1IUFhaWDVQUUVLdw --fleet-server-policy=fleet-server-policy --fleet-server-insecure-http --insecure

I am using a windows machine.

My Elasticsearch is using self-signed certificate which it generates when we first time start the Elasticsearch. It is running on https://localhost:9200

I went to Kibana>Management>Fleet>Agent
I followed the guide given there.
Chosen the policy: Fleet Server policy 1
Downloaded the elastic agent, which will act as Fleet Server.
I selected Quick Start as deployment mode for Security. There it mentions Fleet Server will generate a self-signed certificate. But I don't see any certificate generated.
I added Fleet Server host as https://localhost:8220
I generated a service token from the UI.
After then, I ran the above command, this time adding --insecure tag. But still the same error. Not what sure what to do from here?

I noticed that you are using some custom flags in you command.

May you try the command as written in the troubleshooting step? So with --url=https://<fleet-server-ip>:8220 --enrollment-token=<token> --insecure only?

I have the same problem.
Described here

{"log.level":"info","@timestamp":"2022-06-06T21:53:05.353+0300","log.origin":{"file.name":"cmd/enroll_cmd.go","file.line":783},"message":"Fleet Server - Error - dial tcp 172.18.0.2:9200: i/o timeout","ecs.version":"1.6.0"}

Any suggestions?

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