FileBeat How to control the ports used

During use, the program will randomly start the port, is there any way to control ?

Randomly start what port? Are u using one of the inputs that listens on a port; udp, tcp, netflow...?


ex

For example:
output to ES fliebeat will launch a random port

This is the client port that filebeat is using to connect to Elasticsearch, you do not control that.

Thank you reply

  I think it is necessary in the scenario of strict port management, 
  Because the server can only open a fixed single port.

  Is there any solution to this problem?

I'm sorry, but I do not see any issue or problem.

Your server is not listening on that 54998 port, this port was created by the filebeat process to communicate with your Elasticsearch, it is a client port for the TCP connection, it can be any port in the available port ranges, which is normally from 1024 to 65535.

There is no option in filebeat to limit this client port, if you can only use a specific range, than you will need to change this in the operating system level, which is out of the scope of this forum and should be done with caution as this can impact your system.

1 Like

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