Fleet Server not respecting custom port config

Upgraded ES and Kibana from 8.1.2 -> 8.4.1.
Un-enrolled my fleet server, and deployed a new fleet server agent with the following (newly created in 8.4.1) config:

However, the elastic agent does not respect the custom port config:

{"log.level":"error","@timestamp":"2022-09-03T08:27:29.676Z","log.origin":{"file.name":"lazy/lazy_acker.go","file.line":90},"message":"lazy acker: failed ack batch, enqueue for retry: []fleetapi.Action{(*fleetapi.ActionPolicyChange)(0xc000465ce0)}","ecs.version":"1.6.0"}
{"log.level":"error","@timestamp":"2022-09-03T08:27:34.975Z","log.origin":{"file.name":"fleet/fleet_gateway.go","file.line":293},"message":"Could not communicate with fleet-server Checking API will retry, error: fail to checkin to fleet-server: Post \"https://MyHostName:8220/api/fleet/agents/e7a7d528-f5c6-460e-a952-c8c12f0c9c56/checkin?\": dial tcp connectex: No connection could be made because the target machine actively refused it.","ecs.version":"1.6.0"}

Even though 'inspect' shows the proper port

I have no listing on 27001 within netstat

Any suggestions?

Please share the command you used to run/initialise the Fleet Server.

Copied from the Kibana gui, minus the download & extraction since files were local

PS C:\ELK\elastic-agent-8.4.1-windows-x86_64> .\elastic-agent.exe install `
>>   --fleet-server-es= `
>>   --fleet-server-service-token=redacted `
>>   --fleet-server-policy=c016f190-2b5f-11ed-84ca-5b21ae8fefdb `
>>   --fleet-server-es-ca-trusted-fingerprint=redacted

You may try to specify --fleet-server-port=27001 on the command line.

I believe the fleet.hosts configuration through inspect is used by the Elastic Agent not Fleet Server.

Thanks for the recommendation! Adding that line, along with changing the fleet server host to (in fleet server integration settings) got it working.

Thank you!