Issue to setup Fleet Server

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

@Wave

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

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

network.host: 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 http://192.168.1.41:9201. 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.

network.host: 0.0.0.0

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

Changing the network.host to 0.0.0.0 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 network.host to 0.0.0.0.

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

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