Error setting up Filebeat on Windows

After starting the service, I am constantly facing a connection error:

SSL Client failed to connect with: dial tcp x.x.x.x:5044
No connection could be made because the target machine actively refused it.

Here is my filebeat.yml file:

filebeat:
  # List of prospectors to fetch data.
  prospectors:
      paths:
        - C:\xampp\htdocs\order-core\storage\logs\*.log
      input_type: log
      fields:
         product: prod_namev5
      fields_under_root: true
      document_type: log
      tail_files: true
  registry_file: "C:\ProgramData\filebeat\registry"
output:
  ### Logstash as output
  logstash:
    # The Logstash hosts
    hosts: ["x.x.x.x:5044"]
    # Optional TLS. By default is off.
    tls:
      # List of root certificates for HTTPS server verifications
      certificate_authorities: ["C:/Program Files/Filebeat/certs/logstash-forwarder.crt"]
shipper:
logging:
  files:
    rotateeverybytes: 10485760 # = 10MB

How do I fix this issue?

PS: I've also attached screenshot for the response I'm getting after starting the service
Thanks in advance! :slightly_smiling:

Can you post your logstash config please? Any logs in logstash regarding connection failure?

Hi Steffans!

There is no log related to the "connection error" inside my log file, that I'm trying to push to the server.

As a side note, the location of my certificate file and the corresponding key file is as follows:
Certificate Location: "C:/Program Files/Filebeat/certs/logstash-forwarder.crt"
Certificate Key Location: "C:/Program Files/Filebeat/private/logstash-forwarder.key"
Could the issue be directory related too?

I did start the service again, and getting the following response now:

Can you post your logstash config?

Any firewall in between?

Have you tried to ping the logstash server?

Have you tried to telnet logstash server on port 5044?

Connetion is refused by logstash server for some reason, e.g. wrong port or firewall rules.