'cannot connect to X.X.X.X:10514: Connection refused

Configuring a ELK stack version 8.1, based on two virtual machine which both run Oracle linux 8. I need to send logs from a VM to the other using rsyslog. On the recieving machine logs will be acquired using FileBeat. The file rsyslog.conf has been configured on the sending machine, adding target machine parameters. The file filebeat.yml has been configured to recieve logs from rsyslog like this:

- type: syslog
enabled: true
format: auto
protocol.tcp:
host: "X.X.X.X:10514"

The firewalld on the receiving machine has been configured opening the port 10514.

Since the reboot after configuration, the only thing I can get is the error:

cannot connect to X.X.X.X:10514: Connection refused

How can I solve this problem?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source