Fleet sever is automatically connected

Hi there,

I am trying to set up my fleet server. On my kibana page it was showing fleet server is connected.
Even though I' have changed the host is it still connecting to the old fleet server ?

Any how by ignoring it. I' have tried to install fleet on my desired server with the enrollment token got from the kibana. I am getting this error

Error: fail to enroll: fail to execute request to fleet-server: dial tcp XX.XX.XX.88:8220: connect: connection refused
For help, please see our troubleshooting guide at Troubleshoot common problems | Fleet and Elastic Agent Guide [8.3] | Elastic
Error: enroll command failed with exit code: 1
For help, please see our troubleshooting guide at Troubleshoot common problems | Fleet and Elastic Agent Guide [8.3] | Elastic

check if the install link from Kibana is incorrect and you need to do HTTPS instead of HTTP. In kibana fleet settings you should set the fleetserver also to HTTPS. See if this resolves the issue.

Thanks
Rashmi