Error: could not start the HTTP server for the API: listen tcp 127.0.0.1:6791: bind: address already in use

Hello,
I have 6 node EKS cluster and installed Elasticsearch/Kibana 8.9.1 . I have been struggling with Fleet.

Although 5 elastic-agent pods works on 5 nodes, 1 elastic-agent on 1 node gives following error:

Error: could not start the HTTP server for the API: listen tcp 127.0.0.1:6791: bind: address already in use

What/where do I search for fix, could you please advise?

Thanks& Regards

Hi @tirelibirefe,

I am facing a similar issue having that 6791 port used by another application and I would like to change the default port used in Elastic Agent to something like 6790.
I tried to added below in /opt/Elastic/Agent/elastic-agent.yml and restarted the agent but it did not work.

agent.monitoring:
  http:
    port: 6790

If someone has a fix it will be high appreciated.

Thanks.