Issue to setup Fleet Server

Continuing the discussion from How to get started with Elastic APM?:


I've taken two VM as suggested -
VM1 (elasticsearch, kibana):
VM2 (Fleet Elastic Agent):

I've install Elasticsearch and kibana in one VM (VM1). Kibana GUI is working fine.
Change made in elasticsearch configuration file - localhost
http.port: 9201

As both are in the same server, in kibana configuration is made the change as below -

elasticsearch.hosts: ["http://localhost:9201"]

The problem is - when I tried to set up the fleet server in VM2 from Kiabana GUI, installation is getting failed as VM2 cannot communicate to elasticsearch with URL This elasticsearch URL is required in Fleet setup. I did curl from VM1 but it failed too. When I do curl from VM1 using this http://localhost:9201 it is getting successful.

When I made change in elasticsearch configuration file like below, and give elasticsearch service restart it failed.

Any suggestion how I can have my single server (VM1) ealsticsearch available from different server (VM2) to complete Fleet server setup?

Changing the to tells Elasticsearch that you want to try and run in a production mode and starts enforcing bootstrap checks. Do you have the Elasticsearch service logs for why it's failing?

You could also set the single-node discovery.type which will allow you to change the to

1 Like

Solved as per your suggestion by adding the following line in elasticsearch.yml file
discovery.type: single-node

Using kibana GUI, Fleet server made up by installing Elastic Agent with "Fleet up policy". After that I tied to add Elastic Agent with Agent policy; that got failed. Suddenly I saw an error message in kibana "Fleet Server is not Healthy". I removed the Fleet server from kibana GUI and tried to install (VM2 using CLI) again but it is getting failed.

Glad you got earlier question solved. Fleet can be tricky to install. Have you tried the steps outlined in the fleet troubleshooting guide from the picture you provided: Troubleshoot common problems | Fleet and Elastic Agent Guide [8.7] | Elastic