Error: invalid connection string: must include a username unless a service token is provided


I'm trying to enroll a host using the fleet to properly use EndPoint Security, but trying directly causes problems so I resorted to the following commands:
.\elastic-agent enroll --fleet-server-es=https://:443 --fleet-server-service-token= --fleet-server-policy=

And now it generates the error that appears in the first image, I would like to know how I can solve these problems to add the hosts with fleet

Hi osdacita, welcome to the forum!

The recommended way to set up a Fleet Server is to generate a service token for it, see the guide: Deploy on-premises and self-managed | Fleet and Elastic Agent Guide [8.7] | Elastic

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