Elastic Agent v7.10.1
I hit and issue with the "Enroll and start the Elastic Agent" step for Windows. The first error message that I started receiving was after running this in Powershell:
.\elastic-agent.exe install -f --kibana-url=https://
The Elastic Agent is currently in BETA and should not be used in production
The error message displayed was:
2021-02-10T10:39:31.023-0500 DEBUG kibana/client.go:170 Request method: POST, path: /api/fleet/agents/enroll
Error: fail to enroll: fail to execute request to Kibana: Post "https://xyz.g
ov:443/api/fleet/agents/enroll?": dial tcp xx.xx.xx.xx:443: connectex: No connection could be made because the target machine actively refused it. Error: enroll command failed with exit code: 1
This was solved in Elastic Cloud Enterprise by changing the port from 443 to 9243 so the actual command to enroll ended up being; .\elastic-agent.exe install -f --kibana-url=https://
Not a crazy issue to resolve but it did require a bit of troubleshooting and is something that could be updated in the docs or changed in Kibana where it populates. From there the beat will enroll and show up in the appropriate Fleet tabs in Kibana. However, once it runs for a little bit the Agent drops out and the error message in the logs is
2021-02-10T13:49:16.023-0500 DEBUG kibana/client.go:170 Request method: POST, path: /api/fleet/agents/f28434b2-3bb8-458e-a0f0-8f626ac75ce4/checkin
2021-02-10T13:49:17.038-0500 ERROR application/fleet_gateway.go:176 Could not communicate with Checking API will retry, error: fail to checkin to fleet: Post "https://xyz.gov:443/api/fleet/agents/xxxxx-xxxxx-xxxx-xxxx/checkin?": dial tcp xx.xx.xx.xx:443: connectex: No connection could be made because the target machine actively refused it.
From what I can tell I need to change a setting somewhere so that the API stops utilizing port 443 but I'm not sure where that needs to be done.