to setup fleet
but when I try to do the 2nd step in that document to add elastic agent to the fleet am getting an error
2022-04-05T21:42:01.934Z WARN [tls] tlscommon/tls_config.go:101 SSL/TLS verifications disabled.
2022-04-05T21:42:02.421Z INFO cmd/enroll_cmd.go:454 Starting enrollment to URL: http://fleet server ip:8220/
2022-04-05T21:42:23.606Z WARN cmd/enroll_cmd.go:465 Remote server is not ready to accept connections, will retry in a moment.
D:\Elastic\elastic-agent-7.17.2-windows-x86_64>2022-04-05T21:43:23.622Z INFO cmd/enroll_cmd.go:472 Retrying enrollment to URL: http://fleet server ip:8220/
Error: fail to enroll: fail to execute request to fleet-server
For help, please see our troubleshooting guide at https://www.elastic.co/guide/en/fleet/7.17/fleet-troubleshooting.html
I tried without using --insecure for http it gives an error and prompts to use --insecure.
curl command is actually not working in the windows server I am using. but I tried accessing http://fleet server ip:8220 from the browser and it gives an error "cannot reach this page"
My Elk stack only had minimal security in the beginning then I was able to add a fleet server but now I setup SSL security for the elk stack and the fleet server which I added earlier was showing offline so I unenrolled it and when I try to do it again now I am unable to add the fleet server as well
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-04-11T21:01:19.465Z","log.origin":{"file.name":"cmd/enroll_cmd.go","file.line":727},"message":"Waiting for Elastic Agent to start","ecs.version":"1.6.0"}
{"log.level":"info","@timestamp":"2022-04-11T21:01:25.470Z","log.origin":{"file.name":"cmd/enroll_cmd.go","file.line":777},"message":"Fleet Server - Starting","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
Error: --certificate-authorities must be provided as an absolute path
For help, please see our troubleshooting guide at https://www.elastic.co/guide/en/fleet/8.1/fleet-troubleshooting.html
ca folder has ca.crt and ca.key
and according to the above article used the ca to generate certificates for fleet server
./bin/elasticsearch-certutil cert --name fleet-server --ca-cert /usr/share/elasticsearch/ca/ca.crt --ca-key /usr/share/elasticsearch/ca/ca.crt --ip fleet server ip --pem
this gave fleet-server.crt, fleet-server.key
so now used the command
.\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 --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```
If this is not the correct process to generate certificates for fleet, could you please guide me with any appropriate link to follow .
Thanks
Error: --certificate-authorities must be provided as an absolute path
For help, please see our troubleshooting guide at https://www.elastic.co/guide/en/fleet/8.1/fleet-troubleshooting.html
that is the absolute path to the cert , I don't understand what the error is referring to
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.