Attempting to start Fleet Server fails

Hi there!
I'm trying to install Fleet Server using the Quick Start deployment mode on an Ubuntu 20.04 instance and it's failing:

2021-08-30T22:47:54.988Z        INFO    cmd/enroll_cmd.go:354   Generating self-signed certificate for Fleet Server
2021-08-30T22:47:57.120Z        INFO    cmd/enroll_cmd.go:668   Waiting for Elastic Agent to start Fleet Server
2021-08-30T22:48:01.128Z        INFO    cmd/enroll_cmd.go:701   Fleet Server - Starting
2021-08-30T22:48:02.129Z        INFO    cmd/enroll_cmd.go:701   Fleet Server - Error - EOF

Not sure what's going on here. So far, I have Elasticsearch and Kibana, configured with Set up basic security for the Elastic Stack plus secured HTTPS traffic | Elasticsearch Guide [7.14] | Elastic up to the Encrypt traffic between Kibana and Elasticsearch step.

Thanks for your help!

Can you provide more of the steps you took? Like the commands use to generate the certificates and the install command you used to get those log messages?

Hello it would appear that im having this same issue ending with the context being canceled by the elastic-agent daemon. The command run is the one that is given to me from Kibana while setting up the fleet server
sudo ./elastic-agent install -f
--fleet-server-es=http://localhost:9200
--fleet-server-service-token=TOKEN WAS HERE
--fleet-server-policy=ec26fc90-169c-11ec-9db0-0772f8d15b6f

The certificate is self-signed and generated at the begining of the install process

Here is the ouput from elastic-agent

sudo ./elastic-agent install -f
--fleet-server-es=http://localhost:9200
--fleet-server-service-token=TOKEN HERE
--fleet-server-policy=ec26fc90-169c-11ec-9db0-0772f8d15b6f

2021-09-16T11:40:22.121Z INFO cmd/enroll_cmd.go:336 Generating self-signed certificate for Fleet Server
2021-09-16T11:40:24.036Z INFO cmd/enroll_cmd.go:650 Waiting for Elastic Agent to start Fleet Server
2021-09-16T11:40:27.040Z INFO cmd/enroll_cmd.go:633 Waiting for Elastic Agent to start
2021-09-16T11:40:31.053Z INFO cmd/enroll_cmd.go:683 Fleet Server - Starting
2021-09-16T11:40:32.055Z INFO cmd/enroll_cmd.go:683 Fleet Server - Error - EOF
2021-09-16T11:40:38.068Z INFO cmd/enroll_cmd.go:688 Fleet Server - Error - EOF
2021-09-16T11:40:42.076Z INFO cmd/enroll_cmd.go:683 Fleet Server - Restarting
2021-09-16T11:40:43.078Z INFO cmd/enroll_cmd.go:683 Fleet Server - Error - EOF
2021-09-16T11:40:49.091Z INFO cmd/enroll_cmd.go:688 Fleet Server - Error - EOF
2021-09-16T11:40:53.103Z INFO cmd/enroll_cmd.go:683 Fleet Server - Restarting
2021-09-16T11:40:54.105Z INFO cmd/enroll_cmd.go:683 Fleet Server - Error - EOF
2021-09-16T11:41:00.120Z INFO cmd/enroll_cmd.go:688 Fleet Server - Error - EOF
2021-09-16T11:41:04.128Z INFO cmd/enroll_cmd.go:683 Fleet Server - Restarting
2021-09-16T11:41:05.130Z INFO cmd/enroll_cmd.go:683 Fleet Server - Error - EOF
2021-09-16T11:41:11.145Z INFO cmd/enroll_cmd.go:688 Fleet Server - Error - EOF
2021-09-16T11:41:15.152Z INFO cmd/enroll_cmd.go:683 Fleet Server - Restarting
2021-09-16T11:41:16.154Z INFO cmd/enroll_cmd.go:683 Fleet Server - Error - EOF
2021-09-16T11:41:22.175Z INFO cmd/enroll_cmd.go:688 Fleet Server - Error - EOF
2021-09-16T11:41:26.186Z INFO cmd/enroll_cmd.go:683 Fleet Server - Restarting
2021-09-16T11:41:27.188Z INFO cmd/enroll_cmd.go:683 Fleet Server - Error - EOF
2021-09-16T11:41:33.205Z INFO cmd/enroll_cmd.go:688 Fleet Server - Error - EOF
2021-09-16T11:41:37.216Z INFO cmd/enroll_cmd.go:683 Fleet Server - Restarting
2021-09-16T11:41:38.218Z INFO cmd/enroll_cmd.go:683 Fleet Server - Error - EOF
2021-09-16T11:41:44.232Z INFO cmd/enroll_cmd.go:688 Fleet Server - Error - EOF
2021-09-16T11:41:48.240Z INFO cmd/enroll_cmd.go:683 Fleet Server - Restarting
2021-09-16T11:41:49.242Z INFO cmd/enroll_cmd.go:683 Fleet Server - Error - EOF
2021-09-16T11:41:55.255Z INFO cmd/enroll_cmd.go:688 Fleet Server - Error - EOF
2021-09-16T11:41:59.263Z INFO cmd/enroll_cmd.go:683 Fleet Server - Restarting
2021-09-16T11:42:00.265Z INFO cmd/enroll_cmd.go:683 Fleet Server - Error - EOF
2021-09-16T11:42:06.278Z INFO cmd/enroll_cmd.go:688 Fleet Server - Error - EOF
2021-09-16T11:42:10.287Z INFO cmd/enroll_cmd.go:683 Fleet Server - Restarting
2021-09-16T11:42:11.289Z INFO cmd/enroll_cmd.go:683 Fleet Server - Error - EOF
2021-09-16T11:42:17.301Z INFO cmd/enroll_cmd.go:688 Fleet Server - Error - EOF
2021-09-16T11:42:21.310Z INFO cmd/enroll_cmd.go:683 Fleet Server - Restarting
2021-09-16T11:42:22.313Z INFO cmd/enroll_cmd.go:683 Fleet Server - Error - EOF
Error: fleet-server never started by elastic-agent daemon: context canceled
Error: enroll command failed with exit code: 1

Thanks!

When you say that the certificate is self-signed, which certificate? If you are using a self-signed certificate for elasticsearch, you need to provide the CA here with --fleet-server-es-ca.

Sorry i was referring to the fleet servers self signed cert

I'm using the self-signed option. Here's the command:

sudo ./elastic-agent install  -f \
 --fleet-server-es=http://172.16.2.9:9200 \
 --fleet-server-service-token=AAEAAWVsYXN0aWMvZmxlZXQtc2VydmVyL3Rva2VuLTE2MzI2Nzk2ODE4MTM6Q01xZmNOSjNTYlN0VVd2cUViZDdqUQ \
  --fleet-server-policy=2b239080-1ef3-11ec-8ad3-89585f5b4df4

1 Like

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