No connection could be made because the target machine actively refused it

Hi,
I see this issue comes up often. However the answers in the posts I've looked at have no fixed my issue, I've gotten closer, but not all the way.

I have a single ELK system from the latest bitnami 7.14 image.

I am able to connect to Kibana and login on port 80 from both localhost and remote host.

When setting up Winlogbeat on the remote host, I receive this error:

PS C:\Program Files\Winlogbeat> .\winlogbeat.exe setup
Exiting: couldn't connect to any of the configured Elasticsearch hosts. Errors: [error connecting to Elasticsearch at http://192.168.1.80:9200: Get "http://192.168.1.80:9200": dial tcp 192.168.1.80:9200: connectex: No connection could be made because the target machine actively refused it.]

My config is shown below. I've opened port 9200 on my local machine and set network host to 0.0.0.0. What am I missing?

Hi @sarac1 Welcome to the community.

First please do not post screen shot, they are difficult to read, can not be seen by some and can not be searched or copied. Please post text in the future and format with the </> button

Assuming that is your elasticsearch.yml on the right try the following

take out
network.publish_host Using this you just limited what address elasticsearch will accept connections on
and
network.bind_host

and just leave in the
network.host: 0.0.0.0

Thanks for the quick response. Sadly that change above didn't fix my issue directly, however, I did discover the issue! Finally. It was firewall related. I had opened up port 9200, but failed to open both 9300 and 5601 on my ELK server. After doing that, it worked.

sudo ufw 9300 allow
sudo ufw 5601 allow

I must have missed one of the steps in the setup docs.
Thanks stephenb for the support!

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